Skip to contents

Loads and processes NH DOE statewide assessment results. Covers NECAP (2009-2014) and Smarter Balanced / NH SAS (2015-2025) reading, math, and science proficiency at state, district, and school level. 2020 is absent (COVID assessment waiver).

Usage

fetch_assessment(
  end_year,
  tidy = TRUE,
  use_cache = TRUE,
  source = NULL,
  max_age_days = NULL,
  refresh = FALSE
)

Arguments

end_year

School year end (e.g., 2024 = 2023-24 school year). Run get_available_assessment_years() to see available years.

tidy

If TRUE (default), returns tidy output with standard column ordering. If FALSE, returns the processed 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 assessment results with columns including end_year, type, district/school ids and names, subject, grade, subgroup, n_tested (NA), n_tested_lower, n_tested_upper, pct_level1-4, pct_proficient, pct_participate, avg_score, mean_sgp, assessment_era, and is_state / is_district / is_school flags.

Details

NH DOE reports student counts only as 5-wide bands (e.g. "35 - 40"), so n_tested is always NA; the band bounds are in n_tested_lower and n_tested_upper. Suppressed percentages and scores are NA, never 0. The 2009-2014 NECAP regime is NOT comparable to the 2015+ Smarter Balanced / NH SAS regime; the assessment_era column flags this boundary.

Examples

if (FALSE) { # \dontrun{
# 2024 results (2023-24 school year)
asmt <- fetch_assessment(2024)

# State math proficiency, all students, all grades
asmt |>
  dplyr::filter(
    is_state, subject == "math", grade == "TOTAL",
    subgroup == "total_enrollment"
  ) |>
  dplyr::select(end_year, subject, pct_proficient, pct_participate)

# Force a fresh read (ignore cache)
asmt_fresh <- fetch_assessment(2024, use_cache = FALSE)
} # }