eq_clean_data: Clean NOAA Data

Description Usage Arguments Value Examples

View source: R/clean_functions.R

Description

The function eq_clean_data cleans a raw NOAA data frame. In more detail, it adds a date column, converts latitude and longitude columns to numeric, and cleans the location name column.

Usage

1

Arguments

data

A raw NOAA data frame.

Value

A clean NOAA data frame.

Examples

1
2
3
4
5
6
7
8
# import libraries
library(dplyr)
library(readr)
# set working directory
setwd(system.file("extdata", package = "noaa"))
# read and clean NOAA data
data <- read_delim("signif.txt", "\t") %>%
   eq_clean_data()

kfull/noaa documentation built on May 25, 2019, 8:29 p.m.