Initiate a plotly-geo object
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
plot_geo(data = data.frame(), ..., offline = FALSE)
data |
A data frame (optional). |
... |
arguments passed along to |
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. |
Carson Sievert
map_data("world", "canada") %>% group_by(group) %>% plot_geo(x = ~long, y = ~lat) %>% add_markers(size = I(1))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.