embed_gmap: Get and embed a 'ggmap' in a tibble

View source: R/mapping.r

embed_gmapR Documentation

Get and embed a ggmap in a tibble

Description

ggmap objects won't nicely go into a cell in a tibble. This function gets a ggmap and then wraps it in a list, allowing it to go into a tibble.

Usage

embed_gmap(left, bottom, right, top, zoom, maptype, ...)

Arguments

left

(numeric) part of the bounding box

bottom

(numeric) part of the bounding box

right

(numeric) part of the bounding box

top

(numeric) part of the bounding box

zoom

(numeric) the zoom level

maptype

(character) the map type

...

other arguments passed to ggmap::get_stamen_map

Value

a ggmap object wrapped in a list

Examples

## Not run: 
embedded_maps <- base_map_params %>%
	filter(geo_level == "state") %>%
	mutate(gmap = embed_gmap(left, bottom, right, top, zoom, maptype)) %>%
	ungroup()

## End(Not run)

baslat/sak documentation built on April 14, 2025, 4:14 p.m.