Reputation: 956
I am creating US map using D3 , i have to implemented three level zooming , from nation map to state , from state to county and from county to zip boundaries.
I am already done with first two level , I used AngularJS directives.
GIST URL : D3 two level Zoom
Now I need to implement third level of getting in to county and showing all zip level area borders. I already did lot of search for zip level geometry , I found one helpful question in stackoverflow , but this data has only state name associated , I also need county name , since I only need to draw boundaries for particular county which was clicked, any clue how to get proper will be helpful. I found US Atlas project , though having hope it will help me, can't understand it properly.
Upvotes: 4
Views: 3982
Reputation: 105
I found that the ArcGIS data to be much more useful, with better documentation and easier to import for D3 or Mapbox:
https://www.arcgis.com/home/item.html?id=8d2012a2016e484dafaac0451f9aea24
Upvotes: 0
Reputation: 9128
Follow the instructions for setting up us-atlas at the link you provided. Then run:
make shp/us/zipcodes-unmerged.shp
This will download a zip file (~500MB) and then extract the .shp file (~800MB) to the directory shp/us/ within the directory you installed us-atlas.
If you don't want to bother with us-atlas, you can get the zip file by going to this site:
http://www.census.gov/geo/maps-data/data/tiger-line.html
Select the tab for the year you want, and then the "Download" tab. If you use the "Web interface" link, browse for the zip code data using the menus. If you choose the "FTP site" link, the zip code data is in the folder ZCTA5.
These files are obviously enormous. Check out this example by Mike Bostock, he mentions how he used topojson to simplify the shapefile, creating a much more manageable ~7MB file.
Upvotes: 4