Produce a flowchart visualisation of the pipeline. Out-of-date targets will be coloured red, up-to-date targets will be coloured green, and everything else will be blue.

show_pipeline(
  pipeline = get_pipeline(),
  as = c("nomnoml", "visnetwork", "text"),
  labels = NULL,
  notes = NULL,
  ...
)

save_pipeline(
  file,
  pipeline = get_pipeline(),
  as = c("nomnoml", "visnetwork", "text"),
  labels = NULL,
  notes = NULL,
  ...
)

Arguments

pipeline

A pipeline. See Pipeline for more details.

as

A string determining whether to use nomnoml or visNetwork

labels

A named character vector mapping nodes in the pipeline onto labels to display beside them.

notes

A named character vector mapping nodes in the Pipeline onto notes to display on beside the labels (nomnoml) or as tooltips (visNetwork).

...

Arguments passed onto Pipeline$nomnoml() or Pipeline$visnetwork

file

File to save png (nomnoml) or html (visnetwork) into

Details

Labels and notes must be supplied as named character vector where the names correspond to the filepaths of nodes (i.e. targets, dependencies, or source scripts)

See also

Other pipeline: Pipeline, pipeline-accessors

Examples

if (FALSE) {
# Run pipeline
make_with_source(
  "recode.R",
  "data/0 raw_data.R",
  "data/1 data.R"
)
make_with_source(
  "merge.R",
  c("data/1 data.R", "data/0 raw_pop.R"),
  "data/2 data.R"
)

# Visualise pipeline with custom notes
show_pipeline(notes = c(
  "data/0 raw_data.R" = "Raw survey data",
  "data/0 raw_pop.R" = "Raw population data",
  "data/1 data.R" = "Survey data with recodes applied",
  "data/2 data.R" = "Survey data with demographic variables merged in"
))
}