Question

State-based heatmap

  • 3 January 2018
  • 3 replies
  • 779 views

Hi, how do you make a heatmap on the state-level?



I have a list of actions that users can take and I’d like to indicate which states are the most likely to take those actions. Can I do that in looker? Thanks!


3 replies

Hi Sebastian!



You can create a state-based heatmap by selecting the “Static Map (Regions)” visualization option. This visualization requires one dimension (i.e. state names) and one measure (i.e. a count/metric of actions). The dimension you select will also need a “map_layer_name” parameter in its LookML (which associates a dimension with a TopoJSON map layer) with value “us_states”.



In addition, If you want to change the colors present in your heatmap, you can input color hex codes by selecting the gear gear button next to “Edit” on the “Visualization” bar, and then selecting the “Style” tab.



This doc serves as a good overview of our Map Regions chart options: https://docs.looker.com/exploring-data/visualizing-query-results/map-regions-options



And this doc provides more context on the “map_layer_name” parameter: https://docs.looker.com/reference/field-params/map_layer_name



Hope this was helpful! Let us know if there’s anything else we can assist with regarding regional maps.



Best,


Elliot

Hello Elliot,

 

What about countries other than the “US”?

 

Userlevel 7
Badge +1

It’s possible. You need to upload your own map in TopoJSON format with labels that match a data point in your table

Reply