plot_geo: Initiate a plotly-geo object

Description Usage Arguments Author(s) See Also Examples

View source: R/plotly.R

Description

Use this function instead of plot_ly() to initialize a plotly-geo object. This enforces the entire plot so use the scattergeo trace type, and enables higher level geometries like add_polygons() to work

Usage

1

Arguments

data

A data frame (optional).

...

arguments passed along to plot_ly().

offline

whether or not to include geo assets so that the map can be viewed with or without an internet connection. The plotlyGeoAssets package is required for this functionality.

Author(s)

Carson Sievert

See Also

plot_ly(), plot_mapbox(), ggplotly()

Examples

1
2
3
4
map_data("world", "canada") %>%
  group_by(group) %>%
  plot_geo(x = ~long, y = ~lat) %>%
  add_markers(size = I(1))

plotly documentation built on Nov. 8, 2019, 1:07 a.m.