A simple R script to complete your geotagged photo slideshows; it creates nice maps showing where the photos were taken.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A simple and quick R script to complete your geotagged photo slideshows; it creates nice maps showing where the photos were taken.


When I was a child, I was told that memories live forever through photography. I think this is deeply true.
At the same time, I love geotagging photos. Apart from the shot itself, I like to remember where and when the picture was taken, so that I can show the data with the photo I took.
Unfortunately, geotag has few uses online (if you are into photo sharing services, for instance), less uses offline (few photo management software have related features), and no uses for simpler devices, for instance digital photo frames.


The idea came to me after geotagging thousands of photos; I had no offline use for the geotag data, so...
The script will take all the photos from the input folder, copy them in the output folder, adding a picture with a map of the area before each photo. The picture and the reverse geocoding will be downloaded through Google Maps (free APIs currently allow up to 2500 geocoding requests per day).
In this way, a map for every photo will be created; if you start a slideshow from the output folder in alphabetical order, you will see the map before each photo.
The script will ignore photos without geotag data.


Install the following packages in R, if they are not installed already, by using the install_packages(...) command, before using the script:

  • exifr
  • ggplot2
  • ggmap
  • tools
  • jpeg

Simply put the script wherever you wish; in the same folder, create a folder named "inputFolder" which will contain all your geotagged photos.



  1. Put all your JPG geotagged photos in a folder (conveniently named "inputFolder");
  2. Run the script file ("slideshow-mapmakeR.R") in R (it may take a while, depending on the number of photos);
  3. Enjoy the photos and maps in the output folder (named "outputFolder" followed by the system date).

The script was written quickly, so it can be improved; I tried to comment the interesting parts, so you can further customize it (ie map type, etc.).


Resulting map:

Original photo:



Script by Stefano Tripi.


Text open sourced under the CC-BY-4.0 license.
Code open sourced under the MIT license.