Detection of anomalies in environmental data: using AI in the city of Valencia
Air quality is an essential factor for urban well-being, but monitoring it depends on sensor systems that can sometimes fail or record unexpected values. To support Valencia City Council in its task of monitoring this important factor, our IDAL's (Intelligent Data Analysis Laboratory) research team from the University of Valencia has developed, within the framework of the Citcom.ai project, a use case focused on the automatic detection of anomalies in environmental data using Artificial Intelligence.
The objective was clear: to identify, accurately and in real time, anomalous patterns in the city's air pollution levels. This includes both unusual environmental episodes — such as sudden increases in NO₂ (nitrogen dioxide, an atmospheric pollutant chemical compound formed mainly by vehicle and industrial combustion) or suspended particles — and possible failures in the sensors distributed throughout Valencia.

How can AI help interpret what sensors are telling us?
For this purpose, the time series for each station are processed (deduplication, uniform resampling, value imputation) and then AI models based on TimeGPT (Nixtla) are applied, specialising in predicting and detecting unexpected deviations from the usual behaviour of each measurement point.
Thanks to this approximation, the tool is able to flag irregular values at any of the 11 municipal stations and for multiple different types of pollutants. This helps to prioritise technical reviews, activate air quality alerts and, in general, ensure that the data on which public decisions are made is reliable. In addition, the system can be extended to other pollutants or even adapted to different cities.

Although still in the pilot phase, this use case demonstrates how AI can bring immediate value to urban environmental management, not only in Valencia but also in any large city with a network of air quality sensors. Its ability to detect anomalies in real time allows for faster responses, with more information and better-informed decisions, thus reinforcing public health policies and the direct protection of citizens.
If you found this use case interesting and would like to learn more about how we apply Artificial Intelligence to improve environmental monitoring or ensure the reliability of urban data, or if you think we could help you develop a similar solution for your city or project, please contact us! All the information is available in our contact section.
The authors would like to thank the Regional Ministry of Innovation, Industry, Trade and Tourism (Conselleria d'Innovació, Indústria, Comerç i Turisme de la Generalitat Valenciana) for its funding under Grant Agreement No. 101100728, as part of the European Commission’s Citcom.ai project.