Description Usage Arguments Details Value See Also Examples
Generates interactive earthquake map and related data.
1 |
data |
The |
annot_col |
A column to use for the popup annotation. The user can select a
single column; otherwise you can create a more informative label first by using
the |
eq_map
creates an interactive leaflet
map
showing the location of earthquakes in the given earthquakes
data set.
This function shows an interactive map of the location of the earthquakes in
the given earthquakes
data. The size of the circles are
proportional to the magnitude of the earthquakes (in the EQ_PRIMARY
)
variable. The map is interactive, and when you click on a link, the popup
shows the annotation as specified by the annot_col
variable.
Returns an interactive leaflet
map.
eq_create_label
to create a more informative popup
annotation in the earthquakes
data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Using "Date_ymd" column as annotation
## Not run:
earthquakes <- earthquakes %>%
dplyr::filter(Country == 'China') %>%
dplyr::filter(lubridate::year(Date_ymd) >= 2000)
eq_map(earthquakes, annot_col = 'Date_ymd')
earthquakes <- earthquakes %>%
dplyr::filter(Country == 'China') %>%
dplyr::filter(lubridate::year(Date_ymd) >= 2000) %>%
dplyr::mutate(Popup_Text = eq_create_label(.)) %>%
eq_map(annot_col = "Popup_Text")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.