Description Usage Arguments Value References See Also Examples
eq_map
displays an interactive map showing earthquake locations from the NOAA earthquake data. eq_map
uses
the leaflet R package to
1 |
df |
is the cleaned NOAA data frame after |
annot_col |
is a single text value for the column name to be displayed as the popup value when the user hovers over
a data point on the map. This column can be a single data item, for example "DATE" or this can be a column of combined
values using the |
pretty |
single logical value. If pretty is true, the columne name of 'annot_col' is displayed prior to the value in the popup. If pretty is FALSE or not passed, only the value is displayed. |
the cleaned NOAA data frame
The NOAA earthquake database https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1 and the data defintions can be found at https://www.ngdc.noaa.gov/nndc/struts/results?&t=101650&s=225&d=225
eq_create_label
to create popup display with multiple columns and
eq_clean_data
to prepare the NOAA data
1 2 3 4 5 6 7 | ## Not run:
readr::read_delim("earthquakes.tsv.gz", delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
eq_map(annot_col = "DATE", pretty = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.