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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rigosakh
Frequent Visitor

Mapbox heatmaps

Hi Power BI community!

 

Can someone share a manual on how to create heatmaps using Mapbox custom visual. All I found online was these two articles:

However, I was unable to find how to indicate the weight of each data point (seems like 'size' is not what I am after)

Ideally, I am after something like this (source https://www.mapbox.com/help/show-changes-over-time/ ) but in a "temperature"-heatmap format.

heatmap example.PNG

My aim is to display parking spaces that are being used at different times of the day at a certain suburb and highlight the areas that have most concentration of cars (i.e. areas with lots of cars would be "high temperature" - red, empty areas - "cold" - blue).

Currently I'm using Excel Power Maps to produce heatmap videos and then either embed the videos into Power BI dashboards. However, I am looking for a more interactive solution (i.e. being able to control time of the day using the slicer like in the screenshot above) , that can be easilty integrated into Power BI report.  

 

Would really apprecaite if anyone could share their knowledge and help with this.

 

Thank you,

rigosakh

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi

“Currently I'm using Excel Power Maps to produce heatmap videos and then either embed the videos into Power BI dashboards”, how are the heatmap videos embed, are they added to Power BI dashboard as a video like this or imported with the excel data using Get Data> excel?

 

It is not possible to obtain a visual the same as your example, there is a workaround to get a similar one.

 

You can create a Mapbox visual with your dataset in power bi desktop and then add a slicer to filter the visual.

 

Per your requirement of the data point format, in Mapbox visual, you can select Cluster instead of Heatmap, then change the Max Color and Min Color to what you want.

 

1.png

2.jpg

 

What do you want to filter by the slicer?

 

For example , if you want to filter the Latitude and Longitude by the slicer

 

1.Before you need to define the day by creating calculated columns

day = WEEKDAY([Date sent to company],1)

day of week = IF([day]>1&&[day]<7,"Weekday","Weekend")

 

2.Then create measures for the one you want to change by selecting in the slicer, eg. Latitude and Longitude

Measure1 =
CALCULATE (
    MAX ( [Latitude] ),
    ALLSELECTED ( Complaints[Date sent to company] )
)
Measure2 =
CALCULATE (
    MAX ( [Longitude] ),
    ALLSELECTED ( Complaints[Date sent to company] )
)

 

3.Finally, add columns to slicers, for my example, these are columns ’date sent to company’ and ‘day of week’.

 

 3.jpg

 

Best Regards

Maggie

Anonymous
Not applicable

Mapbox work with power BI emmbded or when I publish to web. 

Hi Maggie,

 

Thank you for your reply. Unfortunately, clustering would not be a solution in my case, let me explain my desired output and how it is created using excel tools.

FIrst I capture lat/lon for all the required spaces in a certain area. Every space is assigned 1 or 0 at different hours of the day. Source data looks like this :

hetamap source.PNG

 

PowerMap addon converts this data into this :

111.gif

 

A lot of clients find this format of presentation of data useful, I was hoping to that MapBox can produce something similar so I was specifically interested in some additional guidance around heatmap functionality of the visual

 

sss.PNG

 

If I put count it Color or Size of visual and use the time slicer, for some reason it doesn't change.

 

Thank you,

rigosakh

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.