# A Web-Based Application for Smart City Data Analysis and Visualization
## 3 Methodology: System Architecture and Design
### Data Preprocessing  
Following data collection, each sensor's information is subjected to a comprehensive preprocessing pipeline to ensure its quality, consistency, readiness for analysis, and structural integrity [59]. Subsequently, the collected files are read using flexible parsing configurations to accommodate delimiter variations and handle irregularities. Column headers are standardized by removing extraneous whitespace and harmonizing naming patterns, including converting special or locale-specific characters. Similarly, temporal fields, such as timestamps and time intervals, are converted into structured datetime formats to enable temporal alignment, grouping, and resampling. Numerical columns are validated and cast into appropriate types, and any irregular entries are marked as missing for subsequent treatment. Handling missing or inconsistent data constitutes an essential process throughout our approach. Imputation techniques can be broadly categorized into three main approaches: statistical, intelligent, and hybrid [60]. While recent studies emphasize the growing role of deep neural networks in intelligent imputation, traditional machine learning techniques and statistical methods remain widely used due to their simplicity and reliable performance [61]. In this context, missing values are temporarily replaced with null-equivalent representations compatible with web data formats, providing seamless frontend integration. On the contrary, rows lacking essential values, e.g., invalid or missing timestamps, are removed to maintain data integrity. Likewise, incomplete but non-critical entries are handled via a hybrid imputation strategy that simultaneously applies SARIMAX (Seasonal AutoRegressive Integrated Moving Average with eXogenous regressors) to capture seasonal and temporal dependencies [62], \(k\)-nearest neighbors to exploit local feature similarity [63], and multi-output random forest regression to predict multiple sensor variables at once [64]. Ensemble regressors are also employed to simultaneously predict missing entries across multiple variables [65], leveraging relationships between them to enhance accuracy. This combination preserves both temporal continuity and cross-variable relationships when estimating missing observations. It is worth noting that the imputed values are constrained within the range of observed data to avoid producing unrealistic or out-of-distribution results. To ensure data schema compliance, each dataset is cross-checked against an expected set of required fields. To enrich them, additional attributes are derived, such as calendar-based features (e.g., day of the week or time of day), lagged observations, and time-based grouping identifiers. These engineered features support identifying trends, seasonality, and behavioral patterns across the urban environment. Finally, the processed data are cached at the server level to enhance system efficiency and reduce redundant computations during repeated queries. The data are prepared for web-based delivery by transforming internal representations into standardized primitive types. Before being served to the client, this guarantees full compatibility with JSON serialization protocols and frontend visualization tools. Figure 1: The proposed overall architecture. Various types of urban sensors generate raw data, i.e., air quality sensors, traffic counters, speed detectors, noise recorders, and sensors for electric vehicle charging stations. When a user loads the proposed dashboard, our application automatically retrieves the corresponding datasets. These undergo a comprehensive preprocessing step that cleans and organizes the data, detects incomplete observations, and employs a hybrid imputation strategy that leverages SARIMAX to handle time-dependence and seasonal effects [62], \(k\)-nearest neighbors to infer missing values from nearby points in feature space [63], and multi-output random forest models to predict multiple interrelated sensor variables jointly [64].