eq_create_label: Create annotation HTML text for leaflet

Description Usage Arguments Value Examples

View source: R/leafleat.R

Description

This function helps to create a custon HTML template for to annotate the leaflet. The data to show is: - Location - Magnitude - Total number of deaths

Usage

1
eq_create_label(dataframe)

Arguments

dataframe

data.frame. The data to create labels.

Value

character. A custom HTML template

Examples

1
2
3
4
5
6
7
8
library(lubridate)
library(dplyr)

eq_get_data() %>%
  eq_clean_data %>%
  filter(COUNTRY == "MEXICO", year(DATE) >= 2000) %>%
  mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")

JhossePaul/NOAACoursera documentation built on May 8, 2017, 11:28 p.m.