Learn R Programming

GGIR (version 3.3-8)

write_dashboard_parquet: Write consolidated dashboard Parquet output

Description

Creates a single dashboard-ready Parquet file by combining GGIR summary outputs and attaching nested epoch-level time series by day.

Usage

write_dashboard_parquet(
  metadatadir = c(),
  params_output = c(),
  params_general = c(),
  params_phyact = c(),
  verbose = TRUE
)

Value

Invisibly returns the written Parquet file path, or NULL (invisibly) if export is skipped because required data are missing. The generated Parquet file can be opened directly in the GGIR Web Dashboard:

https://wadpac.github.io/ggir-web-dashboard/

Arguments

metadatadir

Directory that holds a folder 'meta' and inside this a folder 'ms5.outraw' which contains the milestone data produced by g.part5. The folder structure is normally created by g.part5 and GGIR will recognise what the value of metadatadir is.

params_output

See details in GGIR.

params_general

See details in GGIR.

params_phyact

See details in GGIR.

verbose

See details in GGIR.

Author

Samuel Timileyin Afolabi <samuelafolabimails@gmail.com>

Details

The function reads already-generated CSV reports, starts from Part 5 day summary as the base table, and left-joins additional fields from:

  • Part 4 night summary

  • Part 2 day summary

  • Part 2 participant summary

  • quality-control report

It then calls build_epoch_lists_by_day to construct a nested epochs list-column and merges that into the day-level table by ID and calendar_date.

Column names are cleaned for SQL-friendly use, common columns are type-cast, and Parquet key-value metadata is embedded (variable definitions, thresholds, behavioral-code mapping, acceleration metric, and estimated epoch length).

Output filename is ID-based for single-participant exports and falls back to a multi-participant name otherwise.

The generated Parquet file can be opened directly in the GGIR Web Dashboard (https://wadpac.github.io/ggir-web-dashboard/), where processing happens entirely in the browser.

See Also

GGIR, write_epoch_parquet, build_epoch_table

Examples

Run this code
if (FALSE) {
write_dashboard_parquet(
  metadatadir = "path/to/output_run/output_test_run",
  params_output = list(save_dashboard_parquet = TRUE),
  params_general = list(desiredtz = "", acc.metric = "ENMO"),
  params_phyact = list(part6_threshold_combi = "40_100_400"),
  verbose = TRUE
)
}

Run the code above in your browser using DataLab