Skip to contents

Downloads and processes school directory data from the Missouri Department of Elementary and Secondary Education (DESE) via the Missouri GIS ArcGIS service. This includes all public schools and districts with contact information and administrator names.

Usage

fetch_directory(end_year = NULL, tidy = TRUE, use_cache = TRUE)

Arguments

end_year

Currently unused. The directory data represents current schools and is updated nightly. 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 DESE.

use_cache

If TRUE (default), uses locally cached data when available. Set to FALSE to force re-download from DESE.

Value

A tibble with school directory data. Columns include:

  • state_district_id: 6-digit county-district code (zero-padded)

  • state_school_id: School ID (county_district-building format)

  • district_name: District name

  • school_name: School/building name

  • entity_type: "school" or "district"

  • address: Street address

  • city: City

  • state: State (always "MO")

  • zip: ZIP code

  • phone: Phone number

  • county_name: County name

  • grades_served: Grade range (e.g., "PK-06")

  • superintendent_name: District superintendent name (NA for schools)

  • superintendent_email: Superintendent email (NA for schools)

  • principal_name: School principal/administrator name

  • principal_email: School email address

  • website: District website URL (NA for schools without one)

Details

The directory data is downloaded from the Missouri GIS ArcGIS REST service, which publishes DESE's school directory data. Contact information is updated nightly and school locations are updated annually.

The function downloads both school-level (building) data and district-level data, then combines them into a single data frame.

Examples

if (FALSE) { # \dontrun{
# Get school directory data
dir_data <- fetch_directory()

# Get raw format (original DESE column names)
dir_raw <- fetch_directory(tidy = FALSE)

# Force fresh download (ignore cache)
dir_fresh <- fetch_directory(use_cache = FALSE)

# Filter to Kansas City district
library(dplyr)
kc_schools <- dir_data |>
  filter(state_district_id == "048078")
} # }