Round Table: New opportunities for air quality sensing & lower cost sensors

The Round Table on “New opportunities for air quality sensing: lower cost sensors for public authorities and citizen science initiatives” was organised by the Joint Research Centre of the European Commission and hackAIR. It took place on October 24, 2018 in Frankfurt. A diverse group of governmental authorities, network operators, citizen science initiatives, environmental NGOs and academic researchers met for a full day to explore how we can collaborate and better leverage each other’s work. We welcomed 46 participants, representing 41 organisations from 14 countries. The broad range of organisations created opportunities for cross-sectoral and transdisciplinary discussions.

Update (June 2019): The resulting joint statement from the Round Table has now been published in the journal Research Ideas and Outcomes: “Joint Statement on new opportunities for air quality sensing – lower-cost sensors for public authorities and citizen science initiatives” (doi: 10.3897/rio.5.e34059).

One participant said: “During the Round Table, I have been in great conversations with people I would never have met otherwise. This was the first time I took part in a meeting that was specifically designed to bring stakeholders from so many different groups together!” 

The agenda provided a well-prepared mix of presentations, break-out sessions and plenary discussions. Inspiring case studies and presentations led to interesting conversations across stakeholder groups and networks.

Session 1: State of the art in air quality sensing – lower cost sensors for public authorities and citizen science initiatives

This session started with a plenary discussion in which each organisation was invited to shortly introduce their work. Networking activities during the event were made easier by this first round about “who is in the room?”. This was followed by three presentations:

 

Session 2: Increasing uptake of air quality information in policy and society

Sources of air quality information keep increasing and policy seems to largely build on authoritative measurements only.  Given the available expertise, we investigated different perspectives in order to help stakeholders make better use of the available air quality information.

This session started with five presentations:

Following the presentations, participants joined break-out sessions to discuss the question: “What tips do you have to increase the uptake of air quality information by citizens, public administration and academia?” Each group focused on the perspective of one stakeholder group.

Session 3: Integrating air quality information from multiple sources

Making use of air quality data from multiple sources poses many scientific and technical challenges. What would be sound practical solutions that fit the needs of all stakeholders involved? The session began with three presentations on the topic:

Five groups were formed, each focusing on one of the following topics:

  • Data quality: coping with varying levels of data quality
  • Interoperability: comparing and integrating measurements from multiple sources
  • Modelling: analysing and learning from the multitude of air quality measurements available
  • Calibration: improving the quality of air quality information
  • Data management: sharing data and honor sources, confidentiality and ownership

Each group discussed the questions “What are the issues? What do we need?” and drafted recommendations and next steps.

Session 4: Moving ahead

The outcomes from all sessions are used for a joint statement that is currently “work in progress” and will be published later this year. Follow-up actions will be suggested in order to continue the work that has been started at this Round Table.

 

Let’s compare readings from two sensors

By Wolfgang Röckelein

After I had assembled two hackAIR sensors together with my two sons and put them just outside their windows we started wondering in our family: how could we (or our neighbors) profit more from the sensor? What are the daily and weekly variations of the values of your sensor (or your sensor compared to other hackAIR home sensors)?

To learn about variations in our sensor measurements, this blog post prompted me to some more experiments with Google Data Studio and Google Sheets (yeah, I know, it’s Google, but first the sensor readings are no personal data, and second Google Data Studio and Google Sheets is available for free and have some nice and useful features for our purposes and is completely online, so no installs necessary). Instead of using data.world and (secret) sensor access keys, I built an open source Community Connector for Data Studio using the same API as in my hackAIR Kniwwelino project, thus the sensor identification is via sensor ID. As the API fetches no more than 5000 data points, therefore the connector fetches the data day-by-day. Each fetch takes around 10-15 seconds. The connector caches fetched values, but only for at most 6 hours due to Google Script limitations. See this post for a solution for this, but at first I will show how to compare PM2.5 and PM10 readings for two sensors from yesterday with Google Data Studio.

bp1

  •  Click on Select. Type in a sensor id, choose a particle size and name your data source at the top of the window accordingly:

bp2

·       Click on Connect:

bp3

  • Click on the icon top left and do the same for the second particle size and likewise for the second sensor id and its two particle sizes. Do this again one more time for an arbitrary sensor id and particle size “Dummy” (the data connector only delivers data where data exists in order to provide a solid ground for further aggregation. However, data blend needs a lead with a complete timeline and the Dummy source provides such a lead). You should now have five data sources. At the final dummy data source creation click on create report instead of the data source icon. 
  • Give your report a name (you can adjust layout and theme also), choose Time series and draw a rectangle covering the report area:

bp4

  • Add a data range control and choose yesterday as the default data range:

bp5

  • Click on Apply and click on the time series chart. Click on Blend Data for data fusion of the four data sources. Replace date by datetime on the Dummy data source. Remove the dummy-value field. Add all remaining four data sources and name the value fields appropriately. Make sure that Date Range is for all five sources set to Auto (i.e. use our date range control).

