Fetch New Hampshire special-education child-count data
Source:R/fetch_sped.R, R/source_surface_docs.R
fetch_sped.RdLoads and processes NH DOE "Statewide Census by Disability" child-count data into the canonical tidy special-education schema. The data is the state's own publication of its federal IDEA Section 618 December-1 child count (students with IEPs), reported at the state level only. Coverage:
Disability-category totals by year, 2000-2024 (the backbone series).
IDEA age bands (ages 3-5 / ages 6-21) for all disabilities, 2000-2023.
Disability x race and gender counts, 2012-2018 and 2020-2023.
Usage
fetch_sped(
end_year,
tidy = TRUE,
use_cache = TRUE,
source = NULL,
max_age_days = NULL,
refresh = FALSE
)Arguments
- end_year
School year end (e.g., 2024 = the October-1-2023 count). Run
get_available_sped_years()to see available years.- tidy
If TRUE (default), returns the long canonical schema (one row per entity x measure x disability_category x subgroup x age_group). If FALSE, returns the source-faithful wide frame.
- use_cache
If TRUE (default), uses locally cached results when available; set FALSE to force a fresh read from bundled data.
- source
Requested acquisition mode:
"package"(default) or explicit"live"where a runtime producer exists. Retained-only surfaces reject live requests; refresh their files through the documented manual harvest.- max_age_days
Maximum reusable live-cache age in elapsed 24-hour days.
- refresh
Force live retrieval. Valid only in live mode.
Value
Data frame of special-education child-count data. Tidy columns: end_year, entity flags + ids, nces_dist, nces_sch, measure, disability_category, placement_setting, subgroup, age_group, grade_level, n_students, pct, suppressed.
Details
Counts are real published values; suppressed / not-collected cells are
NA, never 0 (NH folds deafness into hearing-impairment from 2008, so
deafness is NA for 2008 onward). pct is each disability
category's share of that year's all-disabilities child count, recomputed from
real counts, and NA for every other breakdown. NH publishes no
district/school child count and no IDEA educational-environment (LRE)
placement, so placement_setting is always NA.
Examples
if (FALSE) { # \dontrun{
# 2024 child count (October-1-2023)
sped <- fetch_sped(2024)
# Statewide count of students with autism
sped |>
dplyr::filter(
disability_category == "autism", subgroup == "total",
is.na(age_group)
) |>
dplyr::select(end_year, disability_category, n_students, pct)
# Disability-category composition (share of all students with disabilities)
sped |>
dplyr::filter(subgroup == "total", is.na(age_group),
disability_category != "all_disabilities") |>
dplyr::arrange(dplyr::desc(n_students)) |>
dplyr::select(disability_category, n_students, pct)
# Wide format
fetch_sped(2024, tidy = FALSE)
} # }