Prepares the base of a map, starting from a data frame with longitude (long) and latitude (lat) coordinates, as a 'ggplot2' object
Source:R/ggswissmaps_00funs.R
maps2_.Rd
Prepares the base of a map, starting from a data frame with longitude (long) and latitude (lat) coordinates, as a 'ggplot2' object
Usage
maps2_(
data,
mapping = ggplot2::aes(x = .data[["long"]], y = .data[["lat"]], group =
.data[["group"]]),
caption = "Boundaries: BFS GEOSTAT / swisstopo"
)
Arguments
- data
data frame with longitude, latitude and group coordinates of a territory (polygons)
- mapping
Aesthetic mappings, as character strings (
link{ggplot2::aes_string}
). Defaults arex = "long"
,y = "lat"
andgroup = "group"
(these work with every element of the listshp_df
of ggswissmaps)- caption
text to include in the lower right corner of the map (default: "Boundaries: BFS GEOSTAT / swisstopo")
Examples
data(shp_df)
maps2_(data = shp_df[[1]])