14

Mode Analytics has a nice heatmap feature, but it is not conducive to comparing maps (only one per report).

enter image description here

What they do allow is data to be pulled easily into a wrapped python notebook. And then any image in python can easily be added to a report.

So my question is: how do I recreate a heatmap on an actual map in Python? I've checked out follium and plotly, but neither seem to have similar functionality.

Ethan
  • 1,625
  • 8
  • 23
  • 39
ScottieB
  • 323
  • 1
  • 2
  • 8
  • 1
    Folium has a [plugin for heat maps](https://github.com/python-visualization/folium/blob/master/folium/plugins/heat_map.py). [Here is an example](http://qingkaikong.blogspot.com/2016/06/using-folium-3-heatmap.html). – Emre Oct 27 '16 at 05:41
  • Thanks @Emre that's exactly what I needed. Sadly Mode doesn't support folium yet, but I'll bug their customer service and see if they'll load it. – ScottieB Oct 27 '16 at 16:32
  • Another good library for this is `gmplot` which also let's you export the map as a standalone html file. [Here](https://eatsleepdata.com/data-viz/how-to-generate-a-geographical-heatmap-with-python.html) is a tutorial on using it. – Jonathan Porter Apr 27 '18 at 18:25

1 Answers1

11

Looks like the gmaps package is what you're looking for.

You can do things like this with it:

gmap

Ethan
  • 1,625
  • 8
  • 23
  • 39
Mikhail Yurasov
  • 726
  • 6
  • 7