This week, we build on Labs 4 and 5 to map particulate matter concentrations in Philadelphia.
Background
Compared to many air pollutants, particulate matter do not travel far from sites of production—primarily combusting cars, trucks, and industrial facilities. Recent studies using microsensors to evaluate intraurban particulate matter concentrations show that far-away monitoring stations may not accurately characterize the pollution residents experience in their neighborhoods. Here are some links on intraurban particulate matter mapping: Apte et al., Hazenfratz et al.
Particulate matter exposure is important because it is associated with lung cancer, asthma, and premature death. It is among the six priority air pollutants monitored by the EPA under the Clean Air Act. Understanding the location of particulate matter concentrations may make it possible to mitigate local exposure and positively impact public health. But, before we can figure out how to mitigate, it helps to know where we we’re experiencing high concentrations of particulate matter.
I bet you can guess, though, where the worst areas are. Typically air quality is lowest in areas with industry or highways, which tend to be low-income neighborhoods. You’ll also find variation around construction sites, where traffic circles, or restaurants that have an exhaust pointed toward the street. Note that on rainy days, there is very little particulate matter in the air.
In this lab, we will ask: can we use a low-cost sensor to visualize this variation in particulate matter in space and time?
Assignment
1. Get your dust sensor working on your Uno + GPS shield. Use the code that came with the dust sensor, not your amended code (i.e., do not average over a moving window—get the raw data).
For the most part, you can just treat the GPS shield as though it were a regular Arduino Uno. There are two exceptions to be aware of, though: (1) Pins 7 and 8 are occupied as the secondary UART. (2) Pin 10 needs to be free for stability of the SD card. Use an available pin for your dust sensor (pin 4 is a good choice, for example).
Once you have the sketch loaded, open your serial monitor to ensure it’s running correctly. If your text in your serial monitor looks off, check the baud rate in the drop-down menu.
2. Make sure your GPS is working. Leave your dust sensor in place, but ignore it for a little bit. Focusing on the GPS, upload the GPS_SoftwareSerial_EchoTest sketch and make sure the GPS is printing the right data out to the serial monitor.
3. Upload your final code from Lab 4. You may want to double-check that you’re logging data properly to the microSD card.
4. Combine your code from steps 1 and 3. We know our particulate matter sensor can take a data point approximately every 30 seconds. The GPS sketch you developed in Lab 5 takes far more data points. Update the sketch to take a GPS reading only when you take a dust sensor reading.
5. Change the output you’re writing to your SD card. Include the following columns:
- Time
- Date
- Latitude (in degrees)
- Longitude (in degrees)
- Particulate matter concentration
It should look like this:
3. Now, fix your time reading. In the last lab I wrote, “Note: unfortunately, all single digit numbers are parsed as 1, 2, 3, …, instead of 01, 02, 03, …. This means that the time for 12:01 is written as 12:1. We won’t fix this right now, but it’s a big flaw.” Now it’s time to fix the problem. For each minute and second, if it’s less than 10, print 0, then the parsed digit. Else, print only the parsed digit.
In addition, the time given is in Universal Time Coordinated. We’re in Eastern Standard Time. EST is 5 hours behind UTC. Update the hours. If the hour is greater than 5, subtract 5. Else (i.e., the hour is less than 5), then…?
4. Bring the sensor out into the field. You and your partner should select a corridor you want to monitor. Bring the GPS to this corridor for four, 20 (or more)-minute windows. Always return to the same study area (or very, very close). Visit this location twice at the same time of day and twice at a different time of day for a total of four visits.
A good way to do approach this would be to collect data on your walk or bike ride to/from school. Or, if you’re a runner, on a favorite running route. Or, if you always go to the same coffee shop, on your walk to/from that coffee shop. You can collect data anywhere in Philadelphia.
As you’re walking/riding, be sure to hold the sensor so air can flow up through it. Try not to have the whole sensor cupped in your hand—it should be exposed, not protected, to ensure that ambient dust can reach the sensor.
You can have the same person collect all four samples. Or you can split it up. Whatever you prefer. But, please always go to the same location.
5. For each field visit, graph the dust over time (4 points). You can do this as you did Lab 4, using either Excel or R. You will make a total of four graphs. Please make them easy to compare by using the same upper value on the y-axis. (If you want to take on the challenge of figuring out how to visualize these nicely on two graphs instead of four, you are more than welcome to do that. It can be a little hard to rationalize the x-axis, unless you really monitor at the exact same time of day.)
6. Please copy and paste your data into this spreadsheet to compile all of our class monitoring information. (I will show it to you next class.)
7. Now, plot your data as points in ArcPro (as described below), or R (if you do this and feel like it, feel free to comment with directions for others), depending on your preferences.
I’m assuming you already have familiarity with ArcPro. If you do not, let me know and we’ll come up with another plan. There are a couple ways to import the data and I will walk you through one of them:
- Open an ArcPro document. Go to Add Data > XY Point Data. Enter your X and Y fields and then hit Run. Recall you have 5 columns in your data: Time, Date, Latitude, Longitude, Concentration. Since Field 3 is your latitude reading, it is your Y value. Field 4 is your longitude reading, which is your X value. Repeat: LATITUDE = Y, LONGITUDE = X. This never seems to be intuitive to folks.
- Note that by default our data was imported in the WGS 1984 coordinate system. This is the right coordinate system — I know this because Adafruit said our data works with Google Maps, and this is what Google Maps uses. I never saw an explicit reference to WGS 1984 in the Adafruit documentation.
- After you finish getting the point data displayed, add a basemap to give it context. Go to Basemap > Light Grey Canvas.
7. Change the symbology of the points on your map so we can better understand the data.
Your dust sensor is an optical sensor. Its units of measurement are “pcs/0.01cf”. Pcs stands for particle counts. In other words, the number of particles per 0.01 cubic feet.
The EPA’s particulate matter standards are by weight (e.g., 12.0 μg/cubic meter). This makes it difficult to compare our data and theirs, since we don’t know exactly what size and density particles are entering our sensor.
I spent several hours trying to figure this out and haven’t come up with a great conversion rate so far. It would likely be best to benchmark our dust sensor against another sensor that measures by weight, then use that to scale the results. For now, we’ll use 10,000 pcs/cf as a cut-off point. This will simply flag areas with higher particulate matter concentrations that should be monitored further.
Color your points on your map so that everything above 10,000 pcs/cf is in red, and everything below is in green. I think you know how to do this, but recall: Go to Appearance > Symbology > Graduated Colors. Color by Field 5, change the number of classes to 2, and then switch the method of classification to Manual. Then, click on the Symbols (the dots) to change the colors to red and green. It should look like this:
Some of you may find all of your points are green. That means the air quality was probably OK where and when you were mapping. Conversely, some of you will find all of your points are red. That means the air quality was probably not good when and where you were located. Most of you will see a mix. Think about what might have caused the spikes in particulate matter concentration in your sample.
9. (Optional) If you want to make your map look a little nicer, change out of the oblique view of WGS 1984. Under Contents, double click on Map, the go to the Coordinate Systems tab, then navigate to Projected Coordinate Systems > State Plane > NAD 1983 (US Feet) > State Plane > NAD_1983_StatePlane_Pennsylvania_South_FIPS_3702_Feet. (Or you could do Meters).
10. When you are done, create four maps to show each examination of your study area separately (4 points). On each map, indicate the time of day of the data collection. To save the maps, either take a screen shot, go to Share > Output > Export Map and export each map individual, or create a layout with all four maps. Whatever you prefer is fine.
11. Look at your four graphs and your four maps. Do you see a pattern over space or time in air pollution in your study area? If yes, what do you see? Why do you think it exists? If no, what do you see? Why don’t you think there’s a pattern? (1 point)
12. Look online (e.g., Adafruit, Sparkfun, Digikey, Mouser) to find an alternate sensor that can collect black carbon/PM 2.5/dust data that you would prefer to use. Note, that many air quality sensors focus on indoor air pollutants, like VOCs — this is not what we are looking for. Submit a link to your sensor. What is one big advantage and one disadvantage of the other sensor? (1 points)
13. You and your partner will submit one assignment together. Compile your graphs, your maps, and the answers to your questions into one document, and then upload to Canvas. Please also upload your code.