Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Shape map issues topoJSON - Local authority UK

Hi,

 

I'm trying to create a shape map in Power BI desktop for Local Authority areas in the UK, i've followed these steps: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map

 

I've downloaded the topoJSON file (from link below) for the local authority areas but it won't load into my report properly. Does anyone have any ideas why this might be a problem? 
https://martinjc.github.io/UK-GeoJSON/

 

I have a variable called CSSR (this is the local authorities) that I am using as the location and then using employees as the colour but this is what happens.

 

 

 

Any help would be appreciated!

Cheers

8 Replies

  • ABilton's avatar
    ABilton
    Regular Visitor

     The problem is that the Json file is using the wrong projection. If you use MapShaper.org to add the ONS Shape Files, it doesn't default to wgs84. You need to use the console to change it. Watch the following video for instructions on how to change this.

     

    https://www.youtube.com/watch?v=4PU1pSz6F98&list=PLVlQKJFc2plygl1ArhZ1rdUOaUcBZiblf&index=10&t=0s

     

    4:00 into the video shows you how to add the ONS Shape data into MapShaper and change the projection. Power BI will then render the file correctly.

     

    🙂

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks,

       

      I've taken a look at those however I am still having the same problems. 

       

      I think the problem is the shape files/topoJSON files themselves. I can't find anywhere the most recent local authority data for the UK that doesn't cause the same line problems on the map as above! 

      If anyone knows where this might be downloadable that would be great? I'm going to try to learn to use QGIS in the meantime!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Just to update:

         

        I've created the JSON file that I need to add to Power BI but when i follow the steps and go to '+Add map' and select the file, it doesn't add the areas; it doesn't actually do anything to the visual. 

  • Hi,

     

    I just came across the same problem whilst updating our ONS data for the April/May 2020 changes. It took me a little while, but realised that in re-projecting my Shape file it had retained the BNG bounds, but adopted a WGS84 projection. I went back into QGIS and made sure the CRS was set first to EPSG:27700 then saved the Shape file to WGS84. In doing so the BNG bounds were converted to lat/long bounds and all worked easily.

     

    Using Info in mapshaper.org was handy to spot the error.

     

    Info command in mapshaper.org