addMazamaMetadata: Add State, Country and Timezone to a Dataframe

Description Usage Arguments Value References See Also

View source: R/addMazamaMetadata.R

Description

The MazamaSpatialUtils package used to determine the ISO state and country code, and the Olson timezone associated with the locations specified by the longitude and latitude columns of the incoming dataframe.

This function requires previous setup of the MazamaSpatialUtils package with initializeMazamaSpatialUtils().

Usage

1
2
3
4
5
6
7
addMazamaMetadata(
  df,
  lonVar = "longitude",
  latVar = "latitude",
  existingMeta = NULL,
  countryCodes = c("CA", "US", "MX")
)

Arguments

df

dataframe or tibble with geolocation information (e.g. created by wrcc_qualityControl() or airsis_qualityControl)

lonVar

name of longitude variable in the incoming dataframe

latVar

name of the latitude variable in the incoming dataframe

existingMeta

existing 'meta' dataframe from which to obtain metadata for known monitor deployments

countryCodes

vector of countryCodes (use NULL for global searches)

Value

Input dataframe with additional columns: timezone, countryCode, stateCode.

References

https://github.com/MazamaScience/MazamaSpatialUtils

See Also

initializeMazamaSpatialUtils


PWFSLSmoke documentation built on July 8, 2020, 7:19 p.m.