README.md

photomapr

Travis build status AppVeyor build status

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).

Installation

Install development version from GitHub with:

# install.packages("devtools")
devtools::install_github("robinlovelace/photomapr")

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():

library(photomapr)

(photo_files = geotagged_photo_paths())
#> [1] "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190523_120605_logo.jpg"
#> [2] "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190523_135034_logo.jpg"
#> [3] "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190524_104545_logo.jpg"
#> [4] "/usr/local/lib/R/site-library/photomapr/photos/IMG_20190524_110720_logo.jpg"
#> [5] "/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:

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:

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



Robinlovelace/photomapr documentation built on June 7, 2019, 5:10 a.m.