Automatic Codebook and Tracking for 'Spark' and 'dplyr' Pipelines
Overview
Wraps 'dplyr' verbs (mutate, summarise, filter) to automatically capture variable metadata (type, source columns, categories, and source code), producing a codebook and eligibility tracking table with zero manual documentation. Works with both 'sparklyr' (tbl_spark) and local data frames. Adds big-data optimizations (caching, assume-unique counting, checkpointing) and a standardized report module with an eligibility flowchart, editable codebook export (HTML, DOCX, XLSX), and cross-sectional or longitudinal variable inspection. The eligibility flowchart follows the CONSORT statement (Schulz, Altman and Moher (2010) doi:10.1136/bmj.c332) and the reporting of observational cohort studies follows the STROBE recommendations (von Elm and others (2007) doi:10.1371/journal.pmed.0040296).
- Initial CRAN release.
- Core API:
auto_mutate(),auto_summarise(),auto_filter()wrap dplyr verbs and register variable metadata (type, source columns, categories, source code) automatically. - Manual registration via
cb_register(); codebook accessors viacb_get(),cb_reset(),cb_render(),cb_export()(HTML, CSV, DOCX, XLSX). - Eligibility tracking:
track_step(),track_get(),track_render(),track_export(). - CONSORT-style flow tree:
track_split(),track_outcomes(),flow_table(),flow_get(),flow_reset(). flow_diagram()draws a publication-ready CONSORT-style flowchart (aggplotobject) from the captured eligibility steps and the flow tree: a vertical trunk (cohort baseline, aggregated exclusions box, eligible cohort), one column per subgroup, and outcome boxes stacked beneath each subgroup. The standardized report embeds it automatically.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
flow_diagram_export()saves that flowchart by file extension: raster (.png,.jpg,.tiff), vector (.pdf,.svg,.eps), an.emfmetafile editable in Word, a.docxdocument with the flowchart embedded as a vector image, or a.pptxslide whose boxes and labels are fully editable PowerPoint shapes.generate_report()now also writesflowchart.docxalongside the report.- Big-data optimizations for sparklyr (
tbl_spark):cb_checkpoint(), per-callcacheandassume_unique, session defaults viacb_set_verbose()andcb_set_default_cache(). - Standardized HTML report via
generate_report(), with eligibility flowchart, editable codebook export, and cross-sectional or longitudinal variable inspection.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-06-09
Documentation
- Help pages
- 26 (1 internal)includes a package overview page
- Examples that run
- 60%3 run in a plain check (1 of them under a condition) · 2 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 20%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
Stars over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/patriciafortesm/autocodebook on 2026-10-22.
Dependencies
Code & Tests
People & History
- 0.1.0Latest2026-06-08 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-06-08
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 465 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("autocodebook")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.