The goal of photomapr is to make it easier to create photomaps. A photomap is an interactive map which shows the location of places where photos have been taken. Ideally, photomaps should be able to display the photo of interest when you click on it.

Why create your own photomaps?

Photomaps and photo albums are a great way to share experiences and remember good times. A good example of a photomap is that created by default by Flickr when an album of geotagged photos has been created. The image below shows a publicly available Flickr photomap, showing photos taken during a cycling holiday from the Knepp Estate rewilding project to Lewes, which ended by passing though Marble Arch in London.

This approach has limitations, however. You must sign-up to Flickr and other services that create photomaps ‘in the cloud’, creating a barrier to entry. Furthermore, creating a photomap online often involves sending valuable and sometimes highly personal data to corporations. That can be problematic, as outlined in the book and podcast series Team Human by Douglas Rushkoff.

This package aims to make it easy to create photomaps locally and, if you want, deploy the results online. An example of photomaps is bookdown.org/robinlovelace/madrid-santiago-2019, a photomap developed using an early version of this package, a screenshot of which is shown below (see here to see how the package was used to create this photobook containing photomaps).

Usage

The first stage is to decide the photos you want. The package cannot help you with that, but once you do have a number of photo files, represented by photo_files below, you can convert them to a geographic data frame with the function photos_sf():

Let’s create a simple photomap, using data shipped in the package:

photomap(photo_files)

You can also preview your photos with a slideshow in RStudio:

slideshow(photo_files) 

How it works

The package works bringing together functionality from a number of excellent packages, including:

  • leaflet for interactive maps
  • magick which provides powerful tools for image processing
  • exifr for extracting metadata (critically the GPS location) from photos
  • sf for providing a class system for spatial data

Thanks to the developers of these packages, and to everyone making and using open source software. Without you this project would be impossible.

Next steps

  • Clicking on photos in photomap opens photo
  • Auto-generation of photo albums with maps
  • Deployment of photomaps online?