A Flexible Tool for Retrieving and Working with PurpleAir Sensor Data
GEOFFREY SMITH,
University of Georgia Abstract Number: 93
Working Group: Instrumentation and Methods
AbstractThere are over 20,000 low-cost PurpleAir sensors deployed around the world measuring particulate matter concentration. Most of these sensors report their data through a publicly-available web interface [1], which serves as a valuable resource for researchers and hobbyists alike. However, retrieving historical data for specific sensors is cumbersome as four separate CSV files must be downloaded and combined for each sensor. And, while PurpleAir does provide an API (Application Programming Interface) that can be called from various programming languages, it can only retrieve the most recent data. Alternatively, historical data from individual sensors can be retrieved from the Thingspeak service, but doing so requires several steps and is limited to retrieving at most 11 days of data at a time. What is more, there are no tools for post-processing the data after they have been retrieved.
Here, we describe a set of MATLAB tools that we have developed to make it easy for users to find the PurpleAir sensors near any location and to retrieve historical data for one or more sensors. The tools also provide a convenient way to process data from several sensors with a consistent “pipeline” that includes options to average, “clean," visualize and correct the data, including the “US EPA” [2] and “LRAPA” [3] corrections. These tools have also been designed in a way that makes it easy for the user to extend or modify them to add custom data processing functionality.
[1] map.purpleair.com (Accessed April 28, 2022)
[2] Barkjohn, K. K., Gantt, B. & Clements, A. L. Development and application of a United States-wide correction for PM2.5 data collected with the PurpleAir sensor. Atmos Meas Tech 14, 4617–4637 (2021).
[3] https://www.lrapa.org/DocumentCenter/View/4147/PurpleAir-Correction-Summary (Accessed April 28, 2022).