rm(list=ls())
library(mapmate)
library(dplyr)
library(RColorBrewer)
<- rev(brewer.pal(11, "BrBg"))
pal ::display.brewer.all()
RColorBrewer
data(annualtemps)
data(borders)
data(bathymetry)
<- "frameID"
id <- mutate(annualtemps, frameID = Year - min(Year) + 1) %>%
temps filter(frameID == 1) # subset to first frame
<- temps%>%full_join(borders,by=c("lon","lat"))
my_df
<- mutate(borders, frameID = 1)
brdrs <- mutate(bathymetry, frameID = 1)
bath
save_map(brdrs, id = id,
type = "maplines", save.plot = FALSE, return.plot = TRUE)
save_map(my_df, id = id,
col = pal,
type = "density", contour = "overlay", save.plot = FALSE,
return.plot = TRUE)
Overview
John Snow’s 1854 Cholera Deaths London’s Map. Data: Blog.RtWilson.com
.
{mapmate} vignettes
- https://rdrr.io/github/leonawicz/mapmate/f/vignettes/mapmate.Rmd
- https://leonawicz.github.io/mapmate/articles/usage_and_limitations.html