View source: R/make_location_map.R
make_location_map | R Documentation |
Location is used as the data parameter of layer_location_data so this
function is primarily appropriate for the layer_mapbox (geom = "mapbox"
).
make_location_map( location, dist = NULL, diag_ratio = NULL, unit = NULL, asp = NULL, data = NULL, crs = NULL, paper = "Letter", orientation = NULL, geom = "sf", basemap = TRUE, bg_layer = NULL, fg_layer = NULL, save = FALSE, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, device = NULL, path = NULL, dpi = 300, ... ) make_social_map( location, dist = NULL, diag_ratio = NULL, unit = NULL, asp = NULL, crs = 3857, image = NULL, platform = NULL, format = NULL, orientation = NULL, basemap = TRUE, geom = "mapbox", save = FALSE, name = NULL, filename = NULL, label = NULL, prefix = NULL, postfix = NULL, path = NULL, filetype = "jpeg", dpi = 72, ... ) make_image_map( image_path, location = NULL, dist = NULL, diag_ratio = NULL, unit = NULL, asp = NULL, data = NULL, crs = 3857, paper = "Letter", orientation = NULL, geom = "mapbox", style_url = NULL, basemap = TRUE, bg_layer = NULL, fg_layer = NULL, save = FALSE, name = NULL, label = NULL, prefix = NULL, postfix = NULL, filename = NULL, device = NULL, path = NULL, dpi = 300, image_geom = "label", groupname_col = NULL, group_meta = NULL, number = FALSE, num_by_group = FALSE, num_style = NULL, num_start = 1, suffix = NULL, sort = "dist_xmin_ymax", desc = FALSE, ... )
location |
sf object. If multiple areas are provided, they are unioned into a single sf object using sf::st_union |
dist |
buffer distance in units. Optional. |
diag_ratio |
ratio of diagonal distance of area's bounding box used as
buffer distance. e.g. if the diagonal distance is 3000 meters and the
"diag_ratio = 0.1" a 300 meter will be used. Ignored when |
unit |
Units for buffer. Supported options include "meter", "foot", "kilometer", and "mile", "nautical mile" Common abbreviations (e.g. "km" instead of "kilometer") are also supported. Distance in units is converted to units matching GDAL units for x; defaults to "meter" |
asp |
Aspect ratio of width to height as a numeric value (e.g. 0.33) or
character (e.g. "1:3"). If numeric, |
data |
Character string (e.g. url, file path, or name of data from
package), a |
crs |
Coordinate reference system of bounding box to return |
paper |
Paper, Default: 'letter'. |
orientation |
Orientation "portrait", "landscape", or "square", Default: 'portrait'. |
geom |
A character string indicating which ggplot2 geom to use, Default: 'sf'. Options include "sf" (ggplot2::geom_sf), "icon" (layer_icon), "markers" (layer_markers), "text" (ggplot2::geom_sf_text), and "label" (ggplot2::geom_sf_label). See details for a full list. |
basemap |
If |
bg_layer, fg_layer |
A ggplot2 layer or a list of ggproto objects (e.g.
scales, labels, etc.) to add to the background or foreground of the primary
map layer defined by |
save |
If |
name |
Plot name, used to create filename (if filename is |
label |
Label to combine with name converted to snake case with
|
prefix |
File name prefix. "date" adds a date prefix, "time" adds a
date/time prefix; defaults to |
postfix |
File name postfix; defaults to |
filename |
File name to create on disk. |
device |
Device to use. Can either be a device function (e.g. png), or one of "eps", "ps", "tex" (pictex), "pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only). |
path |
Path of the directory to save plot to: |
dpi |
Plot resolution. Also accepts a string input: "retina" (320), "print" (300), or "screen" (72). Applies only to raster output types. |
... |
Additional parameters passed to layer_location_data. |
image |
Image size name, Default: |
platform |
Social media platform, "Instagram", "Facebook", or "Twitter",
Default: |
format |
Image format, "post", "story", or "cover", Default: |
filetype |
File type to use if passing parameters to read_sf_download or read_sf_pkg (required for extdata and cached data). |
image_path |
path to location of images for |
style_url |
A Mapbox style url; defaults to |
image_geom |
For |
groupname_col |
Group column name, used to join group metadata if
group_meta is a non-spatial data frame; Default: |
group_meta |
Group metadata as a data frame or sf object that intersect
with markers; Default: |
number |
If |
num_by_group |
If |
num_style |
Style of enumeration, either "arabic", "alph", "Alph", "roman", "Roman" |
num_start |
Starting number; defaults to 1. |
suffix |
Character to appended to "number" column. (e.g. "." for "1." or ":" for "1:"). Can also be a character vector with the same length as the number column. |
sort |
Sort column name, Default: "dist_xmin_ymax". |
desc |
If |
Using make_image_map:
make_image_map wraps read_sf_exif and make_location_map. It is designed for making simple maps of photos in combination with reference tables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.