TopoJSON Map Files for Power BI Shape Map

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.

Please note that I have only converted from an original source. I will not branch from an original source by making custom modifications to shapes.


87 thoughts on “TopoJSON Map Files for Power BI Shape Map

  1. Hi David. Do you have any uk files? I have UK Postcode (area, district, sector) and parliamentary area shp files that i am desperately attempting to get into Power BI


  2. Hi David do you have UK postcode (area, district, sector) and parliamentary areas? I have been trying to convert shp files i have for ssrs but cant get them to work in Power BI.


  3. Hi David, thanks a lot for this. Is it possible for you to please separate Canary Islands from the Spanish Map located on your repository? This will help for having 2 shape maps on same report and make a better focus on the data.


  4. We can use any .KML file and convert that into TOPOJSON file and used them in the custom shape map as well.

    This worked out for me , as i have a customized boundary for Pakistan Map.


  5. I have created a custom SHP file from scratch (using QGIS), then converted to TopoJSON using the links and help you describe – THANK YOU. The custom shapes show up in Power BI, but the shapes do not have map keys. Clicking “View Map Keys” does not bring up a dialog like it does with the built-in or your maps.

    Do you know what attribute or keys I am missing in my custom SHP file that tells Power BI what to use for map keys?

    Thank you very much.


    • Try opening the entire “Shapefile”, which is actually a compressed folder with multiple files such as .shp, .dbf, etc. in it. If you open the shp only, you only get the shapes, but the data/keys are actually contained in the dbf.


      • Thanks for the reply. Perhaps this is exposing more of my ignorance around SHP and QGIS than anything. I understand that there are the multiple files that are associated with the SHP (namely the DBF that contains a lot of that per-feature data). I am creating this SHP file from scratch, not opening an existing one. So the question is more about: after drawing some features in the QGIS design surface, how can I set the data for each feature?

        I know about the attributes for each feature, editing them and see them in the attribute table. But those are NOT what are used by Power BI in terms of map keys. I can see after conversion to TopoJSON – there is a “properties” node for each feature – it’s populated with lots of key/value pairs in legitimate/existing SHP to TopoJSON conversions I’ve seen, but nothing in that collection in my home-grown, made-from-scratch SHP to TopoJSON.

        Hope that makes sense – again, think this ends up being more of a QGIS question, so, apologize for that, just that it then impacts Power BI’s ability to see and use map keys in the TopoJSON file.


  6. I am working in my college project and planning to use shape map of power bi. Therefore,I need the Topojson file of Pakistan district. Can somebody provide me please. Thanks in advance 🙂


  7. OK – I figured this out. The QGIS side was actually working fine. Open the entire SHP “set”, including the associated DBF. Any attribute I am adding on a feature *is* getting added to the DBF.

    My mistake was when using I was only adding the SHP file to then get converted. Now I take the extra step and add the DBF file to mapshaper as another “layer”. Nothing gets visually rendered differently in the mapshaper UI, but then when you export as TopoJson, the resulting file has the per-feature properties that are needed and interpreted by Power BI.

    Have a fully working example with various ugly feature shapes that I created from scratch in QGIS, then lit up with colors based on data, in Power BI.

    Thank you for the shoves in the right direction.

    Liked by 1 person

  8. Thank you very much for sharing the TopoJson files for PowerBI Shape maps. Currently I am using the Netherlands municipalties shape map.
    Recently there has been a change in de Dutch municipalities: 3 of them have merged into 1 new municipality. Could you please implement this change into the Json file?

    The old municipalities are: GM0844, GM0846 and GM 0860 (Schijndel, St Oedenrode and Veghel)
    The new one is: GM1948 (Meierijstad)

    Thank you very much!


    • Unfortunately, I don’t have the capacity to manage localized changes. If it changes in the data source, I can re-convert, but it would have to be altered in the source shapefile first.


  9. David ,

    How can I change the text coding for topo jason file in order to present the correct letters specific to the Polish language?

    I tried to use text editor to change the map Key but although I corrected letters in the text editor , they were not correct recognized in the PowerBI map keys.


      • 1. Correct spelling in Polish language: Łódzkie

        2. Topojason file – ‘ as is’ wrong spelling: “VARNAME_1″:”LĂłdzkie”}}

        3. Topojason file – ‘to be’ correct spelling to be presented in PowerBI in accordance with point 1 : “VARNAME_1″:”ĹĂłdzkie”}}

        so there is a need to change the first from “L” to “Ĺ” to have the correct spelling in PowerBI otherwise if i just write in Topojason file : “VARNAME_1″:”Łódzkie”}} I will get in PowerBI “??dzkie” name of the province instead of “Łódzkie”.

        I belive it is becasuse of text codding issue.

        Topojason file source:


  10. Hello, and thanks for the hard work.
    Could please add Liberia, with its 15 counties and 136 districts.

    Thanks in advance


  11. Hello David,

    your work is amazing. It has helped me a lot; an invaluable help. However, I have been working with the “Spain province map”, and I would like to report a bug and suggest a change.

    Both in “province map with Canary Islands” and the “Canary Islands map” itself have an error. Half of the islands are part of the “Las Palmas” province, and the other half are from “Santa Cruz de Tenerife” province. Currently, in your great approach all of them are part of “Las Palmas”.

    They change I want to suggest is:
    -Would it be possible to add an additional name to the provinces? Actually the official name of some provinces is different. I mean, the names you used there are right, but the official name following the very official Government agencies are in this URL: .
    These are the names most of the companies use in their databases. For example, instead of “Valencia” or “València”, the official name is “Valencia/València”, and instead “La Rioja”, the official name is “Rioja, La”.

    Thanks a lot in advance, and thanks again for your job. And sorry for my English.



    • It would also be great if the distance between Canary Islands and the Peninsula were smaller, the same way you moved Hawaii and Alaska nearer to the continent in the US maps, or at least add a map with this possibility.

      Thanks a lot again.


    • Hola Sergio,

      estoy intentando conseguir solo el mapa de las islas Canarias corregido con provincias, no se si me lo prodrias facilitar tu,

      Gracias de antemano,

      Un saludo


  12. Hello, and thanks for the hard work.
    Could please add Nepal, with its 14 zones and 75 Distict.

    Thanks in advance


  13. Hi david,
    I was attempting to convert a Peruvian shapefile that i had found into TopoJSON using mapshaper.
    After exporting from mapshaper and importing it into Power BI, It doesn’t show correctly.
    I wonder, Is it possible to add Peruvian map?

    shape link:
    (option–>Límite Departamental (Fuente: INEI-2007) – Tamaño 3Mb.)

    Thanks in advance.


  14. I have been trying to convert a shape file to TopoJSON in Mapshaper, and everything looks ok, but when i add it to PowerBI, the map dont appear as in Mapshaper. What can be the problem? Should i need the key to ben in format like ‘PT.AC’ or can be soomething like an int ‘1234’? I was trying to add the OPorto cities.


  15. Awesome work, thanks! I am using the World map and it’s working great. I can edit the JSON to remove a country completely, but is there a way that I can ‘disable’ a country in Power BI, so I have a World map that plots country data, but countries that have no data aren’t selectable? Thanks!


  16. Hi David,

    Thank you for your resources.
    I mostly work with linear networks and related data and the linear geometry is in PostgreSQL Database. Is there a best way to display such kind of geometry type into PowerBI.

    Thank you.


  17. Hey there! 😀
    I am absolutely loving the maps on here, thank you so much for this!

    I have no idea if this is simple or not, but is it possible to add the towns of Denmark?
    Some towns have data that gets combined because of the municipalities, rendering it “kind of useless”.

    If there’s something I can do myself, please let me know 🙂
    The map is still really useful, so honestly – thank you for this! 😀


    • In its current state, the Power BI shape map only handles polygons. That image appears to have some linestrings as well, and those will not render. Discrete colors also were not available when last I looked.


  18. Hi David,

    I really appreciate your work. This data is really useful.

    I have seen topojson map of Pakistan (Province and Division level) on your Github page.

    I have one request, can you please add the map on District level as well, please.

    It will be highly beneficial.

    Thanks in advance.


  19. A legend withe the color saturation scale will be an amazing (and i think needed) feature for the graphs. A graph for Venezuela will be very cool. Great work around here!!


  20. fantastic work! great to see how many countries were added
    Does anyone know were I could find .json files for Switzerland? Ideally with postal code and cantons? thanx


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s