Show HN: Draw.city – geography game where you circle the target population [US] (draw.city)
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
2 comments
[ 0.25 ms ] story [ 14.8 ms ] threadThe 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.