eq_clean_data: eq_clean_data

Description Usage Arguments Details Value Examples

Description

Clean up the format of certain columns in a NOAA dataframe

Usage

1

Arguments

data

A data frame with raw data from NOAA (see details)

Details

This function takes raw NOAA data frame (you can download a sample from here) and returns a clean data frame with: - A DATE column created by uniting the year, month, day and converting it to the Date class - LATITUDE and LONGITUDE columns converted to numeric class - LOCATION_NAME is modified removing the country name from it and changed to title case (see eq_location_clean)

Value

data A data frame with cleaned columns

Examples

1
2
3
4
5
## Not run: 
data <- readr::read_delim("earthquakes.tsv.gz", delim = "\t")
clean_data <- eq_clean_data(data)

## End(Not run)

fdelzompo/MSDR documentation built on May 3, 2019, 2:58 p.m.