Schools & education

Every US public school from NCES's Common Core of Data and EDGE in Python: enrolment, teachers, locale, charter and virtual schools, free-lunch eligibility, neighbourhood poverty, and the -1, -2 and -9 codes that mean no number.

Bars of the median public school size by locale: 516 students in large suburbs, 440 in large cities, 335 in remote towns and 145 in remote rural areas. the further out, the smaller the schoollarge suburblarge cityremote townremote ruralNCES 2024-25: median students per school, 516, 440, 335 and 145

The National Center for Education Statistics keeps a record of every public school in the United States, sent each year by the state education agencies: 100,237 operating schools for 2024-25, enrolling 49,343,524 students with 3,177,662 full-time-equivalent teachers, each with its district, grades, locale, charter and virtual status, free-lunch counts and a point location from NCES's EDGE programme. It is the source behind almost every map, ranking and news story about American schools.

The guides here read the file, explain what the Common Core of Data counts and how to get it without code, map school sizes by county, compare student-teacher ratios, measure the charter share by state, map free-lunch eligibility, join neighbourhood poverty estimates and explain the locale codes. Two pages deal with the traps: counts stored as -1, -2 and -9, and online schools that put a whole state's students at one address.

🧭 Start with the concepts

The ideas the how-to guides below assume you already have.

⚙️ Then do the task

Step-by-step walkthroughs with code you can copy and adapt.

🔧 When it breaks

The errors this topic produces, with the cause explained rather than just the command.

Related topics

Subjects that keep coming up alongside this one, most overlap first.

Keep browsing

Schools & education sits in Analysis. Every topic on the site is listed on the topics index.