mapbox | R Documentation |
Use mapbox.
e_mapbox(e, token, ...)
e |
An |
token |
Your mapbox token from mapbox. |
... |
Any option. |
Mapbox may not work properly in the RSudio console.
Official documentation, mapbox documentation
## Not run:
url <- paste0(
"https://echarts.apache.org/examples/",
"data-gl/asset/data/population.json"
)
data <- jsonlite::fromJSON(url)
data <- as.data.frame(data)
names(data) <- c("lon", "lat", "value")
data |>
e_charts(lon) |>
e_mapbox(
token = "YOUR_MAPBOX_TOKEN",
style = "mapbox://styles/mapbox/dark-v9"
) |>
e_bar_3d(lat, value, coord_system = "mapbox") |>
e_visual_map()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.