The data set give the locations of 1000 seismic events of MB > 4.0. The events occurred in a cube near Fiji since 1964.
library(plotly)
data("quakes")
g <- list(scope = "world",
# center = list(lon = mean(quakes$long), lat = mean(quakes$lat)),
projection = list(type = 'natural earth'),
showland = TRUE,
landcolor = toRGB("gray95"),
subunitcolor = toRGB("gray85"),
countrycolor = toRGB("gray85"),
countrywidth = 0.5,
subunitwidth = 0.5)
fig <- plot_geo(quakes, lat =quakes$lat, lon = quakes$long)
fig <- fig %>% add_markers(
text = paste("Depth:", quakes$depth),
size = 5 * quakes$mag,
color = quakes$mag,
colorscale = "Viridis",
reversescale = TRUE
)
fig <- fig %>% layout(title = "Location of Earthwuakes off Fiji", geo = g)
fig <- fig %>% colorbar(title = "Magnitude")
fig