This document outlines the methods used to assign environmental exposures for my masters research project. It draws on many data sources to assign exposures to any unique latitude, longitude, date and time in California. The exposures to be assigned by this code are as follows:
The following code creates a sample inhaler actuation, including the location and time.
# set lat and long for test point
longitude <- -121.7482695
latitude <- 38.6742656
# set sample date and time of inhaler use
date_inhaler <- as.Date("2012/05/07")
time <- "T12:00:00"
And here is a map of the sample point.
Now we can set some of the other variables used throughout this code.
# set buffer for pesticide (in meters)
pesticide.buffer <- 5000
# set buffer for motorways (in meters)
motorway.buffer <- 1000
# set air sampling buffer for AirNow Query (in meters)
air.quality.buffer <- 50000
# set number of days before inhaler use to look for pesticide applications
days_before <- 3
This first section takes the sample point and determines the weather at that time and location. I use the Forecast.io API to find hourly and daily averages of weather data. The Forecast.io API relies on many data sources, and the primary source for weather in California appears to be the USA NOAA’s Integrated Surface Database (ISD). More information on the quality control of ISD data can be found here. For this sample point, the following data sources were used by Forecast.io:
weather$flags
## $sources
## [1] "isd"
##
## $`isd-stations`
## [1] "720576-99999" "724830-23232" "724836-23208" "724839-93225"
## [5] "999999-23271"
##
## $units
## [1] "us"
This graph shows the hourly temperature, humidity and precipitation and wind speed on: May 07, 2012 at the location shown in the map above.
And here is a wind rose showing hourly wind speed and direction on May 07, 2012
Questions
This section uses the EPA AirNow API to collect air quality data. A sample query for this date and time would be:
## [1] "http://www.airnowapi.org/aq/data/?startDate=2012-05-07T14&endDate=2012-05-07T15¶meters=O3,PM25,PM10,CO,NO2,SO2&BBOX=-122.322696374872,38.2238778904415,-121.173748547552,39.1245608684148&dataType=B&format=application/json&verbose=1&API_KEY=D2DDDB05-2267-4E4A-B05D-CE595EEF28C3"
This query returns data for all air quality monitoring stations within a 510^{4}m buffer of the inhaler actuation. For this sample point, this is data at at least one of the sampling stations for the following air pollutants:
The API returns stations within a specified buffer of the sample point. Below is a map of the stations returned by the query. An 50km buffer from the inhaler actuation is outlined in red.
To estimate the exposure for criteria air pollutants, I use inverse distance weighting (IDW). This method interpolates the value of air pollutants using a weighted average between the measured values at each air quality monitoring station.
The following map shows the IDW Air Quality Index (AQI) for ozone. This method builds a 100 row x 100 column raster layer around the lat/long of inhaler actuation. The inverse distance weighting power (IDP) is specified as 6.
The calculated value of OZONE at the sample location is: 30
Possibly will use the Accuweather API to accomplish this? Or find another source for historical pollen data? Or request historical data from AAAAI?
This section outlines the methods used to estimate traffic-related air pollution (TRAP). We first download the road data, then calculate the distance from the sample point to both highways and other main roads.
Below is a map of all roads within a 1000 meter radius of the sample point. The buffer is shaded blue, the motorways are red, secondary roads are orange, and all other roads are yellow.
This point is 237 meters (0.15 miles) away from the nearest highway.
This first map shows the average annual daily traffic (AADT) for roads in the area, according from the Caltrans database.
Next, we select only the roads within a buffer of our inhaler use. We multiple the AADT by the length of each road segment (in miles), to calculate the daily vehicle miles travelled (VMT) for each road section.
Finally, we sum the total VMT to estimate the traffic density in the region surrounding the inhaler use. Total VMT for this buffer is: 70504 vehicle miles travelled
The map below shows the DWR land use type in the area of the inhaler actuation.
The sample inhaler use is located in land use type: Commercial
To analyze pesticide exposure, we use the Department of Pesticide Regulations, Pesticide Use Reporting Data. This data reports all commercial pesticide applications annually. The location is reported using the Public Land Survey System (PLSS), with a resolution of approximately one square mile.
Below is a graph of all pesticide use in Yolo and Sacramento counties for years 2012-14. The y axis shows pounds of pesticides applied per day:
Next Steps
This is a map of pesticide use in Yolo and Sacramento Counties by PLSS section.
The exposure model for pesticides is still under development. It may eventually work as follows:
This map shows all pesticide use within a 5000m buffer of the sample point, on the day of the inhaler actuation and the two days leading up to this day.
And here is a list of the individual pesticide applications.
## MTRS chem_code lbs_chm_used acre_treated applic_dt applic_time
## M09N02E08 1929 106.5145905 75.0 2012-05-07 1000
## M09N02E08 1996 148.3596000 75.0 2012-05-07 1000
## M09N02E09 560 19.6000000 2.0 2012-05-05 800
## M09N02E09 560 470.4000000 47.0 2012-05-05 800
## M10N01E25 597 7.0268020 14.0 2012-05-07 1000
## M10N01E25 597 0.6825820 1.4 2012-05-05 700
## M10N01E25 1996 2.7996192 1.4 2012-05-05 700
## M10N01E25 1996 27.9961056 14.0 2012-05-07 1000
## M10N01E36 NA 0.0000000 5.0 2012-05-05 1000
## M10N01E36 5759 0.7407000 5.0 2012-05-05 1000
## M10N01E36 4003 0.9457335 5.0 2012-05-05 1000
## aer_gnd_ind site_code
## G 29136
## G 29136
## G 29141
## G 29143
## G 29136
## G 29136
## G 29136
## G 29136
## G 14011
## G 14011
## G 14011
For this hypothetical inhaler actuation we have now compiled the following data:
Weather
Air Quality Indexes
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
## [inverse distance weighted interpolation]
TRAP
Land use
Pesticides