Getting Started with vizRd
vizrd.RmdvizRd launches a Shiny visualization app from a project folder. The folder can contain configured template datasets, arbitrary tabular datasets for the generic explorer, or both.
Example project
The installed package ships a complete example project:
example_path <- system.file("extdata", "example_project", package = "vizRd")
example_path
#> [1] "/tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project"Inspect its files without launching the app:
list.files(example_path, recursive = TRUE)
#> [1] "data/dummy_alt.rds" "data/dummy_excise.rds"
#> [3] "data/excises.rds" "data/generic_sales.csv"
#> [5] "data/marlboro.rds" "data/world.gpkg"
#> [7] "vizrd.yml" "www/embed-host.html"
#> [9] "www/pdf/excises.pdf" "www/pdf/marlboro.pdf"
#> [11] "www/share-uat.html" "www/wiiw-hepa-logo-only_RGB.png"Discover datasets:
vizRd::list_datasets(example_path)
#> id
#> 1 excises
#> 2 marlboro
#> 3 dummy_alt
#> 4 dummy_excise
#> 5 generic_sales
#> file
#> 1 /tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project/data/excises.rds
#> 2 /tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project/data/marlboro.rds
#> 3 /tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project/data/dummy_alt.rds
#> 4 /tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project/data/dummy_excise.rds
#> 5 /tmp/Rtmp6oMINX/temp_libpath27393de55c1e/vizRd/extdata/example_project/data/generic_sales.csv
#> title schema
#> 1 Excise taxes on cigarettes template
#> 2 Marlboro Indices template
#> 3 dummy_alt template
#> 4 dummy_excise template
#> 5 generic_sales explorerThe example project includes configured template datasets
(excises and marlboro) and an auto-discovered
generic explorer dataset (generic_sales.csv).
Two data modes
Template dashboards use the structured iso3,
year or date, variable, and
value shape. They enable map, bars, line, scatter, and area
views.
Generic explorer mode accepts arbitrary .csv or
.rds data frames. It infers column roles, shows an overview
first, and enables chart families only when the selected columns satisfy
their contracts.
Run interactively
Launch the app from an interactive R session:
vizRd::run_app(path = example_path)Open the gallery route on a running app with ?gallery=1
to browse datasets and copy share URLs or iframe snippets. Active
dashboard states also expose Share URL,
Embed code, and Download snapshot controls in
the Actions panel.
For release UAT, the packaged example project serves
/vizrd-project/share-uat.html. The helper page previews
copied share URLs and includes preset template, generic, embed,
stale-dataset, and stale-column states.