Skip to contents

Generic explorer mode is for arbitrary tabular data that does not use the template dashboard schema. Drop a .csv or .rds data frame into data/ and vizRd creates an overview first.

Shipped generic data

The example project includes generic_sales.csv:

example_path <- system.file("extdata", "example_project", package = "vizRd")
generic_path <- file.path(example_path, "data", "generic_sales.csv")
read.csv(generic_path, nrows = 3, check.names = FALSE)
#>         date region product units revenue discounted           notes
#> 1 2025-01-01  North Starter    12   240.0      FALSE     Launch week
#> 2 2025-01-02  South Starter     8   160.0       TRUE  Intro discount
#> 3 2025-01-03   East     Pro     5   375.5      FALSE Channel partner

This file has dates, regions, products, numeric measures, logical-like values, and missing notes. It is intentionally not template-shaped.

Role inference

Role inference classifies columns as numeric, categorical, date/time, logical, text, or unknown. The explorer preserves raw column names and records labels, confidence, reasons, missingness, distinct counts, and deterministic preview rows.

This role inference step is deterministic so the same generic_sales.csv columns receive the same roles across sessions.

ds <- vizRd::load_dataset("generic_sales", example_path)
ds$schema$type
#> [1] "explorer"
ds$explorer$columns[, c("name", "role", "confidence", "reason")]
#>         name        role confidence                                 reason
#> 1       date    datetime       high         Column uses a date/time class.
#> 2     region categorical     medium Text has low cardinality for grouping.
#> 3    product categorical     medium Text has low cardinality for grouping.
#> 4      units     numeric       high            Column uses a numeric type.
#> 5    revenue     numeric       high            Column uses a numeric type.
#> 6 discounted     logical       high Column uses logical TRUE/FALSE values.
#> 7      notes categorical     medium Text has low cardinality for grouping.

Overview first

Explorer datasets open on an overview so users can inspect row counts, column roles, warnings, and a preview before choosing a chart. Empty, zero-column, large, or high-cardinality data is reported through structured warnings rather than blank output.

Generic chart families

Chart eligibility is strict and column-driven. The app enables charts when the selected columns satisfy each contract and gives compact invalid reasons when they do not.

Common labels include:

  • Histogram for one numeric column
  • Count for categorical frequency
  • Scatter for two numeric columns
  • Aggregate for numeric-by-category summaries
  • Time series for date/time trends
  • Boxplot for numeric-by-category comparison
  • Missingness for missing-value overview

For documentation tests and users scanning quickly, the main pairwise and date families are scatter and timeseries-style trends.

Scatter and time series charts use deterministic limits for large data so CRAN examples and tests stay reproducible; the same eligibility path covers timeseries-style date trends.

Time resolution and aggregation

RDS data retain Date versus POSIXct types. Three hourly observations stay three distinct timestamps, including across a daylight-saving transition. Text timestamps accept ISO dates/times and numeric UTC offsets; their display time zone is UTC. Unknown date text does not prevent loading generic data.

Time series expose mean, sum, and count aggregation, with observed timestamps, day, week (Monday start), and month intervals. Mean and observed timestamps are the defaults. Count includes only rows with a valid timestamp, group, and non-missing finite numeric value. Calendar intervals use the original R timestamp’s time zone. The plot subtitle and shared URL record these choices.

vizRd::build_share_url(
  "./", "generic_sales",
  chart = "timeseries", numeric = "revenue", datetime = "date",
  aggregation = "sum", time_grain = "month"
)
#> [1] "./?dataset=generic_sales&chart=timeseries&numeric=revenue&datetime=date&aggregation=sum&time_grain=month"

Top-N charts keep literal Other values distinct from the generated group. When labels would collide, the generated group receives an unambiguous label such as Other (grouped). Raw source data are not renamed.