Design of a Monitoring and Missing Data Reconstruction System for Automatic Weather Station and Automatic Rain Gauge Using K-Nearest Neighbor at Banten Climatology Station
Abstract
Automatic Weather Station (AWS) and Automatic Rain Gauge (ARG) data play an important role in meteorological observation activities. However, automatic observation data may contain missing values caused by communication failures, instrument problems, or delays in data transmission. This research aims to design a web-based monitoring system and implement the K-Nearest Neighbor (KNN) method to reconstruct missing values in AWS and ARG data at Banten Climatology Station. The system was developed using React and TypeScript for the frontend, Flask as the backend API, InfluxDB as the time-series database, and Scikit-learn for the implementation of KNN. The system monitors 11 AWS stations and 37 ARG stations through MQTT and HTTP data channels. The reconstruction process used historical data from 1 January 2025 to 1 January 2026. Model evaluation was conducted using a masking method with K values of 3, 5, 7, and 10, and evaluated using RMSE, MAE, R², MAPE, and recovery rate. The results show that the system successfully displays monitoring data, station location maps, time-series graphs, alert information, and data reconstruction features. The KNN method achieved a recovery rate of 74.94% for AWS data and 83.15% for ARG data before the safety net stage. Based on these results, the system can be used as a supporting tool for monitoring and improving the completeness of meteorological observation data at Banten Climatology Station.