glcdp discovers, inspects, downloads, and imports Global Light Commons data packages. It is designed as infrastructure for packages such as LightLogR and LightLogWeb while remaining independent of their analysis interfaces.
Installation
Install the released version from CRAN:
install.packages("glcdp")Install the development version from GitHub:
# install.packages("pak")
pak::pak("tscnlab/glc-dp-r")glcdp 1.2.0 supports GLC schemas 3.2.0, 3.1.0 and the earlier 3.0.0 through 3.0.2 schemas. Schemas 1.0.0 and 2.0.0 retain limited legacy support. Measurement files use the declared column types, factor-level order and per-file encodings.
From schema 3.1.0, a dataset can publish metadata without recordings. glc_datasets() lists these datasets and any declared recording duration, unit and contiguity. glc_metadata() gives access to reported study summary statistics. In schema 3.2.0, a device’s device_calibration_date can be a date or the literal "uncalibrated" when an applicable date is unavailable. Both values are preserved as text during metadata extraction.
packages <- glcdp::glc_packages()
melidos <- glcdp::glc_open("tscnlab/melidos-iztech-glc-dataset")
glcdp::glc_summary(melidos)
datasets <- glcdp::glc_datasets(melidos)
files <- glcdp::glc_files(melidos)
first <- files[1, ]
collection <- glcdp::glc_read(
melidos,
dataset_id = first$dataset_id,
file_group = first$file_group_id
)
light_data <- glcdp::glc_collect(collection)Remote reads use temporary session storage unless a cache directory is explicitly supplied. Persistent downloads are made only through glc_download() or an explicit cache directory.
Interactive data explorer
Install the optional application dependencies and launch the local explorer:
install.packages(c("shiny", "bslib"))
glcdp::glc_explore()The app browses passing registry revisions, summarizes package contents, and filters participants, devices, datasets, file groups, semantic terms, and source variables. The completed summary can start the larger contents load in place and reports its progress, completion, or retry action centrally. Repeated participant-specific file groups can be narrowed by device, wearing position, modality, role, state, contained variable, or semantic term. Numeric participant characteristics use range filters, and the metadata hierarchy loads complete records incrementally while the table view retains full paging. Repeated metadata fields are folded with their record counts, and large file-group, variable, and handoff inventories use paging and server-side search choices to keep browser interaction responsive. A page-level busy indicator remains visible while reactive filtering or rendering is in progress. It builds a small configurable preview before exporting an annotated R script that downloads and imports the exact selection. Package data remain on the machine running the app.
Documentation
The package website includes a complete function reference and workflow articles:
- Get started with glcdp
- Explore and hand off data with the Shiny app
- Discover and inspect data packages
- Import and download data
LightLogR-standardized data returned by glc_collect() use the dataset id as Id, retain the participant id as participant_Id, provide Datetime and file.name, and omit internal .glc_* provenance columns. The result follows the conventions used by LightLogR’s analysis and visualization functions.
