US Zipcode TOPOJson for D3

I am creating a map of the USA using D3, I need to implement 3-level scaling, from national map to state, from state to county and from county to border.

I already did the first level, I used AngularJS directives.

URL GIST: D3 Dual Level Zoom

Now I need to implement the third level of county entry and show all area boundaries at the zip level. I have searched for zip level geometry many times already, I found one helpful question on stackoverflow, but this data only has a name associated with the name, I also need the county name as I only need to draw the boundaries for the specific county that was clicked, any the key, how to get it right, will be helpful. I found the US Atlas project , although I hope it helps me, can't get it right.

+3


source to share


2 answers


Follow the instructions for setting up our atlas from the link you provided. Then run:

make shp/us/zipcodes-unmerged.shp

      

This will download the zip file (~ 500MB) and then extract the .shp file (~ 800MB) into the shp / us / directory in the directory where you installed us-atlas.

If you don't want to worry about our 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 are using the Web Interface link, view the postcode information using the menu. If you select the FTP Site link, the postcode information is located in the ZCTA5 folder.

These files are obviously huge. Check out this example by Mike Bostock , he mentions how he used topojson to simplify the shapefile, creating a much more manageable ~ 7MB.

+3


source


I found 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

0


source







All Articles