I noticed that USGS has published JSON data with the volcanoes of the world and that is simply too interesting to miss, so here is a very short R script to view the data on a map. This script will:
- Download the JSON data
- Convert to sf geometry
- View the volcanoes on a map
#Load libraries
library(jsonlite)
library(mapview)
library(sf)
# Define URL
url <- "https://volcview.wr.usgs.gov/vv-api/volcanoApi/wwvolcanoes"
# JSON
json_data <- fromJSON(url)
# sf geometry, EPSG=4326
volcanoes <- st_as_sf(json_data, coords = c("lng", "lat"), crs = 4326)
# View result on map
mapview(volcanoes, col.regions = "RED")
A few images of the result:
If you want to create a web map, have a look at Creating an interactive web map using R/Leaflet. I you just want the map, it´s right here: