MazamaSpatialUtils (version 0.6.4)

MazamaSpatialUtils: Mazama Science spatial data and utility functions.

Description

This package contains code to convert various spatial datasets into .RData files with uniformly named identifiers including:

  • countryCode -- ISO 3166-1 alpha-2

  • countryName -- Country name

  • stateCode -- ISO 3166-2 alpha-2

  • timezone -- Olson timezone

  • longitude -- degrees East

  • latitude -- degrees North

  • area -- m^2

The parameters listed above will be found in the @data slot of each spatial dataset whose source data has an equivalent field. The only field guaranteed to exist in every dataset is countryCode.

The following additional standards are applied during the data conversion process:

  • all spatial data are converted to a purely geographic projection (CRS("+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs")

  • no duplicated rows in the dataframe (conversion to multi-polygons)

  • lowerCamelCase, human readable names replace original parameter names

  • redundant, software-internal or otherwise unuseful data columns may be dropped

  • parameters may be added to the @data dataframe

  • latitude and longitude of polygon centroids may be added

Utility functions allow users to determine the country, state, county and timezones associated with a set of locations, e.g. environmental monitoring sites.

The uniformity of identifiers in the spatial datasets also makes it easy to generate maps with data from any dataset that uses standard ISO codes for countries or states.

Arguments