MazamaScience / PWFSLSmoke

Utilities for working with air quality monitoring data (e.g. federal regulatory monitors)
http://mazamascience.github.io/PWFSLSmoke/
GNU General Public License v3.0
19 stars 5 forks source link

monitor_addSpatialMetadata() function #35

Open jonathancallahan opened 5 years ago

jonathancallahan commented 5 years ago

Given the behavior guaranteed by MazamaSpatialUtils, we should be able to implement a function with the following minimal signature:

monitor_addSpatialMetadata <- function(ws_monitor,
                                                                     SPDF,
                                                                     columnNames)

If SPDF is a character string, the spatial data would be loaded and used. If SPDF is already spatial data no loading is required.

The function would use MazamaSpatialUtils::getSpatialData() and would add the specified columns to the ws_monitor$meta data frame and then return the modified ws_monitor object.