NCES Locale Codes Explained: City, Suburb, Town and Rural Schools
On this page
Problem statement
Every school in NCES's data carries a locale code, ULOCALE, such as "21-Suburb: Large" or "43-Rural: Remote". It is how school statistics separate city, suburban, town and rural schools, and it is not what most people mean by those words. The first digit is the type; the second is a size for cities and suburbs and a distance for towns and rural areas, measured from the Census Bureau's 2020 urban areas. This page sets out the twelve classes from NCES's definitions, counts the schools and students in each, and shows how a single county can hold several locales.
Quick answer
Split the code from its label and count schools, students and the median school size in each class:
loc = sch.ULOCALE.str.split("-", n=1, expand=True).rename(columns={0: "code", 1: "locale"})
t = sch.assign(**loc).groupby(["code", "locale"]).agg(schools=("NCESSCH", "size"), students=("TOTAL", "sum"), median_size=("TOTAL", "median"))
print(t.astype(int).to_string())
schools students median_size
code locale
11 City: Large 15236 8237938 440
12 City: Mid-size 6200 3436000 454
13 City: Small 6658 3584219 435
21 Suburb: Large 26207 16596769 516
22 Suburb: Mid-size 2907 1626298 481
23 Suburb: Small 1743 856749 424
31 Town: Fringe 3100 1555378 451
32 Town: Distant 5329 2247943 397
33 Town: Remote 3265 1216303 335
41 Rural: Fringe 9612 4931957 442
42 Rural: Distant 11781 3536023 266
43 Rural: Remote 8199 1517947 145
Large suburbs, code 21, hold the most schools, 26,207, and the most students, 16,596,769, a third of the country's. Large cities have 15,236 schools and rural distant areas 11,781. The median school is largest in large suburbs, 516 students, and smallest in remote rural areas, 145, little more than a quarter of the suburban size.
Type, size and distance
1. Four types, twelve codes
sch["type"] = sch.ULOCALE.str[3:].str.split(":").str[0]
s = sch.groupby("type").agg(schools=("NCESSCH", "size"), students=("TOTAL", "sum"))
print((s / s.sum()).round(3).to_string())
schools students
type
City 0.280 0.309
Rural 0.295 0.202
Suburb 0.308 0.387
Town 0.117 0.102
The first digit is the type. A city (1) is territory inside a principal city of an urban area of 50,000 people or more; suburb (2) is the rest of such an urban area. Their second digit is the size: large means a principal city or urban area of 250,000 or more, mid-size 100,000 to 250,000, and small below that. A town (3) is an urban area of under 50,000 people, and rural (4) is territory outside every urban area; their second digit is distance. By type, suburbs have 30.8% of schools and 38.7% of students, cities 28.0% and 30.9%, and rural areas 29.5% of schools but only 20.2% of students.
2. Distance decides town and rural
for k in ["41", "42", "43"]:
d = sch[sch.ULOCALE.str.startswith(k)]
print(k, d.ULOCALE.iloc[0][3:], f"schools {len(d):,}, median students {d.TOTAL.median():.0f}, under 100 students {(d.TOTAL < 100).mean():.1%}")
41 Rural: Fringe schools 9,612, median students 442, under 100 students 10.7%
42 Rural: Distant schools 11,781, median students 266, under 100 students 14.6%
43 Rural: Remote schools 8,199, median students 145, under 100 students 36.2%
For rural areas, fringe means within 5 miles of an urban area of 50,000 or more, or within 2.5 miles of a smaller one; distant means 5 to 25 miles, or 2.5 to 10 from a smaller one; remote means further than both. The distance shows in the schools. Rural fringe schools have a median of 442 students, close to the national figure, and 10.7% have under 100. In remote rural areas the median is 145 and 36.2% of schools have fewer than 100 students. Towns follow the same rule at 10 and 35 miles.
3. States by their rural share
st = sch.groupby("LSTATE").apply(lambda d: pd.Series({"rural_schools": d.type.eq("Rural").mean(), "rural_students": d.loc[d.type.eq("Rural"), "TOTAL"].sum() / d.TOTAL.sum()}))
print(st.sort_values("rural_students", ascending=False).head(6).round(3).to_string())
print(st.sort_values("rural_students").head(4).round(3).to_string())
rural_schools rural_students
LSTATE
VT 0.739 0.620
MS 0.599 0.558
ME 0.669 0.548
WV 0.567 0.485
SD 0.746 0.428
AL 0.471 0.426
rural_schools rural_students
LSTATE
DC 0.000 0.000
CA 0.129 0.076
PR 0.095 0.078
NV 0.190 0.081
Vermont is the most rural state by students, with 62.0% in rural schools, then Mississippi, Maine, West Virginia, South Dakota and Alabama. South Dakota has the highest share of rural schools, 74.6%, but only 42.8% of students, because its rural schools are small. At the other end, DC has none, and California, Puerto Rico and Nevada have under 10% of their students in rural schools.
One county, several locales
The data used on this page
NCES's Public School Characteristics layer from the Education Demographic and Geographic Estimates (EDGE) program: the 2024-25 Common Core of Data on EDGE's school points, every record of its ArcGIS service, downloaded on 28 October 2026 and saved on this site, because the "Current" layer is replaced each school year. Public domain. Counts are headcounts reported by state education agencies; teachers are full-time equivalents.
from pathlib import Path
import zipfile
import geopandas as gpd
import numpy as np
import pandas as pd
import requests
Path("data").mkdir(exist_ok=True)
# NCES EDGE "Public School Characteristics" for 2024-25 (the Common Core of Data on EDGE's school points), EDGE's school
# neighborhood poverty estimates for 2021-22, and the Census Bureau's 2024 counties and states. Saved 28 October 2026:
# the "Current" layers are replaced every school year.
# Live: https://services1.arcgis.com/Ua5sjt3LWTPigjyD/arcgis/rest/services/School_Characteristics_Current/FeatureServer/1
ARCHIVE = "nces-schools-2026-10-28.zip"
if not Path(f"data/{ARCHIVE}").exists():
Path(f"data/{ARCHIVE}").write_bytes(requests.get(f"https://data.spatialworkflow.io/{ARCHIVE}", timeout=600).content)
Z = zipfile.ZipFile(f"data/{ARCHIVE}")
sch = pd.read_csv(Z.open("school-characteristics-2024-25.csv"), dtype={"NCESSCH": str, "LEAID": str, "CNTY": str, "LZIP": str, "LSTREET2": str})
for f in ["cb_2024_us_county_20m.zip", "cb_2024_us_state_20m.zip"]:
Path(f"data/{f}").write_bytes(Z.read(f))
print(f"NCES public schools 2024-25: {len(sch):,} records")
sch["LSTATE"] = sch.LSTATE.str.strip() # stored padded to three characters
NUM = ["TOTAL", "FTE", "STUTERATIO", "TOTFRL", "FRELCH", "REDLCH", "DIRECTCERT", "AM", "AS_", "BL", "HP", "HI", "TR", "WH"]
sch[NUM] = sch[NUM].where(sch[NUM] >= 0) # -1 missing, -2 not applicable, -9 below quality standards
sch = sch[sch.SY_STATUS_TEXT.isin(["Open", "New", "Reopened", "Added", "Changed Boundary/Agency"])]
print(f"operating schools: {len(sch):,}; students: {sch.TOTAL.sum():,.0f}")
NCES public schools 2024-25: 101,110 records
operating schools: 100,237; students: 49,343,524
Example 1: one county, several locales
k = sch[sch.CNTY == "08031"]
print(k.ULOCALE.value_counts().to_string())
m = sch[sch.CNTY == "30029"]
print(m.ULOCALE.value_counts().to_string())
ULOCALE
11-City: Large 199
41-Rural: Fringe 1
ULOCALE
33-Town: Remote 19
42-Rural: Distant 15
43-Rural: Remote 9
41-Rural: Fringe 5
Locale belongs to the school's point, not to its county. Denver's schools are all large-city schools except one, while Flathead County, Montana, mixes 19 remote-town schools with rural schools at all three distances. A county-level urban-rural label, such as the USDA's, will disagree with the locale codes for many schools, and the codes are the better guide to the school's surroundings.
Internal links
- Students per school by county β rurality and school size on a map
- School neighbourhood poverty β poverty by locale
- Charter schools by state β a sector that is mostly urban
- The Common Core of Data explained β the rest of the record, and getting the data without code