bp6

  • You could give your data blend also a name. Click Save and Close. Add the four then available metric fields to the report.

bp7

  • You have now a report comparing two hackAIR home sensors and two value types. Choose View and select some more days at the date range control (not too much in order not to get timeouts…) and click on apply

bp8

  • Choose the Share this report icon and click on the upper right text to get a link to provide to other people or to use in a web page to display this report. Click on Edit and choose File/Embed and selecting Enable Embedding in order to get a HTML snippet or a URL to include in a web page. You can also use the URL to construct a HTML code which can be used to embed a thumbnail with a link to the full report page inside an HTML page.

Sample html code

hackAIR 721-726

To visualize larger timescales, check out Larger date ranges need a better cache 

For more data visualizations built on top of the hackAIR air quality data, see our overview post

Larger date ranges need a better cache

By Wolfgang Röckelein

This post builds on Let’s compare readings from two sensors.

Ok, well done. BUT: this only works for small date ranges, for bigger date ranges you will get timeouts. Therefore, we need a better cache for the API request results. We will use Google Sheets for storing the complete readings of hackAIR home sensors. Google Sheets can also be a Google Data Studio data source. Google Sheets is scriptable and we will use the already well known hackAIR API in a Google Sheets script to regularly update a Google Sheet with the newest sensor readings.

  • Start Google Sheets at https://docs.google.com/spreadsheets/ Create a new Spreadsheet and give it a nice name at the top. Use the desired sensor ID as the Sheet name at the bottom. A spreadsheet has a limit of two million cells; each reading takes three cells (datetime, PM2.5, PM10). So better use a separate spreadsheet for each sensor in order not to hit this limit, if you stay inside the limit you could use one spreadsheet with e.g. two sheets one for each sensors.
  • Delete all columns except A, B and C in all sheets. Delete all rows except the first row in all sheets. Result should look like this:

bp9

  • The URL should look like this, record your xyz value.

https://docs.google.com/spreadsheets/d/xyz/edit#gid=0

 
  • We will now use this script to do the initial fill and regular update of your Google Sheets. In your sheet, choose the menu item Tools/Script editor. Give your script a name in the upper left corner (e.g. hackAir) and replace the initial code with the empty myFunction with the code from the link above (click on the Raw button, the use control-a and control-c to copy the code, switch to the script editor and use control-a and control-v to paste the code). Replace xyz in the fourth line with the recorded value from above and replace the date in the third line with your desired start date. 

https://github.com/DerGuteWolf/hackair-googlesheets-script/blob/master/Code.gs

  • Choose Menu > Resources/Libraries and add the Moment library by entering 15hgNOjKHUG4UtyZl9clqBbl23sDvWMS8pfDJOyIapZk5RBqwL3i-rlCo and clicking Add. Choose the most current version.

bp10

  • Click Save to save the script. Execute the script with the run button. Grant the script the permission to access your Google sheet, choose “Advanced” and “Go to hackAIR (unsafe)” and then “Allow”. 

bp11

bp12

  • Be prepared that this will take some time (as I already wrote one call per day and sensor and a single call takes a while)! You might need to run the script more than once because of timeout problems. At the end all of your sheets should contains datetime values and sensor readings from the date entered up to the current day. 
  • To schedule the script to run regularly choose menu entry Edit/Current Script’s Triggers. Click the link to add a trigger:

