predict_locs | R Documentation |
Uses an existing model, such as developed by develop_model
, to
predict values a given locations and dates. Prepares the data necessary to do
so. MAIAC, NARR, BlueSky, and (optionally) PurpleAir data should already be
downloaded.
predict_locs(
dt1,
dt2,
states = "CA",
model,
locations,
pa_cutoff = 1e+05,
bluesky_special = NULL,
pa_data = NULL
)
dt1 |
Date The earliest date of data to predict |
dt2 |
Date The latest date to predict |
states |
character A vector of two-character state codes |
model |
A final model object, such as extracted from the results of
|
locations |
A SpatialPointsDataFrame of locations (and dates) to predict |
pa_cutoff |
A cutoff value passed to |
bluesky_special |
character Handles three special cases of BlueSky data. If "2020", processes data prior to October 10, 2020 separately from that after, as the BlueSky data format changed. If "HAQAST", uses custom BlueSky-CMAQ output created during the HAQAST campaign (see https://doi.org/10.1080/10962247.2021.1891994O'Neill et al., 2021). If "nominal", instead use a nominal placeholder value for BlueSky PM2.5 of 0.1, which will have a near neutral impact on predictions. |
pa_data |
PurpleAir data in pas-like format. |
A dataframe with all model input values and the resulting predictions for the locations and dates specified in locations
pred <- predict_locs(dt1, dt2, states = "CA", model = mod$model$finalModel,
locations = locs, pa_data = pa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.