Skip to main content

Portfolio project · R · REDCap · Quarto

REDCap starter kit. From REDCap project to quality-checked report.

This kit pulls records from REDCap with REDCapR, uses the project’s own data dictionary to drive cleaning and labelling, runs six data quality checks, and renders a status report. It is demonstrated on a fictional pregnancy cohort with synthetic data.

Read the sample report How it works Code on GitHub

Background: one stripe per week of enrolment in the sample study, brighter in busier weeks.

301participants in the sample study, all simulated
3study sites
6quality checks, most driven by the data dictionary
18 of 18problems planted on purpose, caught by the checks

It is demonstrated on the Coastal Beginnings Study, a fictional pregnancy cohort. All data are simulated. No real people are represented.

What it does

  1. Defines a realistic REDCap project. A longitudinal data dictionary with three events, required fields, range validation, branching logic, calculated fields (BMI, gestational age, a preterm flag), cross-event references, and identifier flags on dates.
  2. Pulls the data live from the REDCap API with REDCapR, or from a local REDCap-format export when no credentials are set.
  3. Cleans it using the data dictionary. Field types and labels come from the dictionary, not hard-coded rules, so the same code adapts to other projects.
  4. Runs six quality checks and writes a list of issues a study coordinator can work through.
  5. Renders a Quarto report with recruitment, follow-up, data quality, baseline characteristics, and outcome graphics.

The sample report

Preview of the Coastal Beginnings report

Coastal Beginnings Study

A data status and quality report, generated automatically from the REDCap project. It is a single self-contained file, so a study coordinator can email it or open it offline.

Read the sample report

What’s here

  • How it works: the pipeline, the six quality checks, and how to use it with a real REDCap project.
  • Sample report: the report the kit produces for the fictional Coastal Beginnings Study.
  • About the data: where the data come from, the licences, and who made this.