As reported in geojson format from sources listed at http://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php.
Generated on 2016-10-23 18:20:59 by Ted Cook
eqGeoJSON <- fromJSON('http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson')
eventData <- select(eqGeoJSON$features$properties, mag, url)
eventData$id <- select(eqGeoJSON$features, id)
coordRaw <- select(eqGeoJSON$features$geometry, coordinates)
coordData <- as.data.frame(matrix(unlist(coordRaw$coordinates), ncol=3, byrow = TRUE))
eventData$latitude <- coordData$V2
eventData$longitude <- coordData$V1
eventData$depth <- coordData$V3
leaflet(data=eventData, width=907, height = 600) %>%
addTiles() %>%
setView(lat=9.936884, lng=-84.2155994, zoom=4) %>%
addCircleMarkers(lng = ~longitude, lat = ~latitude, radius = ~mag, clusterOptions = markerClusterOptions(), popup = ~htmlEscape(id))