Document your hike with interactive leaflets and R

December 7, 2015
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Maarten Hermans is a sociologist and researcher at KU Leuven in Belgium and an avid hiker. He uses an Android app to track his location and elevation on his hikes, which means he can download his hike data in GPS Exchange Format. With this data and a few R packages, he was then able to create interactive topological maps including his route and photos along the way.

Hikes

Maarten used R's rgdal package to convert the GPS data into a list of waypoints, which he then plotted on an interactive topological map using the leaflet package from RStudio. Adding photos to the route was a little trickier: Maarten had to write an R function to extract the GPS coordinates of each photo from the EXIF metadata, before adding photo markers to the map using the addMarkers function from the leaflet package. Click the screenshot above to try the interactive version of the map, which is included in Maarten's tutorial (with R code) on how to create interactive maps from hiking data.

Maarten Hermans: Visualising your hiking trails and photos with My Tracks, R and Leaflet

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)