I have a count for each German zip code (e.g. something like this) and I would like to visualize it.
For simplicity, lets say my data looks like this:
data = {'80337': 3, '76131': 36, '86462': 24} # all others: 0
Now I would like to create a heat map.
I've seen pyGeoDb which looks as if it could fit my need, but I don't know how to use it. And it also seems not to work with Python 3.
I use Google Fusion Tables for a lot of things like this. It does geocoding for free, and heatmaps is one of its basic functions. Easy to embed on webpages, or dig into more deeply with custom JS if needed...
UPDATE Google killed off Fusion tables at some point, but their JS API has a heatmap layer that is pretty straightforward to use. https://developers.google.com/maps/documentation/javascript/heatmaplayer
Although you would need to geocode the zip codes.
I have the same problem and I got pyGeoDb working with python3, yet I have to use a workaround (Ubuntu 17.10):
make the following alterations:
open a terminal
At least for me it works fine and the maps are created without errors. The only drawback I encountered is that it takes some time and the resulting *.pdf is quite large (at least several 100 megs)
There probably is a more elegant way of doing this, yet for me this is sufficient and working.
Have fun!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With