Plotting Air Quality Egg data using R

I recently got an Air Quality Egg. The Air Quality Egg is a open source hardware project to measure air quality hyper-locally. My egg is located on the balcony of my flat in Brixton, London. The Air Quality Egg device has sensors which read NO2, CO, humidity & temperature and posts the data to Cosm. You can view readings and simple graphs on the Cosm feed page.

Air Quality Egg on the balcony of my flat

Air Quality Egg on the balcony of my flat

Plotting sensor data using R

I wanted to see the trends in the data so I wrote a script in R to curl the data from the Cosm API and plot it using GGPlot.

Here is the script:

Here are some example graphs of NO2 over a single day and several days. (Note I don’t have the latest sensor updates so the readings may be a bit off)

Plot of NO2 for a single day

Plot of NO2 for a single day

Plot of NO2 for a 4 day period

Plot of NO2 for a 4 day period

Advertisements

9 thoughts on “Plotting Air Quality Egg data using R

  1. As an air pollution expert I really wouldn’t believe that data! I had dismissed those devices a while ago as being pretty much a complete joke – now seeing your data it looks very much like a random number generator.

    Is that really suggesting a trend of 400ppb – the legal average is 21ppb! Just because statistics can get a wibbly line out of it doesn’t make that level of scatter credible.

    Please note – I have worked in air pollution science and policy for over 17 years – this comment is made in the best intentions (but I have just come back from a working dinner)

    Very happy to discuss this further but I am seriously concerned with the credibility of the data you have presented and would hate anyone to have any faith in it.
    Tim.

      • Its not a defective device, the science behind them is wrong – they just aren’t capable of working at the low concentrations involved in ambient air pollution (they may be more suitable for exceedingly high concentrations in some industrial applications) However at least the egg is very cheap, compared to the just ‘cheap’ similar equipment being sold to local authorities on the basis that cheapness is a reasonable trade for accuracy/reliability. We have tried for a number of years to either get comparison data for these and ‘proper’ chemi-luminescent monitors, or to actually get lent the monitor to do a comparison of our own, but strangely the manufacturers never seem that interested!

    • Hello Mr. Chatterton,

      I am considering purchasing either an AQE or as another posted linked above, the Citizen Sensor setup, which at least appears to have more documentation and efforts to calibrate their sensors.

      I know it is unrealistic to try and achieve lab-grade data sensitivity and precision; however, as an AQE post suggests, might there be some value in analyzing trends of collective data, even if individual eggs can not be considered to be particularly accurate?

      http://airqualityegg.wikispaces.com/Data+Quality

      Given your expertise and concerns over data quality, do you have any other suggestions for what an average citizen, looking to do low cost data collection can do? I would very much like to be involved, and while I am sure it is possible to build a slightly higher quality measurement station what are the realistic costs associated with this (Any sensor suggestion?), and how would be integrate this data in a useful way without the networks built up from these DIY projects like AQE?

      Just looking for your input!

      Thanks

  2. However, as you have got this far, I would suggest for your own entertainment to send a copy of your data to the manufacturers and ask them to explain it, and then politely ask for your money back! I would be very interested in seeing copies of any correspondence, and could also provide a professional opinion to support your claim!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s