Forest fires and air quality
August 31, 2018
It was recently announced that during 2018, British Columbia has seen the most extensive forest fire season on record. As I write this (2018-08-31) there are currently 442 wildfires burning in British Columbia. These fires have a significant impact on peopleâ€™s livesâ€“many areas are under evacuation order and evacuation alert, and there are reports that homes have been destroyed by the blazes.The fires also create a significant amount of smoke, which has been pushed great distances by the shifting winds. This includes the large population centres of Vancouver and Victoria in British Columbia, as well as the Seattle metropolitan region and elsewhere in Washington. (Clifford Mass, Professor of Atmospheric Sciences at the Universtiy of Washington in Seattle, has written extensively about the smoke events in the region; see for example Western Washington Smoke: Darkest Before the Dawn from 2018-08-22.)The Province of British Columbia has many air quality monitoring stations around the province, and makes the data available. The measure most used for monitoring the effects on health is PM25 or PM2.5, for fine particles with a diameter of 2.5 microns (millionths of a metre). The B.C. government has a Current Particulate Matter map that colour codes the one hour average measures for all the testing stations around the province.The data file and a simple plot
The DataBC Catalogue provides access to air quality data. Thereâ€™s â€œverifiedâ€� to the end of 2017, and â€œunverifiedâ€� for the past 30 days. Since we want to see what happened this month, itâ€™s the latter we want. (The page with the links to the raw files is here.)The files are arranged by particulate or gas type; thereâ€™s a table for ozone and another for sulpher dioxide, and others for the particulate matter. Note that the data are made available under the Province of B.C.â€™s Open Data license, and are in nice tidy form. And the date format is ISO 8601, which makes me happy.To make sure weâ€™ve got a reproducible version, Iâ€™ve saved the file I downloaded early this morning to my google drive. The link to the folder is here.For the first plot, letâ€™s look at the PM2.5 level for my hometown of Victoria, B.C. The code below loads the R packages we'll use, reads the data, and generates the plot.# tidyverse packageslibrary(tidyverse)library(glue)
PM25_data % ggplot() + geom_line(aes(x = DATE_PST, y = REPORTED_VALUE)) + labs(x = &quot;date&quot;, title = glue(&quot;Air quality: Victoria Topaz&quot;), subtitle = &quot;one hour average, Âµg/m3 of PM2.5&quot;, caption = &quot;data: B.C. Ministry of Environment and Climate Change Strategy&quot;) There are 61 air quality monitoring stations around British Columbia. It would be interesting to see how the air quality was in other parts of the regionâ€“and since over half (54% in 2017) of the provinceâ€™s population lives in the Vancouver Census Metropolitan Area (CMA), letâ€™s plot the air quality there. There are multiple stations in the Vancouver CMA, so I chose the one at Burnaby Southâ€¦itâ€™s fairly central in the region.We can run this line of code to see a listing of all 61 stations (but we wonâ€™t do that nowâ€¦)# list all the air quality stations for which there is PM2.5 dataunique(PM25_data$STATION_NAME)
And since weâ€™re going to be doing this often, letâ€™s wrap the code that filters for the location we want and runs the plot in a function. Note that weâ€™ll create a new variable station_name so all we need to do to change the plot is assign the name of the station we want, and off we go. Not only does this simplify our lives now, but is all-but-essential for a Shiny application.
# the air quality plotPM25_plot % filter(STATION_NAME == station_name) %__% ggplot() + geom_line(aes(x = DATE_PST, y = REPORTED_VALUE)) + labs(x = &quot;date&quot;, title = glue(&quot;Air quality: &quot;, station_name), subtitle = &quot;one hour average, Âµg/m3 of PM2.5&quot;, caption = &quot;data: B.C. Ministry of Environment and Climate Change Strategy&quot;)}
Now that we've got the function, the code to create the plot for the Burnaby South station is significantly simplified: assign the station name, and call the function.# our Burnaby plotstation_name % ggplot() + geom_line(aes(x = DATE_PST, y = REPORTED_VALUE)) + facet_grid(. ~ STATION_NAME) + labs(title = glue(&quot;Air quality: Burns Lake, Prince George, Smithers, Victoria&quot;), subtitle = &quot;one hour average, Âµg/m3 of PM2.5&quot;, caption = &quot;data: B.C. Ministry of Environment and Climate Change Strategy&quot;) + theme(axis.text.x=element_text(size=rel(0.75), angle=90), axis.title = element_blank())
These two plots show not only that Burns Lake and Prince George have had the most extreme smoke events, but that they have had sustained periods of poor air quality through the whole month. While the most extreme event in Smithers exceeds that of Victoria, there hasnâ€™t been a prolonged period of smoke in the air like the other three locations.-30-