Downloads and processes school and district directory data from the Colorado Department of Education. This includes all public schools and districts with contact information, addresses, and grade level information.
Arguments
- end_year
Currently unused. The directory data represents current schools and is not year-specific. 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 CDE.
- use_cache
If TRUE (default), uses locally cached data when available. Set to FALSE to force re-download from CDE.
Value
A tibble with school directory data. Columns include:
state_school_id: Combined district + school code (8 digits)state_district_id: 4-digit district codeschool_code: 4-digit school codeschool_name: School namedistrict_name: District nameschool_type: Type of school (District, School)grades_served: Low grade - High gradelow_grade: Lowest grade servedhigh_grade: Highest grade servedaddress: Physical street addresscity: Citystate: State (always "CO")zip: ZIP codephone: Phone numbercharter_status: Charter indicator (Y/N)agg_level: Aggregation level ("S" = School, "D" = District)
Details
The directory data is downloaded as Excel files from the CDE CEDAR library. School addresses and district addresses are downloaded separately and combined. This data represents the current state of Colorado schools and districts and is updated regularly by CDE.
Examples
if (FALSE) { # \dontrun{
# Get school directory data
dir_data <- fetch_directory()
# Get raw format (original CDE column names)
dir_raw <- fetch_directory(tidy = FALSE)
# Force fresh download (ignore cache)
dir_fresh <- fetch_directory(use_cache = FALSE)
# Filter to schools only
library(dplyr)
schools <- dir_data |>
filter(agg_level == "S")
# Find all schools in a district
denver_schools <- dir_data |>
filter(state_district_id == "0880", agg_level == "S")
} # }