eq_create_label: Prepare the annotation of an earthquake

Description Usage Arguments Value Examples

Description

The function creates an HTML label, which can be used as the annotation text in the leaflet map. The function combines the following information about an earthquake:

If an earthquake is missing values for any of these items, it is skipped for that element of the tag.

Usage

1

Arguments

data

A row of data frame data containing earthquake related data.

Value

An HTML label, which can be used as the annotation text in the leaflet map

Examples

1
2
3
4
5
6
library(dplyr)
file_read() %>%
  eq_clean_data() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2014) %>%
  dplyr::mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")

Valentin-Konoshenko/Earthquakes4Coursera documentation built on May 23, 2019, 1:08 p.m.