View source: R/layer_area_streets.R
layer_area_streets | R Documentation |
Add a layer to a gpplot2 map with area streets, street names, or both.
layer_area_streets(
area = NULL,
street_type = NULL,
sha_class = NULL,
dist = NULL,
diag_ratio = NULL,
asp = NULL,
trim = FALSE,
msa = FALSE,
show_streets = TRUE,
show_names = FALSE,
name_location = NULL,
edge_dist = 10,
color = "gray40",
size = 1,
...
)
area |
sf object. Returns streets within this area (after adjustment by dist, diag_ratio, and asp parameters) |
street_type |
selected street subtypes to include. By default, the returned data includes all subtypes except alleys ("STRALY"). Options include c("STRALY", "STRPRD", "STRR", "STREX", "STRFIC", "STRNDR", "STRURD", "STCLN", "STRTN") |
sha_class |
selected SHA classifications to include. "all" selects all streets with an assigned SHA classification (around one-quarter of all street segments). Additional options include c("COLL", "LOC", "MART", "PART", "FWY", "INT") |
dist |
buffer distance in meters. Optional. |
diag_ratio |
ratio to set map extent based diagonal distance of area's
bounding box. Ignored when |
asp |
Aspect ratio of width to height as a numeric value (e.g. 0.33) or character (e.g. "1:3"). |
trim |
Logical. Default |
msa |
Logical. Default |
show_streets |
Logical. Default TRUE. If FALSE, hides street center lines. |
show_names |
Logical. Default FALSE. If TRUE, shows street names. |
name_location |
Options include c("area", "edge", "top", "left", "bottom", "right", "topleft", "topright", "bottomleft", "bottomright"). Defaults to NULL. |
edge_dist |
Distance buffer to use for placing street names. |
color |
Color of streets and/or text of street name labels. |
size |
Size of the streets and/or street name labels. |
... |
Other parameters to pass along to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.