Education

Education data: NCES data downloads, school district utilities.

Education data utilities.

Currently: - nces: NCES CCD + EDGE open data downloader/parsers (CCD Directory,

Nonfiscal, Finance F-33, school-level Directory + Nonfiscal, EDGE per-district demographics).

Future: - nces.api: keyed NCES API (when available). - state: per-state DOE files (highly variable; on-demand basis).

Submodules

NCES (National Center for Education Statistics) data utilities.

class siege_utilities.education.nces.NCESFiles[source]

Bases: object

Thin wrapper around NCES CCD + EDGE open data files.

Loads (district directory + nonfiscal + finance) per school-year + (school directory + nonfiscal) per school-year + EDGE demographics per ACS endpoint. Cached on disk after first download.

Example

files = NCESFiles() district = files.load_ccd_directory(“2022-23”) nonfiscal = files.load_ccd_nonfiscal(“2022-23”) finance = files.load_ccd_finance(“2022-23”) edge = files.load_edge_district_demographics(“2018-22”)

__init__(cache_dir=None, timeout=120)[source]
Parameters:
  • cache_dir (Path | None)

  • timeout (int)

load_ccd_directory(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_nonfiscal(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_finance(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_school_directory(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_school_nonfiscal(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_edge_district_demographics(acs_endpoint)[source]

Load EDGE per-school-district demographic estimates.

acs_endpoint is the ACS 5-year endpoint range like “2018-22”. Returns a DataFrame with LEAID + the EDGE demographic variables. Unlike CCD files, EDGE is a direct CSV (no zip).

Parameters:

acs_endpoint (str)

Return type:

pandas.DataFrame

NCES CCD + EDGE open data files — downloader + parser.

NCES publishes Common Core of Data (CCD) and Education Demographic and Geographic Estimates (EDGE) as open data files (no API key). This module covers downstream warehouse needs (e.g., socialwarehouse F):

  • CCD Directory (LEA + per-school)

  • CCD Nonfiscal Survey (enrollment + staff)

  • CCD F-33 Finance Survey (revenues + expenditures)

  • EDGE per-district demographic estimates

Lift origin: this module was first written in socialwarehouse and graduated to siege_utilities per the SU-first rule (SU#534). Downstream consumers should from siege_utilities.education.nces import NCESFiles.

class siege_utilities.education.nces.files.NCESFiles[source]

Bases: object

Thin wrapper around NCES CCD + EDGE open data files.

Loads (district directory + nonfiscal + finance) per school-year + (school directory + nonfiscal) per school-year + EDGE demographics per ACS endpoint. Cached on disk after first download.

Example

files = NCESFiles() district = files.load_ccd_directory(“2022-23”) nonfiscal = files.load_ccd_nonfiscal(“2022-23”) finance = files.load_ccd_finance(“2022-23”) edge = files.load_edge_district_demographics(“2018-22”)

__init__(cache_dir=None, timeout=120)[source]
Parameters:
  • cache_dir (Path | None)

  • timeout (int)

load_ccd_directory(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_nonfiscal(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_finance(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_school_directory(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_ccd_school_nonfiscal(school_year)[source]
Parameters:

school_year (str)

Return type:

pandas.DataFrame

load_edge_district_demographics(acs_endpoint)[source]

Load EDGE per-school-district demographic estimates.

acs_endpoint is the ACS 5-year endpoint range like “2018-22”. Returns a DataFrame with LEAID + the EDGE demographic variables. Unlike CCD files, EDGE is a direct CSV (no zip).

Parameters:

acs_endpoint (str)

Return type:

pandas.DataFrame