Downloads and processes school and district directory data from the Mississippi Succeeds Report Card (msrc.mdek12.org). Data includes school and district contact information including administrator names, physical addresses, phone numbers, NCES IDs, accountability grades, and geographic coordinates.
Arguments
- end_year
School year end (e.g., 2024 for 2023-24). If NULL (default), uses the most recent available year.
- tidy
If TRUE (default), returns data with standardized column names and entity flags. If FALSE, returns raw API column names.
- use_cache
If TRUE (default), uses locally cached data when available. Set to FALSE to force re-download from source.
Value
Data frame with directory data containing columns:
- end_year
School year end (e.g., 2024)
- state_district_id
MDE district ID (e.g., "4820-000")
- state_school_id
MDE school ID (e.g., "4820-006"), NA for districts
- nces_id
NCES ID for cross-referencing
- district_name
Name of the school district
- school_name
Name of the school (NA for district/state rows)
- entity_type
One of "State", "District", or "School"
- contact_name
School principal or district superintendent name
- contact_email
Contact email address
- address
Physical street address
- city
City
- state
State (always "MS")
- zip
ZIP code
- accountability_grade
Accountability letter grade (A-F)
- accountability_score
Numeric accountability score
- latitude
Geographic latitude
- longitude
Geographic longitude
- csi_tsi_status
CSI/TSI/ATSI designation, if any
- is_state
TRUE for state-level row
- is_district
TRUE for district-level rows
- is_school
TRUE for school-level rows
- is_charter
TRUE for charter schools (name-based detection)
Details
Directory data is a point-in-time snapshot reflecting the current state
of the MSRC database. The end_year parameter selects the accountability
year (2017-2024 available).
Examples
if (FALSE) { # \dontrun{
# Get directory data for most recent year
dir <- fetch_directory()
# List all districts with contact info
dir |>
dplyr::filter(is_district) |>
dplyr::select(district_name, contact_name, contact_email)
# Find schools in a specific district
dir |>
dplyr::filter(is_school, grepl("Jackson", district_name)) |>
dplyr::select(school_name, contact_name, accountability_grade)
# Count schools per district
dir |>
dplyr::filter(is_school) |>
dplyr::count(district_name, sort = TRUE)
# Force fresh download (ignore cache)
dir_fresh <- fetch_directory(use_cache = FALSE)
} # }