This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Where to get updated geojson data #8
Comments
I attempted to update all the files with 2020 census data. To get the updated files: mkdir -p raw/state && cd raw/state && curl -O https://www2.census.gov/geo/tiger/TIGER2020/STATE/tl_2020_us_state.zip && unzip tl_2020_us_state.zip && cd ../..
mkdir -p raw/county && cd raw/county && curl -O https://www2.census.gov/geo/tiger/TIGER2020/COUNTY/tl_2020_us_county.zip && unzip tl_2020_us_county.zip && cd ../..
mkdir -p raw/zcta5 && cd raw/zcta5 && curl -O https://www2.census.gov/geo/tiger/TIGER2020/ZCTA5/tl_2020_us_zcta510.zip && unzip tl_2020_us_zcta510.zip && cd ../..
mkdir -p raw/hrr && cd raw/hrr && curl -O https://data.dartmouthatlas.org/downloads/geography/HRR_Bdry__AK_HI_unmodified.zip && unzip HRR_Bdry__AK_HI_unmodified.zip && cd ../..
mkdir -p raw/hsa && cd raw/hsa && curl -O https://data.dartmouthatlas.org/downloads/geography/HSA_Bdry__AK_HI_unmodified.zip && unzip HSA_Bdry__AK_HI_unmodified.zip && cd ../.. Then to convert to GeoJSON: rm -rf geojson && mkdir -p geojson && cd geojson
ogr2ogr -f "GeoJSON" state.geo.json ../raw/state/tl_2020_us_state.shp tl_2020_us_state
ogr2ogr -f "GeoJSON" county.geo.json ../raw/county/tl_2020_us_county.shp tl_2020_us_county
ogr2ogr -f "GeoJSON" zcta5.geo.json ../raw/zcta5/tl_2020_us_zcta510.shp tl_2020_us_zcta510
cp ../raw/hrr/HRR_Bdry__AK_HI_unmodified/hrr-geojson/Hrr98Bdry_AK_HI_unmodified.geojson ./hrr.geo.json
cp ../raw/hsa/HSA_Bdry__AK_HI_unmodified/hsa-geojson/HsaBdry_AK_HI_unmodified.geojson ./hsa.geo.json Then to convert the GeoJSON to TopoJSON: npm install topojson ndjson-cli -g
rm -rf topojson && mkdir -p topojson
geo2topo geojson/state.geo.json > ./topojson/state.topo.json
geo2topo geojson/county.geo.json > ./topojson/county.topo.json
#geo2topo geojson/zcta5.geo.json > ./topojson/zcta5.topo.json
geo2topo geojson/hrr.geo.json > ./topojson/hrr.topo.json
geo2topo geojson/hsa.geo.json > ./topojson/hsa.topo.json Things got stuck trying to convert the geojson to topojson for zcta5:
I tried to resolve by setting environment variable I do not have time to try to troubleshoot this more and no longer maintain this repo, but if someone has a solution happy to implement. |
This was referenced Aug 1, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I found a link to the updated geojson data: https://www2.census.gov/geo/tiger/TIGER2020/ZCTA5/. If you go up a level you can find even more recent than 2020. Can somebody update this repo with more up to date zips?
The text was updated successfully, but these errors were encountered: