cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jayeckles Member
Member

collection of topojson maps?

Anyone have a link to a collection of useful topojson maps (the format that can be used in the Shape Map Visual)?  I've found tools that will let you create these, and I've even found a US map that contains counties but no useful ID.  

 

Surely someone has a collection of common maps already in topojson format.  I'm looking right now for US zip codes, US counties (perhaps ID'd by FIPS), and US congressional districts.  

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
deldersveld
Advisor

Re: collection of topojson maps?

I've started a repository to collect topojson files converted from open data sources and can add additional files over time: https://github.com/deldersveld/topojson

 

Zip codes are only offered by the US census at the highest of resolutions. I used a simplification method to reduce the polygon detail, but performance was still so bad at the national level that it won't work well in Power BI with that many shapes. Zips might be okay at the state level though. Counties at the national level are not as bad. You can match using GEOID, which is FIPS state+county code.

16 REPLIES 16
deldersveld
Advisor

Re: collection of topojson maps?

I've started a repository to collect topojson files converted from open data sources and can add additional files over time: https://github.com/deldersveld/topojson

 

Zip codes are only offered by the US census at the highest of resolutions. I used a simplification method to reduce the polygon detail, but performance was still so bad at the national level that it won't work well in Power BI with that many shapes. Zips might be okay at the state level though. Counties at the national level are not as bad. You can match using GEOID, which is FIPS state+county code.

npnigro Regular Visitor
Regular Visitor

Re: collection of topojson maps?

This is great! Any ideas how you can get the county map to support the Albers USA projection, like the USA: states map?

deldersveld
Advisor

Re: collection of topojson maps?

Unfortunately the projection options are part of the Shape Map source code. Albers requires latitude and longitude parameters to be specified to render without too much distortion, so that's likely why it's not an option for the custom topojson import. Obviously the county map lines up properly since it's a US map, but that's just by chance.

npnigro Regular Visitor
Regular Visitor

Re: collection of topojson maps?

Interesting, so you're saying we can't expect a topojson file to support Albers until the Shape Map visual code is updated? When this support is added, do you think the files you're sharing on GitHub will work? I'm a little surprised it doesn't work by default because we can do an Albers projection for one of the default maps.

deldersveld
Advisor

Re: collection of topojson maps?

Updated to include individual state files with county boundaries: https://github.com/deldersveld/topojson/blob/master/README.md

deldersveld
Advisor

Re: collection of topojson maps?

@npnigro: Attempting to read between the lines, do you simply want Alaska to to appear in the location where the "Albers" map places it...?

npnigro Regular Visitor
Regular Visitor

Re: collection of topojson maps?

Yes, I'm trying to make a Power BI visual like this:

 

http://bl.ocks.org/mbostock/4090848

jayeckles Member
Member

Re: collection of topojson maps?

Do you have a process set up to do this that I could replicate?  For example, we're currently looking for maps for Tennessee only with boundaries for TN State House and TN State Senate (as opposed to US House and US Senate) districts.

deldersveld
Advisor

Re: collection of topojson maps?

@jayeckles: for the county files, I could script it out more easily because each individual state file started from the same national file. It looks like the census site doesn't have that for state legislative districts and instead has it per-state. I pulled Tennessee's down and converted them, but I probably wouldn't try to do this programmatically for the hosted collection for each state (could do as-needed or on-request though for other states).

 

The latest version was 2015, so hopefully districts have not been re-drawn since.

Senate: https://github.com/deldersveld/topojson/blob/master/us-states/TN-47-tennessee-state-senate-districts...

House: https://github.com/deldersveld/topojson/blob/master/us-states/TN-47-tennessee-state-house-districts-...