New to Plotly?
Plotly's R library is free and open source!
Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode.
We also have a quick-reference cheatsheet (new!) to help you get started!
##  '18.104.22.16800'
Mapbox Access Token
Stamen Terrain Tile, no Token Needed
library(plotly) quakes = read.csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv') p <- quakes %>% plot_ly( type = 'densitymapbox', lat = ~Latitude, lon = ~Longitude, coloraxis = 'coloraxis', radius = 10) %>% layout( mapbox = list( style="stamen-terrain", center= list(lon=180)), coloraxis = list(colorscale = "Viridis")) # Create a shareable link to your chart # Set up API credentials: https://plot.ly/r/getting-started chart_link = api_create(p, filename="density-with-token") chart_link
See https://plot.ly/r/reference/#densitymapbox for more information and options!