Skip to contents

Location layers for ggplot2 maps

layer_location_data()
Layer location data into a ggplot2 map
layer_labelled()
Label simple feature objects in a location
layer_location()
Layer a location border into a ggplot2 map
layer_location_context()
Create a layer showing a location and related context

Map making for locations

layer_frame() make_frame()
Create a frame layer around a simple feature object
layer_inset() make_inset_map() stamp_inset_img()
Use patchwork to create a map with an inset context map or figpatch to stamp an inset image
layer_markers() layer_numbers() make_markers()
Create a ggplot2 layer with map markers or numbered markers
make_location_map() make_social_map() make_image_map() make_layer_map()
Make a ggplot map using layer_location_data()
make_mapbox_map()
Make a map using layer_mapbox
set_basemap() make_basemap()
Create a base map by adding the object

Additional layers for sf objects

layer_arrow()
Create a layer with an arrow or segment from and to specified locations
layer_count()
Layer for counting occurrences of data in spatial relation a location or other sf object
layer_frame() make_frame()
Create a frame layer around a simple feature object
layer_grouped()
Make group layers
layer_icon() geom_sf_icon()
Use ggsvg to add a layer with icons at feature locations
layer_image_path()
Use ggpath to create a layer with images at locations
layer_mapbox()
Use mapboxapi to make a Mapbox static map layer
layer_marked()
Use ggforce to create an annotation layer using simple feature data
layer_markers() layer_numbers() make_markers()
Create a ggplot2 layer with map markers or numbered markers
layer_mask() set_mask()
Create a mask layer based on a simple feature object
layer_neatline() theme_grid() theme_sf_axis() set_neatline()
Set map limits to a bounding box with a buffer and set aspect ratio
layer_repel() geom_sf_label_repel() geom_sf_text_repel()
Use ggrepel to create text annotations based on simple features
layer_scaled()
Create a ggplot2 layer scaled to a paper and orientation for a location

Additional layers for combining maps with patchwork

layer_inset() make_inset_map() stamp_inset_img()
Use patchwork to create a map with an inset context map or figpatch to stamp an inset image

Add scales, labels, and theme elements to ggplot2 maps

labs_ext()
Add labels to a ggplot2 plot or map
scale_group_data() group_data_pal() get_group_data_pal_scale()
Create discrete fill and color scales for grouped data
theme_text() theme_margin() theme_legend()
Modify the text, margins, or legend for a ggplot theme

Save one or more plot or map to a file

Reference data for layer functions

map_icons
Map icons

Reexports from ggplot2