BART and Income
The Observation:
After riding BART back from SFO, I couldn’t help noticing the difference between the neighborhoods around BART stations compared to places further away. My wife even mentioned how tense she felt while riding, and once she pointed it out, I realized there was a lot happening around me that I had been ignoring. When we visited the North Bay or South Bay, it didn’t feel the same at all. That got me wondering: is there actually a pattern here?
The Question:
Is there a real link between BART stations and lower income areas — or is that just how it feels?
The Plan
Pull census and housing data for the Bay Area.
Use Python to clean and combine the data.
Bring everything into QGIS to see if any patterns jump out..
Data & Tools
Pulled Census income, poverty, and unemployment data via Python + Census API.
Cleaned and merged datasets in pandas.
Mapped in QGIS with California TIGER/Line shapefiles.
Added Zillow median home price data.
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
Once the boundaries and income data were in place, I wanted to see how BART lined up. So, I added the BART stations and track lines to the map.
Right away, a pattern started to show: a lot of the cities with BART stations had lower median household incomes. Not every city followed the trend, but the connection was hard to ignore.
Overlay of BART stations and lines on top of city income levels. Many BART-connected cities show lower median incomes.
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 numbers weren’t drastically different, but they told a story: BART cities skewed slightly higher on mean income, but lower on median, which suggests a wider income spread.
Bay Area cities with BART stations. Income levels are more mixed, with several in lower brackets.
Bay Area cities without BART stations. Many of these cities fall into higher income brackets.
Part Four: Home Prices
I also wanted to see how housing fit into the picture. I pulled in Zillow’s median home price data and joined it with the Bay Area city boundaries.
At first, I thought I had broken the data because whole cities were missing from the map. The issue was my scale — I had capped housing brackets at $2M, which wasn’t nearly enough. Once I raised it to $10M, everything snapped into place.
Then I mapped an affordability ratio — how many years of income it would take to buy a typical home. That’s when things really stood out: in some South Bay cities, it would take over 30 years of median income to afford a home.
Median home prices across Bay Area cities (scale extended up to $10M to capture full range)
Years of median household income required to purchase a typical home. In some South Bay cities, the ratio exceeds 30 years.
CONCLUSION
At first, it looked like BART might be a simple income divider. But the deeper I dug, the more housing affordability turned out to be the real story.
This project started with an everyday observation and turned into a way to explore how infrastructure, income, and housing overlap in the Bay Area. By pulling Census data with Python, combining it with Zillow prices, and mapping it all in QGIS, I was able to see the patterns — and the limits — of the BART vs. income link.
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/