BART and Income
The Question
How do city-level income and housing measures vary across the Bay Area, and how do cities with BART stations compare with cities without them?
The Approach
This historical exploratory project used Python and the Census API to collect income, poverty and unemployment fields, pandas to clean and combine datasets, and QGIS to map city boundaries alongside BART locations and housing-price data.
The maps compare cities, rather than individual households or station neighborhoods. They do not establish a relationship between transit, crime or the circumstances of individual residents.
The Execution
Part One
I first looked at an ArcGIS version of the census data, but it wasn’t up to date. So, I went straight to the Census Bureau website and downloaded the full dataset. It was massive, so I trimmed it down to what I needed.
While working with the files, I discovered that the Census Bureau actually provides an API. Using Python, I pulled exactly what I needed — income, poverty, and unemployment — and combined them into a single dataset with pandas.
With that CSV ready, I brought it into QGIS and joined it with California city boundaries. To make the data easier to read, I applied U.S. Census income brackets as a graduated color ramp.
For a clean background, I used the ESRI Gray basemap (imported with the QuickMapServices plugin). Finally, I narrowed the scope to the Bay Area by loading the “California 2020 TIGER/Line shapefile” from the Metropolitan Transportation Commission and dissolving county borders into one unified region.
The result was a baseline income map of the Bay Area.
Median household income across Bay Area cities. Darker shading = higher income.
Part Two: Adding BART
I added BART stations and track lines to the city income map to explore geographic overlap. Visual impressions prompted a group comparison, but the map alone cannot establish a consistent income difference or a causal effect.
Historical overlay of BART stations and lines on city-level household income.
Part Three: BART Cities vs. Non-BART Cities
To test the pattern, I compared all Bay Area cities with BART stations to those without.
Cities With BART
Mean income: $134,349
Median income: $128,516
Cities Without BART
Mean income: $130,743
Median income: $113,839
The published summaries above show higher values for the BART group on both measures: mean $134,349 versus $130,743, and median $128,516 versus $113,839. The earlier statement that its median was lower was incorrect.
These are historical group summaries as displayed in this project. Source years, city inclusion, joins and weighting would need to be revalidated before treating them as a current research finding. Mean and median alone do not establish the spread of household incomes.
Historical map of city-level income for cities with BART stations.
Historical map of city-level income for cities without BART stations.
Part Four: Home Prices
I joined Zillow housing-price data to Bay Area city boundaries. When some cities disappeared from the visualization, I investigated the display scale and expanded the brackets to represent the dataset’s range.
I also mapped a simple home-price-to-household-income ratio. This compares a housing price measure with annual household income; it is not the time a household would actually need to save for or finance a purchase.
The historical output needs matched source dates, documented definitions and checked joins before it can support current affordability claims.
Median home prices across Bay Area cities (scale extended up to $10M to capture full range)
Historical housing-price-to-annual-household-income ratio. This descriptive ratio excludes expenses, taxes, financing and savings behavior.
CONCLUSION
This project demonstrates API-based collection, pandas joins, geographic mapping and investigation of visualization problems.
Its listed group summaries contradict the original impression that BART cities have lower median incomes. Geographic associations require careful definitions, source dates and weighting, and do not establish that transit causes income or housing differences.
The narrative was corrected in October 2026. The underlying dataset and methodology have not been independently revalidated.
Sources:
California City Boundaries : https://gis-calema.opendata.arcgis.com/datasets/CalEMA::enriched-california-incorporated-cities/explore?location=37.964540%2C-121.995446%2C11.15
Home Prices: https://www.zillow.com/research/data/
Demographic data: https://www.census.gov/