Title: | Add PM2.5, NO2, and O3 Concentrations to Data Based on Geohash |
---|---|
Description: | Downloads estimates of PM2.5, NO2, and O3 concentrations from Schwartz model and joins them to input data based on geohashed locations and date (data available 2000 - 2016). |
Authors: | Erika Rasnick [aut, cre], Cole Brokamp [aut] |
Maintainer: | Erika Rasnick <[email protected]> |
License: | GPL-3 |
Version: | 0.0.7 |
Built: | 2024-11-12 04:11:47 UTC |
Source: | https://github.com/geomarker-io/schwartzGeohashPM |
add PM2.5, NO2, and O3 concentrations to data based on geohash
add_schwartz_pollutants(d, verbose = FALSE, ...)
add_schwartz_pollutants(d, verbose = FALSE, ...)
d |
dataframe with columns called 'sitecode', 'start_date', and 'end_date' (most likely the output from the 'schwartz_grid_lookup“ container) |
verbose |
if TRUE a statement is printed to the console telling the user which chunk file is currently being processed. Defaults to FALSE. |
... |
arguments passed to |
the input dataframe, expanded to include one row per day between the given 'start_date' and 'end_date', with appended columns for geohash, PM2.5, NO2, and O3 concentrations.
if (FALSE) { d <- tibble::tribble( ~id, ~lat, ~lon, ~site_index, ~sitecode, ~start_date, ~end_date, '55000100280', 39.2, -84.6, '9607238', '211050640897', '2008-09-09', '2008-09-11', '55000100281', 39.2, -84.6, '9607238', '211050640897', '2007-08-05', '2007-08-08', '55000100282', 39.2, -84.6, '9607238', '211050640897', '2015-08-31', '2015-09-02') %>% dplyr::mutate_at(vars(start_date, end_date), as.Date) add_schwartz_pollutants(d) }
if (FALSE) { d <- tibble::tribble( ~id, ~lat, ~lon, ~site_index, ~sitecode, ~start_date, ~end_date, '55000100280', 39.2, -84.6, '9607238', '211050640897', '2008-09-09', '2008-09-11', '55000100281', 39.2, -84.6, '9607238', '211050640897', '2007-08-05', '2007-08-08', '55000100282', 39.2, -84.6, '9607238', '211050640897', '2015-08-31', '2015-09-02') %>% dplyr::mutate_at(vars(start_date, end_date), as.Date) add_schwartz_pollutants(d) }