Skip to content

Instantly share code, notes, and snippets.

@njtierney
Created December 8, 2015 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njtierney/e5da929db3d31bf91f49 to your computer and use it in GitHub Desktop.
Save njtierney/e5da929db3d31bf91f49 to your computer and use it in GitHub Desktop.
# assuming data has columns named something like: "lat", "long", and "timestamp"
library(ggmaps)
library(ggplot2)
ggplot(data = data,
aes(x = lat,
y = long)) +
geom_point() +
coord_map()
# facet_wrap(~timestamp)
# using an interactive model html widgets
library(htmlwidgets)
library(leaflet)
# experimental, might not work!
m <- leaflet(data) %>% addCircles
m
# try and colour according to time
m %>% addCircleMarkers(colour = timestamp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment