About a month ago, I starting a collection of TopoJSON map files in response to a request on the Power BI Community forum. TopoJSON is D3’s preferred format, which is why Power BI users have suddenly found themselves learning more about it after the Shape Map was released. It is an optimized and lightweight cousin of the more prevalent GeoJSON, but there are not many files available in TopoJSON format. As a result, a subset of Power BI users have been converting files from Shapefile, GeoJSON, and other formats into TopoJSON on their own.
I have posted a modest collection of files in a GitHub repository at:
Please make sure that you save the “Raw” version of the .json file. Rather than right-clicking and performing a Save Link As on the links directly in the Read Me, click the link to view a preview of the map, and then right-click on the Raw button at the top and select Save Link As.
Here’s a sample of what is available:
- World map with continents and world map with countries
- Individual continent maps with countries
- US counties
- US congressional districts (2015)
- US cartogram based on each state’s population
- Individual US state-level counties
- Denmark – counties and municipalities
- Finland – provinces and regions
- France – departments
- Germany – regions
- India – states and districts
- Japan – prefectures and towns
- Netherlands – municipalities
- Norway – counties and municipalities
- Spain – comunidades autonomas and provincias
The US cartogram is the only one at this time that was not simply a conversion from another source. It was a test of R’s new cartogram package. I took a sample US map from R’s albersusa package and created a map that distorts the states based on their 2014 estimated population. As an aside, if you have some R experience and want to explore alternatives to traditional maps, there is a lot that can be done with R that can then be converted for later use in Power BI.
The most important note is that nearly all of these files personally have been tested for use in Power BI. As a result, users should not encounter some of the distortion issues in Power BI that can sometimes occur when converting a Shapefile or other source into TopoJSON. In many cases, the polygons also have been simplified for performance reasons in Power BI without sacrificing much high-level detail.
If you would like to include a TopoJSON file, post a request in the comments, and I will try to honor it. Please note, however, that I will only convert from an original source. I will not branch from an original source by making custom modifications to shapes.