Generating a heatmap of your photos with Python
Ever wanted to have all the locations of your images plotted in a map? So that you can see where you took more photos and even which photo was taken in a specific location?
Then this is the article for you. Here I build a small python program that uses libraries such as GPSPhoto, Folium in order to create an OpenStreetMaps heatmap of your photos and also a simple popup function to see which photo it was in that location !

And if we get closer, we can click on individual spots and get a popup of the image itself !

The code is written in python 3. Create a folder named “Photos” and put the photos you want to map in it. Create a folder named “icons” as well, this is used to store the popup images with a lower size.
The script takes each .jpg image in the folder “Photos/”, creates smaller sized files in “icons/”. Takes the geo-localisation information of all images. And then generates the heatmap with the semi-transparent popup markers.
Any photos lacking GPS data are skipped. So make sure you take your photos with location turned on.
Make sure to have python3 installed.
Install the requirements using the command “pip3 install -r heatmap_requirements.txt
”:
And generate your heatmap in html format using the following command “python3 heatmap_generator..py
” that executes the code below:
That’s it folks ! Enjoy discovering your past photo adventures !