The function reads already-generated CSV reports, starts from Part 5 day summary
as the base table, and left-joins additional fields from:
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.