This interactive map shows the locations of large earthquakes in the United States from 2020 to 2025. The data from USGS shows earthquakes with a magnitude higher than 4.5. This interactive map will show the locations of each earthquake as well as highlight which regions and cities are most prone to damages from earthquakes.
pal <- colorNumeric( palette = "YlOrRd",
domain = data$mag)
leaflet() |>
addProviderTiles(providers$Esri.WorldImagery) |>
addProviderTiles(providers$CartoDB.PositronOnlyLabels) |>
addCircleMarkers(data = data,
popup = ~place,
label = ~mag,
color = ~pal(mag),
fillColor = ~pal(mag),
clusterOptions = markerClusterOptions(disableClusteringAtZoom = 6, zoomToBoundsOnClick = T)) |>
addLegend(data = data, pal = pal, values = ~mag, title = "Magnitude", position = "bottomright")
For my interactive map I modeled used the USGS Earthquake Catalog to model earthquakes in the continental US. In my data I have earthquakes from 2020 to present day and am only including earthquakes with a magnitude of 4.5 or higher. For my basemap I decided to use the ESRI world imagery basemap along with the CartoDB basemap labels to add country, state, and city labels to the map. I modeled the earthquakes using circle markers, but there was clustering around California due to the higher number of earthquakes the region gets, so I clustered the earthquakes to make the map easier to view. I labeled each marker with the earthquake’s magnitude and the popup is a location description with the distance from the nearest city.