Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TomTomTom
Helper II
Helper II

How to PQ this geoJSON file on a map?

I'd like to be able to use this geojson file into maps on PowerBI, where I would then overlay other info, but I can't seem to get the query right:

 

geojson file in question

 

Can anyone help?

1 ACCEPTED SOLUTION

Hello,

I saw the other post you made about maps and I wonder if your problem remains unsolved.  Are you actually trying to use the map you have as a shapemap?

If so, you might find this thread helpful

https://community.powerbi.com/t5/Power-Query/Importing-TopoJSON-file-to-create-shape-map-what-Next/m... 

 

Also, read this first https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map#use-custom-maps 

 

You have a geojson map , you need a topojson version of it.  It may exist already (on the web) or you can make it yourself with mapshaper (again, on the web)

 

Get back to me if you need more help.

View solution in original post

3 REPLIES 3
artemus
Employee
Employee

The query will look like:

let
    Source = Json.Document(File.Contents("<Your file location>")),
    features = Source[features],
    Custom1 = Table.FromRecords(features),
    #"Expanded properties" = Table.ExpandRecordColumn(Custom1, "properties", {"FID", "CCG19CD", "CCG19NM", "BNG_E", "BNG_N", "LONG", "LAT", "Shape__Area", "Shape__Length"}, {"FID", "CCG19CD", "CCG19NM", "BNG_E", "BNG_N", "LONG", "LAT", "Shape__Area", "Shape__Length"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded properties",{"geometry"})
in
    #"Removed Columns"

Power_Bi_Map.PNG

 

Hello,

I saw the other post you made about maps and I wonder if your problem remains unsolved.  Are you actually trying to use the map you have as a shapemap?

If so, you might find this thread helpful

https://community.powerbi.com/t5/Power-Query/Importing-TopoJSON-file-to-create-shape-map-what-Next/m... 

 

Also, read this first https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map#use-custom-maps 

 

You have a geojson map , you need a topojson version of it.  It may exist already (on the web) or you can make it yourself with mapshaper (again, on the web)

 

Get back to me if you need more help.

Thank you. Cracked it.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors