Urban-Analytics-Technology-Platform / popgetter

https://popgetter.readthedocs.io/en/latest/
Apache License 2.0
7 stars 1 forks source link

US data sources #5

Open dabreegster opened 1 year ago

dabreegster commented 1 year ago

https://www.nhgis.org/ https://github.com/a-b-street/abstreet/blob/main/popdat/scripts/build_population_areas.sh https://pitt.libguides.com/uscensus/understandinggeography https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2022&layergroup=Blocks+%282020%29 appears to give block geography per state

dabreegster commented 1 year ago

Stumbled on https://www.census.gov/programs-surveys/geography/data/interactive-maps.html but haven't dug in yet

Block geography

Indeed https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2022&layergroup=Blocks+%282020%29 is easy. The URL to download is something like https://www2.census.gov/geo/tiger/TIGER2022/TABBLOCK20/tl_2022_53_tabblock20.zip, where 53 is Washington, and other values for other states. The .zip contains a shapefile, which requires CRS reprojection to WGS84. There's a GEOID20 field like 530330086001003 for block 1003. All easy here!

dabreegster commented 1 year ago

Stuck actually finding tables.

dabreegster commented 1 year ago

Notes for later: FTP is apparently the simplest place to actually download data, tidycensus::get_acs("tract", "B19013_001", state = "IL", geometry = TRUE) |> mapview::mapview(zcol = "estimate", [layer.name](http://layer.name/) = "Median household income") could be a start, and https://walker-data.com/census-r/index.html

stuartlynn commented 1 year ago

For the US census, Census Reporter did some amazing work on writing scripts to ingest the data into postgresql. From what I remember it does both geometries and stats https://github.com/censusreporter/census-postgres

stuartlynn commented 1 year ago

If no one is actively working on bringing the US data in I am happy to write it up. I have a fair bit of experince with interacting with their systems.

dabreegster commented 1 year ago

I haven't had time to find anything except the geographies, so feel free!