Data QC automation × Desktop tool

Sensor-versus-Reference Check Tool

A self-installed small air quality sensor returns one reading every 5 minutes. Component aging, a blocked air inlet, or a transmission outage can distort the readings. The tool uses a nearby public station as a reference. It runs three checks for the sensor and period the user selects, and lists the dates that need manual review.

3 checksCompleteness / plausibility / correlation
2 settingsSelect a sensor and a period, then run
Single executableNo development environment needed on the user's computer

Terms

Reference station

A nearby public air quality station. Its instruments are of a higher grade and are maintained more often, so it serves as the comparison baseline.

Missing ratio

The share of the records due that day that were not returned. One record arrives every 5 minutes, so a day should have 288 records.

Prediction interval

The range into which the sensor reading should fall, calculated from the reference station reading using the regression equation and the selected confidence level.

Original problems

Before

  • For each sensor, the user downloads the reference station data by hand, aligns the dates, and pastes the data into a spreadsheet to draw charts.
  • The criteria are not written down, so different people checking the same data can reach different conclusions.
  • The users are not programmers and cannot resolve network or file format problems on their own.

After

  • The tool converts the raw file format, downloads the reference station data, and aligns the dates.
  • The thresholds of the three checks are saved as fixed rules. The same data gives the same result on every run.
  • An environment test function is included. Error messages explain the cause and the fix in everyday language.

Workflow

1Import and convertThe weekly 5-minute raw records are converted to a common format and aggregated into daily means.
2Completeness checkA day with a missing ratio of 20% or more fails.
3Plausibility checkA day whose daily mean exceeds the plausible upper limit for that month fails.
4Correlation checkA regression equation is built from the reference station readings. A day whose reading falls outside the prediction interval fails.
5OutputA summary table of pass ratios, a list of failed dates, a scatter plot, and a time-series chart are written to one spreadsheet.

Interactive demo: run one check

Sensor reading checkThe data is a synthetic example. A few days contain pre-inserted anomalies
Completeness passed—
Plausibility passed—
Correlation passed—
Needs manual review—
Correlation scatter plot (x axis: reference station, y axis: sensor under test)
Daily mean time-series chart (shaded band: prediction interval)
Dates that need manual review

Outcome and technology

Consistent criteria

The thresholds of the three checks are saved as rules. Different people running them reach the same conclusion.

Usable by non-programmers

A graphical interface and a single executable mean no development environment is needed.

Traceable results

Each anomaly includes that day's value, the predicted range, and the reason for failing.

PythontkinterpandasLinear regression and prediction intervalmatplotlibPyInstallerPublic air quality monitoring data