Make detail maps
make_detail_map.Rd
Make detail maps, e.g. nodes of development within a broader area, examples
of a type using data created by using dplyr::group_by()
and
dplyr::group_nest()
if the data is an sf object and keep = TRUE.
Usage
make_detail_map(
detail,
dist = NULL,
diag_ratio = NULL,
layer_fn = NULL,
context = NULL,
context_dist = 0,
groupname_col = NULL,
geom = NULL,
palette = NULL,
aesthetics = c("color", "fill"),
size = 5,
alpha = 1,
number = FALSE,
paper = NULL,
orientation = NULL,
access_token = Sys.getenv("MAPBOX_SECRET_TOKEN"),
map_style = NULL,
scale = 1,
cols = 1,
rows = 1,
margin = "none",
gutter = 0,
sort = "lon",
neatline = TRUE,
neatline_params = list(dist = 0, diag_ratio = NULL, color = "black", size = 1, expand
= TRUE),
crs = NULL,
fn = NULL,
inset_legend = TRUE,
legend_position = "bottomleft",
labs_ext = NULL,
below = NULL,
above = NULL,
...
)
make_section_map(
section,
dist = NULL,
diag_ratio = NULL,
section_asp = NULL,
groupname_col = NULL,
access_token = NULL,
map_style = snapbox::mapbox_gallery_moonlight(),
size = 5,
alpha = 1,
geom = NULL,
sort = NULL,
scale = 0.5,
number = FALSE,
neatline = TRUE,
neatline_params = list(dist = 0, diag_ratio = NULL, color = "black", size = 1, expand
= TRUE),
expand = TRUE,
crs = NULL,
fn = NULL,
layer_fn = NULL,
below = NULL,
above = NULL,
...
)
Arguments
- detail
an sf object (or object that is convertible with
overedge::as_sf()
), list of sf objects, or data frame with a sf list column named data- context
Broader context area containing all detail maps, Default: NULL
- size
Size number (only used for "ISO" and "JIS" series). Standard, series, and size may all be required to return a single paper when using these parameters.
- number
If TRUE, number data, Default: FALSE
- paper
Paper, Default: 'letter'.
- orientation
Orientation "portrait", "landscape", or "square", Default: 'portrait'.
- access_token
Mapbox access token, Default: NULL
- scale
Scale, Default: 0.6
- cols
Number of expected columns and rows in paper; used to determine row_height and section_asp in paper data frame returned by get_paper if rows or cols is greater than 1; defaults to
NULL
.- rows
Number of expected columns and rows in paper; used to determine row_height and section_asp in paper data frame returned by get_paper if rows or cols is greater than 1; defaults to
NULL
.- margin
Margin style (options include "extrawide", "wide", "standard", "narrow", "none"), Additional "auto" option to generate margin based on line length is planned but not yet implemented. Default:
NULL
(equivalent to "none").- gutter
Gutter distance in units. Gutter is used as the spacing between rows and columns (variable spacing is not currently supported); defaults to 0.
- neatline_params
List with dist, diag_ratio, color, size, and expand passed on to layer_neatline.
- fn
Function, Default: NULL
- labs_ext
Label object created with ggplot2::labs or overedge::labs_ext function.
- ...
Additional parameters used by various functions.
- section
Section (sf obect)
- section_asp
Aspect ratio, Default: NULL
- overlay
Overlay, Default: NULL
Details
Make section map:
All parameters that are specific to individual section maps should be passed to sect_params. asp is automatically calculated based on the width and height of the overall paper, and the number of rows and columns specified in make_detail_map.
Some make_detail_map parameters are passed on directly to make_section_map including:
fn (applied to each section before mapping - may be useful for recoding labels)
access_token and scale - used to create section base map
number - indicator of whether to call layer_number_markers and add to layers for section map
All other parameters are defined by the dots ... Supported options for ... are passed to one of the following functions:
layer_number_markers: sort, number_col, and group_col parameters
overedge::theme_legend: all parameters (except method) area supported but these parameters must be passed as a list so they can be called in the following way, e.g. sect_params$legend$position.
overedge::layer_neatline: the expand parameter for and the parameter neatline_dist to allow the adjustment of the section neatline (needed for the expand parameter to work as expected)
All of these variables are currently defined globally and cannot be modified for detail maps with the section (unless you call make_section_map directly).