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.
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).
Install development version from GitHub with:
# install.packages("devtools") devtools::install_github("robinlovelace/photomapr")
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
library(photomapr) (photo_files = geotagged_photo_paths()) #>  "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190523_120605_logo.jpg" #>  "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190523_135034_logo.jpg" #>  "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190524_104545_logo.jpg" #>  "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190524_110720_logo.jpg" #>  "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190524_200945_logo.jpg" photos_geo = photos_sf(photo_files) plot(photos_geo["DateTimeOriginal"], key.pos = 1)
Let's create a simple photomap, using data shipped in the package:
You can also preview your photos with a slideshow in RStudio:
The package works bringing together functionality from a number of excellent packages, including:
leafletfor interactive maps
magickwhich provides powerful tools for image processing
exifrfor extracting metadata (critically the GPS location) from photos
sffor 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.