eq_create_label: Function to Create Labels for Annotation.

Description Usage Arguments Value Examples

View source: R/leaflt_map.R

Description

A function to create labels that comprises total deaths from a earthquake, its location and magnitude. These labels appear on the pop ups that appear on the map of earthquakes created by eq_map function.

Usage

1

Arguments

data

An object of class data.frame or tibble or tbl_df that contains data on earthquakes.

Value

An object of class tibble that comprises the labels.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(magrittr)
data(eaq_data)
eaq_data%>%
  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)

Noob-Programr/noaa documentation built on Dec. 17, 2021, 5:26 a.m.