eq_create_label: Create information for pop-up windows on an earthquake map

Description Usage Arguments Value Examples

Description

This function creates HTML content for the pop-up windows on an earthquake map. The input to this function should be a data set generated by the function eq_clean_data(). The window will show the local location of the earthquake (LocalLocation), the magnitude (EQ_PRIMARY), and the total death count (TOTAL_DEATHS).

Usage

1
eq_create_label(dataset)

Arguments

dataset

A dataset generated by eq_clean_data().

Value

A string containing HTML code to display the location, information is missing, the HTML object for that value is omitted.

Examples

1
2
3
4
5
eq_data <- eq_clean_data("NOAA_earthquakes.txt")
eq_data <- subset(eq_data, Country == "Mexico" & YEAR >= 2000)
eq_data$popup_text <- eq_create_label(eq_data)

eq_map(eq_data, annot_col = "popup_text")

lmitchell4/earthquake documentation built on May 29, 2019, 3:42 a.m.