Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Public school and district directory records for building local school maps and enrollment-directory tools.
From source to product signal
CCD preliminary directory files list public schools with NCES IDs, addresses, and operating status. Start with the latest school-year ZIP from the files table and filter to one state. The filename changes every year, and a directory record is not a performance rating.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import io
import zipfile
import pandas as pd
import requests
url = "https://nces.ed.gov/ccd/Data/zip/ccd_sch_029_2425_w_0a_051425.zip"
response = requests.get(url, timeout=60)
response.raise_for_status()
with zipfile.ZipFile(io.BytesIO(response.content)) as archive:
table_name = next(name for name in archive.namelist() if name.lower().endswith((".csv", ".txt")))
with archive.open(table_name) as table:
schools = pd.read_csv(table, dtype=str, encoding="latin-1")
colorado = schools[schools["ST"] == "CO"].copy()
colorado["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(colorado.head(20))Test a useful signal
Test whether a CCD directory extract can power a local school finder.
National Center for Education Statistics is a government source. Last verified 2026-08-17. Temporal coverage: annual school-year directories.