Many U.S. cities are still remarkably segregated. This map visualizes where.

One point, one person

Every respondent of the 2020 U.S. Census is mapped individually within the Census Block that they live.

 

Tools used

 
  • I used AWS CloudFront, S3, Route 53, and ACM to host a secure webpage out of an S3 bucket and serve vector tiles from a second S3 bucket. I used CloudFront as my CDN to distribute information from the nearest cache and improve the loading speed worldwide. Mark Varley’s tutorial was invaluable: https://github.com/addresscloud/serverless-tiles.

  • I used Mapbox GL JS to render the map. This also involved using the tippecanoe command line library to create Mapbox Vector Tiles for both my basemap and point data. This data was stored on AWS with the index.html file employing Mapbox GL JS. I created style JSON files to customize the styling of both the basemap and the point map.

  • I used Maputnik to finalize the basemap styling (ie. thinning the labels, changing the colors, etc.). This visual editor helps identify the attributes that need to be changed in the style JSON file.

  • I wrote Python code to disaggregate the 2020 Census Block data. I generated one point for each person who responded to the census, labeled it with their self-identified race/ethnicity, and positioned it randomly within the block where they live. The shapefiles exported by my code were ingested by a second command line script that created a Mapbox Vector Tile directory for each city and uploaded it to an S3 bucket.

    You can find the code here: https://github.com/mghersher/race_dot_density_map

Previous
Previous

NBC News: Uptake of COVID vaccine first dose

Next
Next

NBC News: Interactive map of legal barriers to abortion