Spatial Demographic Data – Weighting Demographics Overview

This is part of a series of posts I’m doing on Census Bureau Demographic Data for Developers based on my experience creating a database of Census Data as part of my summer internship at

What if the area you’re interested in doesn’t completely cover a whole census tract?  Assuming a uniform distribution of people throughout the census tract, you can weight the demographics you take from each tract based on the area of intersection between the census tract and your shape of interest:


This won’t give you a completely accurate figure but it will be meaningful as a representation of the areas you’re trying to examine.

Here’s a visual example using the 17 7-Eleven stores in Manhattan (the black lines delineate census tracts):


7-Eleven Location on Dyckman St in Inwood (Upstate Manhattan)


7-Eleven Locations Uptown Manhattan


7-Eleven Locations Downtown Manhattan

The 100 meter buffer around the store at 177 Dyckman St includes about 10% of the area in census tract 36061029100, about 0.7% of the area in census tract 36061028700, and about 0.13% of the area in census tract 36061028500.


Applying these weights to the demographics from each census tract gives me the aggregate numbers for that area.  After dividing by the total population, the 100 meter area around this 7-Eleven looks like this:

median age 33.78
median age male 31.88
median age female 35.77
percent white, nonhispanic 0.05
percent black, nonhispanic 0.04
percent asian, nonhispanic 0.01
percent hispanic 0.89
percent other 0.01
percent owner occupied housing 0.03
percent renter occupied housing 0.97

So what does it look like when we compare the 7-Elevens to Manhattan as a whole? A following post will reveal the hidden secrets of 7-Eleven locations around Manhattan.

And you want to know what code I used to generate this?  A following post will breakdown the code.  In the meantime, here’s a link to the Github folder I’ve created for this project.

2 thoughts on “Spatial Demographic Data – Weighting Demographics Overview

  1. Pingback: Spatial Demographic Data – Weighting Demographics with PostGIS | Datapolitan

  2. Pingback: Demographics Around 7-Eleven Stores in Manhattan | Datapolitan

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s