bp13

  • Click Save. With this setting the sheet will auto-update itself each night.
  • Go back to your data sources of Google Data Studio (https://datastudio.google.com/navigation/datasources?hl=en). Click on the plus button in the lower right and select the Google Sheets connector. Choose your Spreadsheet and the first sheet. Deselect “Use first row as header” and name your data source in the upper left.

bp14

  • Click Connect. Duplicate the first field (with the three dots menu next to the name). Name the first field datetime and choose Date Hour as type. Name the second field date and choose Date as type. Name the third field PM2.5 prefixed by the sensorid and choose Average as the Aggregation. Name the forth field PM10 prefixed by the sensorid and choose Average as the Aggregation.

bp15

  • Click on the Icon in the upper left and do the same for the other sensor. Click on the Icon in the upper left, click on reports on the left, and select the report created above. Click Edit and choose Page/New page. Click on the Time series Icon and create a big chart. Remove the default data source and add first our Dummy data source from above. Add a date range control and choose e.g. “This year to date” as the default value. Click on the chart and then on Blend Data.

bp16

  • Use only datetime field from the Dummy data source, select Auto for Date range and add our new sheets data sources. Add the PM fields of each data source:

bp17

  • You could again give your data blend a name. Click Save and click Close. Click View to experiment with the date range.
  • Unfortunately, for both pages when the first added data source has no values, the values from the second added data source shows no values. To see this better, click on the chart and select theme on the right and set General-Missing Data to Line Breaks.

bp18

bp19

  • You could also try two charts below each other. A data range control works for the whole page so put only one on the page.

bp20

  • Alternatively, you could overlay both charts, but you would then need to give both charts an identical fixed max value for the y-axis (also available in the theme settings).

bp21

For more data visualizations built on top of the hackAIR air quality data, see our overview post.

A simple display using Kniwwelino

By Wolfgang Röckelein

After I had assembled two hackAIR sensors together with my two sons and put them just outside their windows we started wondering in our family: how could we (or our neighbors) profit more from the sensor? What are the daily and weekly variations of the values of your sensor (or your sensor compared to other hackAIR home sensors)?

We had been experimenting with some Kniwwelinos, and started using them as an addition to the hackAIR home sensor. A “Kniwwelino” is a small and cheap computer device for use in education. They come from Luxemburg, and have some nice features making them an ideal companion to the hackAIR home sensor: They have Wifi connectivity, a 5×5 LED matrix, a RGB LED and two buttons, are USB-powered and are cheap (around 12€). Plus they use the same CPU and development environment as the hackAIR home sensors!

I developed a script for the Kniwwelino to regularly obtain the most current readings of one hackAIR home sensor from the hackAIR platform (no need to change anything on your hackAIR home sensor and your neighbors could use the same approach to see the measurements). The index value (very good, good, medium and bad) sets the RGB LED color to green, yellow, orange and red respectively and when you press a button you see either the PM2.5 or the PM10 reading from your sensor as scrolling text on the LED matrix. The script is public source, so feel free to get one (or two or three…) Kniwwelinos to get an up-to-date display on your hackAIR home sensor readings. You need an USB power supply and should use a mechanical clock timer so the Kniwwelino is only operating when you are awake and at home in order to conserve energy. You can programme the sensor ID the Kniwwelino should use and the ID is stored in flash memory, so it is used when the clock timer repowers the device.

For more data visualizations built on top of the hackAIR air quality data, see our overview post.

Make even more sense of your hackAIR home sensor data

In March, we published a first story on visualizing hackAIR data. hackAIR users have started taking data visualization into their own hands – here’s an overview of exciting experiments we’ve found so far.

A simple display using Kniwwelino. How to combine a small electronic device used in education with data from your hackAIR home sensors to build a simple LED display for your family and neighbours.

Let’s compare readings from two sensors. How to use Google Data Studio to compare PM2.5 and PM10 readings for two sensors from yesterday.

Larger date ranges need a better cache. How to use Google Sheets to overcome API limitations and store data to visualize larger time scales.

Happy experimenting with Kniwwelinos, Google Data Studio, Google Sheets and other tools for your (and our) hackAIR home sensor readings!

hackAIR sensors across Europe

Germany, Netherlands, United Kingdom, Peru… in the past month, we’ve already shipped hackAIR sensors to fourteen countries worldwide.

However, we’re still missing a few countries in our list – that’s why we’re calling a challenge:

Let’s make this happen, together: a hackAIR sensor in each EU Member State! 

If you are a resident in one of the following countries AND if you are the first in your country to order a hackAIR sensor through our website, you’ll receive 5€ off your order.

It’s easy – just as easy as to connect your new hackAIR sensor to your WiFi. Find your country in the list. Copy the coupon code. Go to the product page, and order your sensor.Enter the coupon code at check-out. Your payment will be 37 € instead of 42 € (plus shipping).

Interested? Then: order your sensor today and be the first in your country!

Current status (2 November): 15 countries to go.

  1. Bulgaria – hackBG
  2. Croatia – hackHR
  3. Cyprus – hackCY
  4. Czech Republic – hackCZ
  5. Estonia – hackEE
  6. Finland – hackFI
  7. Hungary – hackHU
  8. Ireland – hackIE
  9. Latvia – hackLV
  10. Lithuania – hackLT
  11. Poland – hackPL
  12. Portugal – hackPT
  13. Romania – hackRO
  14. Slovakia – hackSK
  15. Slovenia – hackSI

We will update the list regularly and also share updates through social media!

hackAIR Question Thursday

You sent us questions, we responded: The first hackAIR Question Thursday took place on Thursday, 27 September. We interviewed Dr. Evangelos Kosmidis, one of the masterminds behind the hackAIR project. Here are some of the questions that were asked:

  • When you look at air quality – where do you see the greatest risk for human health?
  • Why do we need additional data? Where do low-cost sensors come in?
  • How reliable are low-cost sensors? How do the photo estimates work?
  • How is the data used? How can we make sense of it?
  • What’s next? What’s the role of citizens in reducing air quality?

Interested in learning more? You can view the recorded session here.

And: if you have more questions, send them to us. Tweet them @hack_air with #questionthursday.

Copyright 2021. All rights reserved

Take part in this short survey and help us improve your hackAIR experience.