Description Usage Arguments Details Value References See Also Examples
Create an interactive map of historical earthquakes using the NOAA earthquake database included with this package. Earthquakes are plotted as circles with their radii proportional to the magnatude of the earthquakes. Optionally, labels can be passed which will pop up when the earthquake is clicked on the map
1 |
data |
A dataframe with earthquake location columns |
annot_col |
The character name of the column in |
This function uses of the popular leaflet
package, which creates interactive
html maps within R
An html map object, to which further Leaflet objects can be added
NOAA earthquake database: https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1
leaflet
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data('clean_NOAA')
clean_NOAA %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
eq_map(annot_col = "DATE")
data('clean_NOAA')
clean_NOAA %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
dplyr::mutate(popup_text = eq_create_label(.)) %>%
eq_map(annot_col = "DATE")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.