Description Usage Arguments Value Examples
This function contructs a vector of html-formatted strings by using the input data
's
location
, magnitude
, total_deaths
columns. Those columns are titled
accordingly. If, for any of the rows, one of the values is missing, that particular part
of the annotation will be excluded.
1 2 | eq_create_label(data, location = "LOCATION_NAME", magnitude = "EQ_PRIMARY",
total_deaths = "TOTAL_DEATHS")
|
data |
A Dataframe Object containing the data to create the html annotations. Defaults to "LOCATION_NAME". |
location |
Name (char) of the column in |
magnitude |
Name (char) of the column in |
total_deaths |
Name (char) of the column in |
This function returns a character vector of HTML-formmated strings, labeling the location
,
magnitude
, and total_deaths
values.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
readr::read_delim("data/signif.txt", delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 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.