clean_local_location: Clean up an earthquake location string

Description Usage Arguments Value Examples

Description

This function cleans up the local location of an earthquake. If there are multiple locations separated by commas, each location name is cleaned and the locations are recombined into a string. Cleaning involves removing extra white space, converting to title case, and removing location names that are only directions, e.g., "e", "east of", etc. This function is used by eq_clean_data().

Usage

1
clean_local_location(local_loc_str)

Arguments

local_loc_str

A character string giving the locations separated by commas.

Value

This function returns a string containing the cleaned up location.

Examples

1
clean_local_location("CUZCO,COLLAO,LIMA")

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