Downloads and processes school directory data from the South Dakota Department of Education. This joins two separate SD DOE files (principal/school info and superintendent/district info) to create a combined directory with both school-level and district-level contact information.
Arguments
- end_year
Currently unused. The directory data represents the current school year. Included for API consistency with other fetch functions.
- tidy
If TRUE (default), returns data in a standardized format with consistent column names. If FALSE, returns raw column names from SD DOE.
- use_cache
If TRUE (default), uses locally cached data when available. Set to FALSE to force re-download from SD DOE.
Value
A tibble with school directory data. Columns include:
state_district_id: District identifier (e.g., "06001")state_school_id: School identifierdistrict_name: District nameschool_name: School nameentity_type: District type descriptionschool_type: School type descriptiongrades_served: Grade span (e.g., "KG05", "0912")address: Physical street addresscity: Physical address citystate: State (always "SD")zip: Physical address ZIP codephone: Principal phone numbercounty_name: Physical countyprincipal_name: Principal full name (first + last)principal_email: NA (not available from SD DOE)superintendent_name: Superintendent full name (first + last)superintendent_email: NA (not available from SD DOE)website: District website URL
Examples
if (FALSE) { # \dontrun{
# Get school directory data
dir_data <- fetch_directory()
# Get raw format (original SD DOE column names)
dir_raw <- fetch_directory(tidy = FALSE)
# Force fresh download (ignore cache)
dir_fresh <- fetch_directory(use_cache = FALSE)
# Filter to specific district
library(dplyr)
sioux_falls <- dir_data |>
filter(grepl("Sioux Falls", district_name))
} # }