Clean Facility Registry Service (FRS) dataset when updating copy for use in EJAM
Source:R/frs_clean.R
frs_clean.Rd
Clean Facility Registry Service (FRS) dataset when updating copy for use in EJAM
Usage
frs_clean(
frs,
usefulcolumns = c("LATITUDE83", "LONGITUDE83", "REGISTRY_ID", "PRIMARY_NAME",
"NAICS_CODES", "SIC_CODES", "PGM_SYS_ACRNMS")
)
Value
data.table with columns as defined by usefulcolumns parameter like REGISTRY_ID, and some renamed to for example lat, lon, NAICS, SIC
Details
Used by frs_get()
This renames some columns (lat, lon, NAICS are new names)
and it drops rows lacking lat/lon location info in the LATITUDE83 or LONGITUDE83 columns