eq_create_label: More interesting pop-ups for the interactive map used with...

Description Usage Arguments Details Value Examples

Description

More interesting pop-ups for the interactive map used with the eq_map() function

Usage

1
eq_create_label(mapdata)

Arguments

mapdata

A cleaned data frame with data obtained from NOAA website

Details

This function return a more interesting pop-ups for the interactive map created with the eq_map() function. The function is called before the eq_map() function and used the same cleaned data. The cleaning of the data frame is done with the eq_clean_data() and eq_location_clean() functions of this package. For each earthquake, the pop-up will show its "Location", "Total deaths" and "Magnitude".

Value

An HTML label that can be used as the annotation text in the leaflet map.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
readr::read_delim("signif.txt", delim = "\t") %>%
  eq_clean_data() %>%
  eq_location_clean() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
  dplyr::mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")

## End(Not run)

llangevin/EQVT documentation built on May 13, 2019, 5:24 p.m.