## maptools (NA -> 1.0-2) [CRAN]
## rgeos (NA -> 0.5-5) [CRAN]
##
checking for file ‘/tmp/Rtmp8g4bwq/remotes1caf57380cfc/hrbrmstr-albersusa-07aa87f/DESCRIPTION’ ...
✔ checking for file ‘/tmp/Rtmp8g4bwq/remotes1caf57380cfc/hrbrmstr-albersusa-07aa87f/DESCRIPTION’
##
─ preparing ‘albersusa’:
##
checking DESCRIPTION meta-information ...
✔ checking DESCRIPTION meta-information
##
─ 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(leaflet)
library(dplyr)
library(sf)
# GitHub: hrbrmstr/albersusa
library(albersusa)
franconia %>%
st_union %>%
plot
franconia %>%
group_by(district) %>%
summarize %>%
mutate(area = as.numeric(st_area(.) / 1e6)) %>%
mapview(zcol = "area")
franconia %>%
mutate(area = as.numeric(st_area(.))) %>%
mapview(zcol = "area", legend = TRUE)
breweries %>%
st_intersection(franconia) %>%
mapview(zcol = "district")
franconia %>%
mutate(count = lengths(st_contains(., breweries))) %>%
mapview(zcol = "count")
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)