Description Usage Arguments Details Value Examples
Generates HTML labels for earthquake map
1 |
data |
The |
eq_create_label
creates a more descriptive and HTML-formatted popup
label to be used in eq_map
.
This function creates a vector of HTML-formatted labels using supplied
earthquakes
data. The function creates lines of the format
Label: value
from the following variables in the
earthquakes
data set:
Date_ymd
Location_Name (as cleaned in the eq_location_clean
function).
EQ_Primary (earthquake magnitude)
Total_Deaths
Any of the above variables with missing/NA values are omitted from the label.
A vector with the HTML-formatted labels. Include this
vector with the data frame that is sent to eq_map
.
1 2 3 4 5 6 7 8 | ## Not run:
earthquakes <- earthquakes %>%
dplyr::filter(Country == 'China') %>%
dplyr::filter(lubridate::year(Date_ymd) >= 2000) %>%
dplyr::mutate(Popup_Text = eq_create_label(.))
eq_map(earthquakes, 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.