Title: | Calculate Estimates of Airborne Lead Exposure at Point Locations in the Cincinnati, OH Area |
---|---|
Description: | Easily and reproducibly assess exposure to airborne lead at specific locations in and around Cincinnati, Ohio. The package calculates predictions of air lead exposure from a land use random forest model developed by Dr. Cole Brokamp based on ambient air sampling in Cincinnati, OH between 2001 and 2005. Additionally scale estimates to account for temporal variation in air lead in the region. |
Authors: | Erika Rasnick [aut, cre], Cole Brokamp [aut], Pat Ryan [aut] |
Maintainer: | Erika Rasnick <[email protected]> |
License: | GPL-3 |
Version: | 0.9 |
Built: | 2024-11-14 06:02:36 UTC |
Source: | https://github.com/geomarker-io/airPb |
calculate_scaled_airPb()
is a wrapper function that estimates airborne lead exposures
at provided locations by calling calculate_airPb()
, then temporally scales those
estimates using scaling factors computed by calling calculate_scaling_factors()
.
This function is particularly useful for calculating exposures at the same locations on
different dates.
add_scaled_airPb(locations)
add_scaled_airPb(locations)
locations |
Data.frame with columns 'id', 'lat','lon', 'start_date', and 'end_date' at minimum. |
A numeric vector of air lead estimates (ug/m3).
Cole Brokamp, Roman Jandarov, MB Rao, Grace LeMasters, Patrick Ryan. Exposure assessment models for elemental components of particulate matter in an urban environment: A comparison of regression and random forest approaches. Atmospheric Environment. 151. 1-11. 2017. http://dx.doi.org/10.1016/j.atmosenv.2016.11.066
my_data <- data.frame(id = rep(1,3), lat = c(39.19674, 39.19674, 39.19674), lon = c(-84.58260, -84.58260, -84.58260), start_date = c(as.Date("2010-01-08"), as.Date("2012-06-08"), as.Date("2015-04-09")), end_date = c(as.Date("2010-02-08"), as.Date("2012-07-08"), as.Date("2015-05-09"))) airPb_scaled <- add_scaled_airPb(my_data)
my_data <- data.frame(id = rep(1,3), lat = c(39.19674, 39.19674, 39.19674), lon = c(-84.58260, -84.58260, -84.58260), start_date = c(as.Date("2010-01-08"), as.Date("2012-06-08"), as.Date("2015-04-09")), end_date = c(as.Date("2010-02-08"), as.Date("2012-07-08"), as.Date("2015-05-09"))) airPb_scaled <- add_scaled_airPb(my_data)
calculate_airPb()
uses a land use random forest model developed by Dr. Cole Brokamp
based on ambient air sampling in Cincinnati, OH between 2001 and 2005 to estimate
exposure to airborne lead at point locations in the area specified by latitude and longitude.
The model predictors include greenspace (NDVI) within 1000 meters, population density within
500 meters, length of bus routes within 900 meters, percent pasure within 800 meters,
percent developed open land within 1100 meters, percent developed medium land within
400 meters, percent developed low land within 900 meters, and percent developed
high land within 1500 meters.
calculate_airPb(locations, return.LU.vars = FALSE)
calculate_airPb(locations, return.LU.vars = FALSE)
locations |
Data.frame with columns 'id', 'lat', and 'lon' at minimum. |
return.LU.vars |
When |
If return.LU.vars = FALSE
, a numeric vector of air lead estimates (ug/m3) ?
is returned. If return.LU.vars = TRUE
, the locations
data.frame with
additional columns for air lead values and the land use predictors used
to generate the air lead values is returned.
Cole Brokamp, Roman Jandarov, MB Rao, Grace LeMasters, Patrick Ryan. Exposure assessment models for elemental components of particulate matter in an urban environment: A comparison of regression and random forest approaches. Atmospheric Environment. 151. 1-11. 2017. http://dx.doi.org/10.1016/j.atmosenv.2016.11.066
my_data <- data.frame(id = 1:3, lat = c(39.19674, 39.12731, 39.28765), lon = c(-84.58260, -84.52700, -84.51017)) lead_est <- calculate_airPb(my_data, return.LU.vars = FALSE) lead_est <- calculate_airPb(my_data, return.LU.vars = TRUE)
my_data <- data.frame(id = 1:3, lat = c(39.19674, 39.12731, 39.28765), lon = c(-84.58260, -84.52700, -84.51017)) lead_est <- calculate_airPb(my_data, return.LU.vars = FALSE) lead_est <- calculate_airPb(my_data, return.LU.vars = TRUE)
calculate_scaling_factors()
constructs temporal scaling factors based on measurements
of airborne lead recorded by the EPA in the Cincinnati area. These scaling factors are
the average lead measured over the time period specified by start_date
and
end_date
, divided by the average lead recorded over the ambient air sampling period (2001 to 2005).
Scaling factors can be multiplied by air lead estimates from calculate_airPb()
to adjust for
temporal variability in airborne lead in the Cincinnati area over time.
calculate_scaling_factors(dates)
calculate_scaling_factors(dates)
dates |
A data.frame with 2 columns called 'start_date' and 'end_date' at minimum.
Both columns must be of class |
EPA data in this package is available from November 9, 2001 through November 28, 2018. Scaling factors that attempt to average over air lead measured on dates outside this range will not be calculated. In addition, it is important to be mindful of the frequency of air lead measurements recorded by the EPA. Note that air lead was measured every 6 days through the end of 2010, and every 3 days starting in 2011. If there are less than 4 measurements of air lead between the start_date and end_date, the scaling factor will not be calculated and NA will be returned.
A numeric vector of temporal scaling factors.
my_dates <- data.frame(start_date = c("2010-01-08", "2012-06-08", "2010-01-09", "2015-04-09", "2010-01-10"), end_date = c("2010-02-08", "2012-07-08", "2010-02-09", "2015-05-09", "2010-02-10")) ## Not run: class(my_dates$start_date) # character vector scaling1m <- calculate_scaling_factors(my_dates) ## End(Not run) my_dates$start_date <- as.Date(my_dates$start_date) my_dates$end_date <- as.Date(my_dates$end_date) scaling1m <- calculate_scaling_factors(my_dates)
my_dates <- data.frame(start_date = c("2010-01-08", "2012-06-08", "2010-01-09", "2015-04-09", "2010-01-10"), end_date = c("2010-02-08", "2012-07-08", "2010-02-09", "2015-05-09", "2010-02-10")) ## Not run: class(my_dates$start_date) # character vector scaling1m <- calculate_scaling_factors(my_dates) ## End(Not run) my_dates$start_date <- as.Date(my_dates$start_date) my_dates$end_date <- as.Date(my_dates$end_date) scaling1m <- calculate_scaling_factors(my_dates)