layer_urban_base() draws the base map that sits under the symbols of a
plate: the shoreline and the street network, in the single tan ink of the
original topographic sheets. Streets are the land-based segments of the
LION file, so offshore lines such as ferry routes, and tunnels under the
rivers, do not appear. The layer draws highways, bridges, and ramps
slightly heavier than local streets.
Usage
layer_urban_base(
bbox = NULL,
strength = 1,
shoreline = TRUE,
streets = TRUE,
palette = NULL,
refresh = FALSE
)Arguments
- bbox
An
sf,sfc, orbboxobject. The layer crops the base map to its bounding box, which keeps plots of part of the city fast. The default,NULL, draws the whole city.- strength
How strongly the base map is drawn.
1is a quiet base that sits behind the symbols. Larger values give heavier, darker lines.- shoreline, streets
Whether to draw each feature.
- palette
The ink palette, passed to
urban_inks().- refresh
If
TRUE, rebuild the cached street layer, for example after a LION update.
Details
The layer needs the nycmaps and nyclion packages. Building the street layer takes some seconds the first time. The layer then caches it in the user cache directory of this package.
Examples
if (FALSE) { # \dontrun{
library(ggplot2)
ggplot() +
layer_urban_base(strength = 1.5) +
theme_urban()
} # }