Compare Census tract commuting and vehicle availability in Python
Compare commute modes, travel-time shares and household vehicle availability with explicit populations and uncertainty.
The example and sample data
Suppose you are comparing residential areas for a planning or housing brief. How many residents work from home? Among those who travel to work, how common are trips of at least 30 minutes? How many households have no vehicle available? These questions use different populations.
Download tract_commuting.csv below. It contains three genuine tracts in Wake County, North Carolina, with all 70 fields from the purchased summary file unchanged. The same tract identifiers appear in the selected list in the Python code below. These are illustrative selections, not a ranking or a representative national sample. No data were invented.
The full $29 edition covers 85,382 tracts across the 50 states, DC and Puerto Rico. Seven CSVs include all commuting modes, twelve travel-time categories, household vehicle detail, original Census values and coverage records. Review the full commuting download.
Code example
Save the sample in your working directory. This code runs in a notebook cell, IPython or a Python script using the standard library. Keep the eleven-character GEOIDs as text.
Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.
import csv
from pathlib import Path
# Genuine Wake County tracts, shared with the tract housing guide.
selected = ["37183050100", "37183050300", "37183050400"]
with Path("tract_commuting.csv").open(newline="", encoding="utf-8") as f:
rows = {r["tract_geoid"]: r for r in csv.DictReader(f) if r["tract_geoid"] in selected}
assert set(rows) == set(selected), "A selected tract is missing"
results = []
for key in selected:
r = rows[key]
for field in ("worked_from_home_pct", "commute_30plus_pct", "no_vehicle_households_pct"):
assert r[field + "_status"] == "calculated", (key, field, r[field + "_status"])
assert r[field + "_moe_90"] != "", (key, field, "uncertainty unavailable")
result = {"tract_geoid": key, "workers": r["workers"], "commuters": r["commuters"],
"households": r["households"], "worked_from_home_pct": r["worked_from_home_pct"],
"commute_30plus_pct": r["commute_30plus_pct"],
"commute_30plus_pct_moe_90": r["commute_30plus_pct_moe_90"],
"no_vehicle_households_pct": r["no_vehicle_households_pct"]}
results.append(result)
print(f"{key}: {r['workers']} workers; {r['commuters']} commuters; {r['households']} households")
print(f" Worked from home: {float(r['worked_from_home_pct']):.1f}% of workers")
print(f" Commute 30+ minutes: {float(r['commute_30plus_pct']):.1f}% of commuters "
f"(90% MOE ±{float(r['commute_30plus_pct_moe_90']):.1f} percentage points)")
print(f" No vehicle available: {float(r['no_vehicle_households_pct']):.1f}% of households")
Analysis of the output
37183050100: 3579 workers; 1926 commuters; 3374 households
Worked from home: 46.2% of workers
Commute 30+ minutes: 32.9% of commuters (90% MOE ±12.3 percentage points)
No vehicle available: 7.8% of households
37183050300: 2634 workers; 1349 commuters; 2332 households
Worked from home: 48.8% of workers
Commute 30+ minutes: 24.0% of commuters (90% MOE ±10.8 percentage points)
No vehicle available: 9.2% of households
37183050400: 936 workers; 689 commuters; 838 households
Worked from home: 26.4% of workers
Commute 30+ minutes: 16.1% of commuters (90% MOE ±7.1 percentage points)
No vehicle available: 8.9% of households
In tract 501, Census estimates 3,579 workers, of whom 46.2% worked from home. The travel-time denominator is the remaining 1,926 commuters: an estimated 32.9% had a one-way trip of at least 30 minutes. Dividing that long-commute count by all workers would answer a different question.
Tract 503 has an estimated 48.8% working from home and 24.0% of commuters traveling at least 30 minutes. The commute-share margins of error are ±12.3 and ±10.8 percentage points for tracts 501 and 503. The estimates alone do not establish a statistically significant difference. These approximate 90% margins should travel with the comparison.
The no-vehicle measure uses households, not workers. For tract 501 the denominator is 3,374 households, and 7.8% had no vehicle available. This can inform a description of local conditions, but does not establish unmet transportation need or transit quality. Work-from-home figures describe the reported usual means during the survey reference week; they do not measure how often hybrid workers stay home.
The figures describe the 2020–2024 five-year period. They are not current traffic conditions, five annual readings or individual household records.
Using the full dataset
Extract the purchased archive and replace the sample with the full tract_commuting.csv. The code runs unchanged; edit selected for your own locations. Join on tract_geoid using compatible 2024 tract geography. The summary has one row per tract, with county and state identifiers.
commute_modes.csv has nine non-overlapping categories, including carpooling, public transit, walking, cycling and working from home. Public transit excludes taxi/ride-hailing, which has a separate category. travel_time.csv supplies twelve time bins for workers who did not work from home. The summary’s 60-minute-plus measure is part of its 30-minute-plus measure; do not add the two.
vehicle_availability.csv supplies five vehicle categories for all households and for each of four household-size groups. Select one household-size group before a join. The all-household total overlaps those groups. Each detail row includes its count, denominator and share with uncertainty and original source-variable names.
source_cells.csv preserves all 64 original estimate/MOE pairs per tract, annotations and labels. Stream this large file or load it into a database. County coverage, source accounting and dictionaries explain the remaining files. Missing estimates and missing uncertainty have separate statuses; a blank or zero denominator never becomes a zero percent.
For a broader comparison, add the tract demographic and income reference and tract housing costs reference on the same 2024 GEOIDs and 2020–2024 period. The housing guide uses these same three tracts, so you can inspect rent, housing burdens and commuting side by side. Each product is sold separately. Area-level associations do not prove that the same households experience each reported condition or that one causes another.
For job origins and destinations, use the separate county workforce flows reference. Postal ZIP/tract links identify related areas, but their address shares cannot allocate commute percentages or household vehicle rates. Browse the geography collection and housing collection to choose a starting point.
Sources and versions
The free original sources are Census’s 2020–2024 ACS five-year Detailed Tables: B08301 (means of transportation to work), B08303 (travel time) and B08201 (household size by vehicle availability). Census released this edition January 29, 2026. ACD retained the responses, definitions, methodology and geographic inventory on November 13, 2026 UTC.
ACD prepares documented CSVs, distinct denominators and approximate uncertainty, preserving original counts and annotations. Independent checks reconcile the delivered files with retained source responses. Separate source, staging and processing records make the edition reproducible.
The source and preparation record distinguishes the Census edition from our processing. Improvements and documented publisher error corrections to this purchased edition are free; a later source edition is a separate purchase.
Example checked November 13, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.