Downloads and processes school directory data from Delaware's Open Data Portal. This includes all public schools and districts with contact information and location data.
Arguments
- end_year
School year end (2023-24 = 2024). If NULL (default), returns the most recent year available. Valid values are 2015-2025.
- tidy
If TRUE (default), returns data in a standardized format with consistent column names. If FALSE, returns raw column names from the portal.
- use_cache
If TRUE (default), uses locally cached data when available. Set to FALSE to force re-download.
Value
A tibble with school directory data. When tidy=TRUE, includes columns:
- end_year
School year
- state_school_id
School code from Delaware DOE
- state_district_id
District code from Delaware DOE
- nces_school_id
Always NA (not available in source)
- nces_district_id
Always NA (not available in source)
- school_name
School/organization name
- district_name
District name
- school_type
Type of school (e.g., "PUBLIC", "Not Applicable")
- grades_served
Grade range served (e.g., "K-05", "PK-12")
- address
Street address
- city
City
- state
State (always "DE")
- zip
ZIP code
- county
County name
- latitude
Geographic latitude
- longitude
Geographic longitude
- phone
Always NA (not available in source)
- principal_name
Always NA (not available in source)
- principal_email
Always NA (not available in source)
- superintendent_name
Always NA (not available in source)
- superintendent_email
Always NA (not available in source)
Details
The directory data is downloaded from Delaware's Open Data Portal via the Socrata API. This dataset includes active education organizations within the Delaware public education system.
Note
The Delaware Open Data Portal does not include:
NCES IDs (school or district)
Phone numbers
Principal names or emails
Superintendent names or emails
These fields are included in the output for schema compatibility but are set to NA.
Examples
if (FALSE) { # \dontrun{
# Get most recent school directory data
dir_data <- fetch_directory()
# Get directory for specific year
dir_2024 <- fetch_directory(2024)
# Get raw format (original column names)
dir_raw <- fetch_directory(tidy = FALSE)
# Force fresh download (ignore cache)
dir_fresh <- fetch_directory(use_cache = FALSE)
# Filter to schools only (exclude districts)
library(dplyr)
schools <- dir_data |>
filter(state_school_id != "0")
} # }