Understanding NM PED Data Availability
Source:vignettes/data_availability.Rmd
data_availability.RmdData Sources Overview
The nmschooldata package fetches enrollment data from
the New Mexico Public Education Department (NM PED). The data comes from
two main sources with different structures:
- 40-Day Enrollment Reports: Collected on the second Wednesday of October (approximately 40 school days into the year)
- 80-Day Enrollment Reports: Collected on December 1st (approximately 80 school days into the year)
Data Availability by Year
Era 1: 2016-2018 (Enrollment by Grade)
These older files contain enrollment by grade only (no demographic subgroups):
- District-level and school-level data
- Individual grade breakdowns (PK through 12)
- Total enrollment
- NO demographic subgroups (race, gender, special populations)
Era 2a: 2019-2023 (40-Day Subgroup Data)
These files contain demographic subgroups at the school level:
- School-level data only (no district aggregates in raw files)
- 13 demographic subgroups
- TOTAL enrollment only (no individual grade breakdowns)
- State totals are calculated by the package from school-level data
# Era 2a data structure
enr_2023 <- fetch_enr(2023, use_cache = TRUE)
# All 13 subgroups available
unique(enr_2023$subgroup)
#> [1] "total" "white" "black" "hispanic" "asian" "native_american"
#> [7] "pacific_islander" "multiracial" "male" "female" "special_ed"
#> [13] "ell" "econ_disadv"
# Only TOTAL grade level
unique(enr_2023$grade_level)
#> [1] "TOTAL"Era 2b: 2024 (80-Day Data Only)
Important: The 40-Day subgroup file for 2023-24 has not been published by NM PED. Only 80-Day data is available:
- District-level data only (no school breakdowns)
- Individual grade breakdowns (PK through 12)
- NO demographic subgroups
- The package displays a warning when fetching 2024 data
# 2024 data structure (shows a warning message)
enr_2024 <- fetch_enr(2024, use_cache = TRUE)
#> Note: 2024 (SY 2023-24) only has 80-Day enrollment data available.
#> 40-Day subgroup data has not been published by NM PED.
# Only 'total' subgroup available
unique(enr_2024$subgroup)
#> [1] "total"
# But all grade levels are present
unique(enr_2024$grade_level)
#> [1] "TOTAL" "PK" "K" "01" "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" "12"Summary Table
| Years | Source | Aggregation Levels | Demographics | Grade Breakdown |
|---|---|---|---|---|
| 2016-2018 | 40-Day enrollment | State, District, School | None | PK through 12 |
| 2019-2023 | 40-Day subgroup | State, School | 13 subgroups | TOTAL only |
| 2024 | 80-Day only | State, District | None | PK through 12 |
| 2025 | 40-Day subgroup | State, District, School | 13 subgroups | TOTAL only |
Subgroups Available (2019-2023, 2025)
When demographic data is available, the following 13 subgroups are included:
Race/Ethnicity: - white -
Caucasian/White students - black - Black or African
American students - hispanic - Hispanic/Latino students -
asian - Asian students - native_american -
American Indian/Alaska Native students - pacific_islander -
Native Hawaiian/Pacific Islander students - multiracial -
Two or more races
Gender: - male -
female
Special Populations: - special_ed -
Students with disabilities (IEP) - ell - English Language
Learners - econ_disadv - Economically Disadvantaged
(Free/Reduced Lunch eligible)
Tips for Working with the Data
Getting State Totals Across Years
# For consistent state totals, use years with 40-Day data
enr <- fetch_enr_multi(c(2019:2023, 2025, use_cache = TRUE))
state_totals <- enr |>
filter(is_state, subgroup == "total", grade_level == "TOTAL") |>
select(end_year, n_students)
state_totalsGetting Demographic Trends (Years with Subgroups)
# Demographics only available for 2019-2023, 2025
enr <- fetch_enr_multi(c(2019:2023, 2025, use_cache = TRUE))
hispanic_trend <- enr |>
filter(is_state, subgroup == "hispanic", grade_level == "TOTAL") |>
select(end_year, n_students, pct)
hispanic_trendData Quality Caveats
Multiracial reclassification (2025)
The multiracial subgroup went from 0 students
(2019-2023) to 7,221 in 2025. This is a reporting/classification change,
not real population growth. NM PED began reporting multiracial as a
separate category in 2025. This inflates apparent declines in other
race/ethnicity groups – Hispanic (-6%), White (-22%), and Black (-22%)
drops between 2023 and 2025 are partly reclassification effects. Any
demographic trend analysis that includes 2025 must account for this.
Econ_disadv methodology change
The economically disadvantaged rate dropped from 77.7% (2023) to
37.1% (2025). This is almost certainly a definition change (likely a
transition from Free/Reduced Lunch eligibility to CEP/direct
certification). Historical comparisons of econ_disadv
across this break are invalid. Do not report econ_disadv trends spanning
2023-2025 without noting the methodology change.
District name changes (2023 to 2024)
Several districts were renamed between 2023-24 and 2024-25:
- CENTRAL CONS. → CENTRAL
- HATCH → HATCH VALLEY
- FT SUMNER → FORT SUMNER
- and others
This creates apparent appearances/disappearances in district-level
longitudinal analysis. Use district_id for reliable
tracking across years.
Charter school identification
The is_charter flag is derived from NM PED’s official
school directory, which classifies schools by location_type
(Charter vs Public) and districts by district_type (State
Charter vs State District). This identifies 98 charter schools (58
state-chartered, 42 locally-authorized) enrolling ~10.8% of students.
State-chartered schools operate as their own LEA with district codes in
the 500+ range; locally-authorized charters are schools within their
authorizing traditional district.
Why This Matters
Understanding data availability is crucial for:
- Trend Analysis: Only compare years with similar data structures
- Demographic Analysis: Must use 2019-2023 or 2025 for race/ethnicity data
- Grade Analysis: Must use 2016-2018 or 2024 for individual grade data
- Research Planning: Know what questions can be answered with available data
Data Source
All data comes from the New Mexico Public Education Department (NM PED):
sessionInfo()
#> R version 4.5.2 (2025-10-31)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
#> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
#> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] dplyr_1.2.0 nmschooldata_0.1.0
#>
#> loaded via a namespace (and not attached):
#> [1] vctrs_0.7.1 cli_3.6.5 knitr_1.51 rlang_1.1.7
#> [5] xfun_0.56 generics_0.1.4 textshaping_1.0.5 jsonlite_2.0.0
#> [9] glue_1.8.0 htmltools_0.5.9 ragg_1.5.1 sass_0.4.10
#> [13] rmarkdown_2.30 tibble_3.3.1 evaluate_1.0.5 jquerylib_0.1.4
#> [17] fastmap_1.2.0 yaml_2.3.12 lifecycle_1.0.5 compiler_4.5.2
#> [21] fs_1.6.7 pkgconfig_2.0.3 systemfonts_1.3.2 digest_0.6.39
#> [25] R6_2.6.1 tidyselect_1.2.1 pillar_1.11.1 magrittr_2.0.4
#> [29] bslib_0.10.0 tools_4.5.2 pkgdown_2.2.0 cachem_1.1.0
#> [33] desc_1.4.3