## maptools (NA -> 1.1-8) [CRAN]
## rgdal (NA -> 1.6-7) [CRAN]
## rgeos (NA -> 0.6-4) [CRAN]
## ── R CMD build ─────────────────────────────────────────────────────────────────
## * checking for file ‘/tmp/RtmplweIYx/remotes804a73a626f2/hrbrmstr-albersusa-07aa87f/DESCRIPTION’ ... OK
## * preparing ‘albersusa’:
## * checking DESCRIPTION meta-information ... OK
## * checking for LF line-endings in source and make files and shell scripts
## * checking for empty or unneeded directories
## * building ‘albersusa_0.4.1.tar.gz’
mapview can be used in piped expressions using
%>%
, most likely at the very end of it…
Here are just a few examples of piped workflows:
plot
ting feature unions
library(mapview)
library(poorman)
library(leaflet)
library(sf)
# GitHub: hrbrmstr/albersusa
library(albersusa)
franconia %>%
st_union %>%
plot
breweries %>%
st_intersection(franconia) %>%
mapview(zcol = "district")
franconia %>%
mutate(count = lengths(st_contains(., breweries)),
density = count / as.numeric(st_area(.))) %>%
mapview(zcol = "density")
native.crs
for a USA composite map
albersusa::usa_composite("laea") %>%
mapview(native.crs = TRUE, zcol = "pop_2014", legend = TRUE)
native.crs
albersusa::usa_composite("laea") %>%
mapview(zcol = "pop_2014", legend = TRUE)