Settings

Theme

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

draw.city

4 points by NameError · 2 comments · 1 min read

Reader

The core idea is, you draw a circle on a satellite view map and it tells you the population inside + more info.

The home page is a daily challenge, I've backfilled some "past challenges" so there's more than just the past couple of days to play, and there is also a free-draw mode that tells you population + some census demographic info & points-of-interest data from OpenStreetMap.

In most cases, the data comes from taking the census blocks w/ centroids contained in your circle and summing their population. Demographic info is slightly more complex as it's not sourced on blocks, so we allocate population-weighted fractions of a source territory's published census values into the drawn territory. Happy to answer any questions about the data or the technical side. The game/app only covers US areas at the moment, I'd like to add international data in the future!

I am re-submitting this as a proper "Show HN", as I left the 'Show HN' text out of the title the last time I submitted

1 thread
cdieck88

Really cool idea! I’ve always loved GeoGuessr, so this immediately caught my attention. I really like the idea of combining that kind of map exploration with actual population data.I’m also curious about the data side of things. Where do you get the population and demographic data from and how are you allowed to use and redistribute it? Given how huge these datasets must be, how is the data actually provided? Do you download the full dataset, use an API, or is there some other approach?

  • NameErrorOP

    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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection