Skip to contents

Downloads and processes school data from the North Carolina Department of Public Instruction (NC DPI). Provides functions for fetching enrollment data from the Statistical Profile system and transforming it into tidy format for analysis.

Main functions

fetch_enr

Fetch enrollment data for a school year

fetch_enr_multi

Fetch enrollment data for multiple years

get_available_years

List available school years

tidy_enr

Transform wide data to tidy (long) format

id_enr_aggs

Add aggregation level flags

enr_grade_aggs

Create grade-level aggregations

Cache functions

cache_status

View cached data files

clear_cache

Remove cached data files

ID System

North Carolina uses a hierarchical ID system:

  • LEA (District) codes: 3 digits (e.g., 920 = Wake County Schools)

  • School codes: 6 digits (LEA code + 3-digit school number)

Data Sources

Data is sourced from:

Format Eras

Era 1 (2006-2010)

Asian and Pacific Islander combined in one category

Era 2 (2011-present)

Seven separate race/ethnicity categories per federal standards

Known Limitations

  • Pre-2011 data combines Asian and Pacific Islander into one category

  • Some small cell sizes may be suppressed for privacy

  • Charter school data availability varies by year

Author

Maintainer: Al Martin almartin@example.com