Get daily PM2.5 model predictions using date ranges
Arguments
- x
a vector of s2 cell identifers (
s2_cell
object)- start_date
a date vector of start dates for each s2 cell, must be the same length as
x
- end_date
a date vector of end dates for each s2 cell, must be the same length as
x
- average
logical; summarize daily exposures estimates and standard errors?
Details
The standard error for averages of daily pm25 exposures with known standard errors is calculated, assuming they are independent, as the square root of the sum of squared individual standard errors divided the total number of individual daily pm25 exposures.
Examples
predict_pm25_date_range(
x = c("8841b39a7c46e25f", "8841a45555555555"),
start_date = as.Date(c("2023-05-18", "2023-01-06")),
end_date = as.Date(c("2023-06-22", "2023-08-15")),
average = TRUE
)
#> ℹ (down)loading random forest model
#> loaded rf_pm_v0 in 0s
#> ✔ (down)loading random forest model [4ms]
#>
#> ℹ checking that s2 are within the contiguous US
#> ✔ checking that s2 are within the contiguous US [55ms]
#>
#> ℹ adding coordinates
#> ✔ adding coordinates [16ms]
#>
#> ℹ adding elevation
#> ✔ adding elevation [81ms]
#>
#> ℹ adding HMS smoke data
#> ✔ adding HMS smoke data [1.7s]
#>
#> ℹ adding NARR
#> ✔ adding NARR [474ms]
#>
#> ℹ adding gridMET
#> ✔ adding gridMET [430ms]
#>
#> ℹ adding MERRA
#> ✔ adding MERRA [3.6s]
#>
#> ℹ adding time components
#> ✔ adding time components [10ms]
#>
#> [[1]]
#> # A tibble: 1 × 2
#> pm25 pm25_se
#> <dbl> <dbl>
#> 1 13.5 0.500
#>
#> [[2]]
#> # A tibble: 1 × 2
#> pm25 pm25_se
#> <dbl> <dbl>
#> 1 9.59 0.134
#>