
Retrieve Pollutant Grid(s) for a Given Time Period
temporary_grid_search.RdRetrieves the pollutant grid corresponding to a given date and time. When a time interval spanning multiple hours is provided, the function averages the pollutant values across all hourly grids and returns a single grid.
Arguments
- start_hour
Character. Start date and time.
- end_hour
Optional character. End date and time. If
NULL, only the grid corresponding tostart_houris returned.- dir
Character. Directory containing the hourly grid shapefiles.
- time_format
Character. Format used to parse
start_hourandend_hour.- gridID
Character. Name of the field containing the grid cell identifier.
- shapeValue
Character. Name of the field containing the pollutant concentration values.
Value
An sf object containing the pollutant grid corresponding to the
requested hour or the average pollutant grid over the requested time
interval.
Details
If start_hour and end_hour span multiple hours, the function
retrieves every corresponding hourly grid, calculates the mean pollutant
concentration for each grid cell, and returns the resulting averaged
grid as an sf object.
The returned object is always transformed to the WGS84 geographic coordinate reference system (EPSG:4326).