Workflow Overview

Getting Started with cohortED

This page outlines a basic workflow to help you get started using the cohortED package to analyze student mobility, cohort persistence, and longitudinal performance trends.

This package is designed for education analysts who want reproducible, transparent, and interpretable reporting tools.


1. Prepare Your Dataset

To use the cohortED package, your dataset must include a few key fields. These are used to assign students to cohorts and track grade-level progress over time.

Required Fields

These fields are essential for all functions to operate correctly:

  • ID: A unique student identifier (e.g., state or district student ID).
  • YEAR: The academic year. Accepts numeric values (e.g., 2023) or academic year formats (e.g., "2023–24" or "2023_2024").
  • GRADE: The student’s grade level. Accepts numeric values (e.g., 3, 5, 11) or character values (e.g., "K", "PK", or "PREK").
Recommended Fields

Including these fields improves the utility of cohort tracking, reporting, and analysis:

  • Assessment-related, such as CONTENT_AREA, SCALE_SCORE, ACHIEVEMENT_LEVEL, PROFICIENCY_LEVEL, etc.
  • Demographics, such as GENDER, ETHNICITY, ELL_STATUS, IEP_STATUS, etc.
Example
library(cohortED)
head(math[, c("ID", "YEAR", "GRADE", "CONTENT_AREA", "ACHIEVEMENT_LEVEL")])
       ID      YEAR GRADE CONTENT_AREA    ACHIEVEMENT_LEVEL
1 1000372 2021_2022     3  MATHEMATICS           Proficient
2 1000372 2022_2023     4  MATHEMATICS           Proficient
3 1000372 2023_2024     5  MATHEMATICS Partially Proficient
4 1000373 2019_2020    10  MATHEMATICS Partially Proficient
5 1000429 2019_2020     9  MATHEMATICS       Unsatisfactory
6 1000452 2019_2020     5  MATHEMATICS Partially Proficient

2. Wrangle the Data

Use helper functions to standardize and reshaped your data.

Standardize with Helper Functions
  • make_ functions extract new columns or status labels
  • summarize_ functions condense student-level records

See Helper Functions.

4. Analyze Cohorts or Mobility

Use core functions to assign students to cohorts or compare performance across groups.

Analyze Student Cohorts

Functions like analyze_student_cohorts() and analyze_cohort_persistence() help organize student data into entry-based cohorts and track how those cohorts persist across years and grade levels.

They return cleaned datasets, summary tables, and visual components that support cohort-based reporting.

Compare Mobility Groups

Functions like compare_achievement_mobility() and compare_mobility_counts() summarize performance and enrollment trends across mobility groups such as Stay, Join, and Leave.

These are useful for identifying subgroup differences and are often paired with reporting or plotting functions.

See Analysis Functions

5. Generate Reports

Turn your results into narrative-ready summaries for stakeholders.

From Results to Narrative

report_ functions produce clear summaries of key trends, often written in plain language for non-technical audiences. These outputs are ideal for:

  • Presentations to school boards or agency staff
  • Embedding in Quarto reports
  • Copy/paste into briefs or memos
Built-In Guidance

Some report_ and analyze_ functions also offer:

  • Recommendations for which plots or tables to include
  • Observations of notable trends (e.g., performance gaps, grade-level transitions)
  • Suggestions for further exploration

See Reporting Functions

6. Use Definitions for Clarity

After your report is built, you can enhance clarity and communication by adding optional, but valuable, stylized content:

Definitions

Use the built-in definitions object to include consistent terminology explanations in your reports.

See Definitions for a full list.

Badging and Icons

Reports and websites built with Quarto can include:

  • Custom logos
  • Source badges (e.g., data year or confidentiality level)
  • GitHub or RStudio icons