RAQA-Weather: A Machine Learning-Based Monitoring System for Iran
Executive Summary RAQA-Weather is a comprehensive weather intelligence system designed for Iran that combines real-time web scraping, machine learning-based spatial prediction, and interactive visualization. The system processes data from 17 synoptic stations across Iran and generates high-resolution (28,564 grid points) daily weather predictions using LightGBM models trained on 14 years of ERA5 reanalysis data. Component Technology Version Frontend CustomTkinter 6.0.0 ML Framework Scikit-learn + LightGBM 1.7.2 / 4.7.0 Data Processing Pandas, NumPy, PyArrow 2.3.3 / 2.2.6 / 25.0.0 Visualization Matplotlib, Geopandas 3.10.9 / 1.1.4 Web Scraping Selenium 4.46.0 Spatial Data Shapefile, PyProj 3.7.1 Deployment PyInstaller 6.21.0 Feature Engineering Pipeline # Total Features: 90 per grid point features = [ # Airport data (17 airports × 5 parameters = 85) f"{i+1}-{airport_name}_Temperature(C)", f"{i+1}-{airport_name}_DewPoint(C)", f"{i+1}-{airport_name}_Humidity(%)", f"{i+1}-{airport_name}_WindSpeed(m/s)", f"{i+1}-{airport_name}_Pressure(hPa)", # Spatial features (5) 'Latitude', 'Longitude', 'DayOfYear', 'Month', 'Year' ] Machine Learning Model Model Architecture Algorithm: LightGBM with MultiOutputRegressor wrapper Training Strategy: 12 monthly models (one per month) Training Period: 2011-2024 (training) / 2024-2025 (holdout) Features: 90 input features Targets: 7 weather parameters Targets Target Unit Description Temperature_2m °C Air temperature at 2m Dew_Point °C Dew point temperature Skin_Temperature °C Surface skin temperature Precipitation mm Daily precipitation Pressure hPa Atmospheric pressure Wind_Speed m/s Wind speed at 10m Wind_Direction ° Wind direction Model Performance (Cross-Validation) Target Best Model R² (CV) RMSE (CV) Temperature_2m LGBM 0.837 2.65°C Skin_Temperature LGBM 0.852 3.06°C Pressure LGBM 0.956 15.71 hPa Dew_Point LGBM 0.540 4.27°C Precipitation RandomForest -0.450 54.26 mm Wind_Speed LGBM 0.283 1.15 m/s Wind_Direction LGBM -0.131 68.53° Feature Importance Analysis Feature Group Importance Airport Temperature 32.4% Airport Pressure 24.7% Spatial Features 18.2% Temporal Features 14.8% Wind Features 5.9% Humidity Features 4.0% Implementation Details Web Scraping Engine Technology: Selenium with GeckoDriver Headless Mode: Enabled for production Fallback Strategy: Multiple CSS selectors and XPath queries Retry Logic: 2 attempts with 3-second delays Data Extraction: 17 airports, up to 24 hours per station Prediction Grid Grid Size: 28,564 points covering Iran Resolution: ~10km spacing Output: Parquet format with predictions for all 7 targets User Interface Framework: CustomTkinter (modern dark theme) Workflow: Scrape → Predict → Visualize Interaction: Click airport to view history, select parameter for map Training Performance Month Samples Avg R² Avg RMSE January 24,521 0.782 18.42 February 23,891 0.794 17.83 March 25,104 0.801 17.21 April 24,783 0.815 16.54 May 25,212 0.823 15.98 June 24,956 0.831 15.47 July 25,438 0.846 14.92 August 25,321 0.844 15.03 September 24,891 0.832 15.36 October 25,043 0.819 15.72 November 24,567 0.805 16.28 December 24,312 0.793 16.81 Holdout Performance (2024-06-01 to 2025-06-13) Target Avg R² Avg RMSE Temperature_2m 0.784 2.98°C Skin_Temperature 0.796 3.42°C Pressure 0.912 18.24 hPa Dew_Point 0.512 4.58°C Wind_Speed 0.265 1.21 m/s System Requirements Component Minimum Recommended RAM 4 GB 8 GB Storage 1 GB 2 GB OS Windows 10 Windows 11 Installation Run Weather_Setup.exe Follow installation wizard Launch from Start Menu or Desktop shortcut Click "Scrape All Airports" to fetch current data Click "Run Prediction" to generate forecasts Click "Show Map" for interactive visualization. Due to file size limitations for upload, the installer executable (Weather_Setup.exe) is not included in this repository. For access to the full installer package, please contact the author directly via email: [akaviani2020@yahoo.com]