knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of schwartzGeohashPM is to add PM2.5, NO2, and O3 concentrations to your data based on geohashed locations (usually output from the Schwartz Grid Lookup Container)
You can install addSchwartzGeohashPM from GitHub with:
# install.packages("remotes") remotes::install_github("degauss-org/schwartzGeohashPM")
This package utilizes the s3 package. Users can pass arguments for s3::s3_get_files
to schwartzGeohashPM::add_schwartz_pollutants
. This is especially useful for specifying the local path where s3 files will be downloaded onto the user's local machine, via the download_folder
argument. The download folder can also be specified by setting options.
options(s3.download_folder = /path/to/folder/s3_downloads)
reticulate::use_condaenv("r-s3", required = TRUE)
library(schwartzGeohashPM) 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(dplyr::vars(start_date, end_date), as.Date) add_schwartz_pollutants(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.