Skip to content

Comment on Show HN: Draw.city – geography game where you circle the target population [US]parent

Comments

Thanks! The population/demographic data is all freely available from the US Census and stored in a PostGIS database (hence the site being US-only for now- if I wanted to make it global, there are global gridded population data sets but they aren't as detailed).

The geography data is all pulled in w/ some long-running background tasks into a rails app (that hosts both draw.city and another site I've shared here in the past - blockatlas.com). To find the pop of place that the user circled, it essentially queries for census blocks whose centroid is fully contained in the area you drew (there is a quicker census-tract-based fallback for huge areas).

Putting demographic data e.g. "% walk to work" onto an arbitrary polygon is a bit trickier, since that sort of data isn't published at the block level. We use census tracts (bigger, neighborhood-sized areas that do have this data), and for partially-contained tracts we compute the fraction of the tract's population estimated to live in the area, and allocate demographic info according to that fraction.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.