# Water Quality Monitoring: A Water Quality Dataset from an On-Site Study in Macao
## 1 Introduction
Without proper maintenance and management of the water supply system, such as regular cleaning and disinfection of the tanks and the replacement of corroded pipes and tank components, the quality and stability of the water supply to a building will be affected. Therefore, it is the responsibility of building owners or property management entities to properly manage the tap water systems of their buildings and carry out regular inspection, maintenance, and cleaning to avoid the discoloration and uncleanliness of tap water, and to ensure the hygiene, safety, and stability of the water supply to their buildings. In response to the scheme, we need to submit regular application reports to the relevant water quality testing structures for laboratory testing. Traditional laboratory testing of water quality, despite its high accuracy and reliability [4], has significant limitations: firstly, the testing cycle is long (usually taking a few hours to a few days), which makes it difficult to respond to sudden pollution incidents in a timely manner, and discrete sampling fails to capture dynamic changes in the water quality; and secondly, it relies on expensive and sophisticated instruments and professional manpower, from equipment maintenance to reagent consumption to sample transportation and preservation, which are costly, especially in remote areas. In addition, the detection is limited by the laboratory environment; it is difficult to implement on site, and discrete sampling may be due to an uneven spatial distribution or data under-representation. At the same time, the traditional methods are mostly targeted at specific conventional pollutants (e.g., COD and heavy metals) [5], and the detection of emerging trace pollutants (e.g., microplastics and antibiotics) is not sufficiently covered,and the samples are transported in a short time. At the same time, traditional methods are mostly used for specific routine pollutants (e.g., COD and heavy metals), with insufficient coverage of emerging trace pollutants (e.g., microplastics and antibiotics), and the samples are easily contaminated or lost in transportation and pre-treatment, which further affects the accuracy. Because of this, on-site rapid testing, online monitoring, and intelligent technology have gradually become an important direction to make up for the traditional shortcomings. To address these shortcomings, we propose an intelligent IoT-based water quality monitoring system, integrating a multi-sensor array with Raspberry Pi for real-time detection and anomaly classification. Our system continuously monitors pH, total dissolved solids (TDSs), temperature, and turbidity--four key physicochemical parameters that are directly linked to over 60% of global drinking water contamination events, according to reports from the World Health Organization (WHO) and the US Environmental Protection Agency (EPA). While our system does not directly detect microbial or chemical contaminants (e.g., heavy metals), these pollutants often correlate with turbidity or pH fluctuations, allowing for indirect risk assessment. Our proposed system offers significant improvements over traditional IoT-based water quality monitoring solutions. Traditional systems primarily rely on microcontrollers (e.g., STM32 and ESP8266) or embedded devices with limited computational capabilities, requiring cloud-based data processing. In contrast, our system leverages a Raspberry Pi-based architecture with enhanced computing power, enabling local data processing and real-time edge computing. From a sensor integration perspective, traditional systems often incorporate a single or a limited number of sensors (e.g., pH or TDS), making comprehensive water quality assessment difficult. Our system, however, integrates multiple sensors (pH, TDSs, temperature, and turbidity), significantly enhancing its water quality evaluation accuracy. Additionally, traditional systems predominantly use fixed-threshold anomaly detection mechanisms, which struggle to adapt to complex and dynamic environmental conditions.