R Markdown and Leaflet

Dataset The Smithsonian Institution’s Global Volcanism Program (GVP) documents Earth’s volcanoes and their eruptive history over the past 10,000 years. The GVP reports on current eruptions from around the world and maintains a database repository on active volcanoes and their eruptions. The GVP is housed in the Department of Mineral Sciences, part of the National Museum of Natural History, on the National Mall in Washington, D.C.

The GVP database includes the names, locations, types, and features of more than 1,500 volcanoes with eruptions during the Holocene period (approximately the last 10,000 years) or exhibiting current unrest.

dat <- read.csv("database.csv")

structure of the dataset:

str(dat)
## 'data.frame':    1508 obs. of  12 variables:
##  $ Number             : int  210010 210020 210030 210040 211001 211003 211004 211010 211020 211030 ...
##  $ Name               : Factor w/ 1478 levels "Abu","Acamarachi",..: 1429 236 949 209 711 1418 274 215 1405 553 ...
##  $ Country            : Factor w/ 100 levels "Algeria","Algeria-Niger",..: 43 41 85 85 53 53 53 53 53 53 ...
##  $ Region             : Factor w/ 19 levels "Africa and Red Sea",..: 12 12 12 12 12 12 12 12 12 12 ...
##  $ Type               : Factor w/ 33 levels "Caldera","Caldera(s)",..: 16 14 18 18 8 1 1 1 22 3 ...
##  $ Activity.Evidence  : Factor w/ 7 levels "","Eruption Dated",..: 2 2 4 2 3 3 5 3 3 3 ...
##  $ Last.Known.Eruption: Factor w/ 399 levels "0 CE","1000 CE",..: 378 312 399 303 34 4 399 53 194 37 ...
##  $ Latitude           : num  50.2 45.8 42.2 38.9 43.2 ...
##  $ Longitude          : num  6.85 2.97 2.53 -4.02 10.87 ...
##  $ Elevation..Meters. : int  600 1464 893 1117 500 800 949 458 1281 789 ...
##  $ Dominant.Rock.Type : Factor w/ 12 levels "","Andesite / Basaltic Andesite",..: 5 3 11 3 6 12 5 12 7 12 ...
##  $ Tectonic.Setting   : Factor w/ 12 levels "","Intraplate / Continental Crust (>25 km)",..: 5 5 2 2 8 8 8 8 8 8 ...
dat <- dat[!is.na(dat$Longitude)&!is.na(dat$Latitude),]
library(leaflet)
dat %>% 
  leaflet() %>% 
  addTiles() %>% 
  addMarkers(popup=dat$database.csv , clusterOptions=markerClusterOptions())
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively