A modular Python weather dashboard desktop application built with CustomTkinter. The project combines real-time weather observations, Air Quality Index (AQI) readings, and a detailed 5-day hourly forecast. It features custom-built canvas weather particle animations and fits a 3rd-degree polynomial least-squares regression model for temperature and humidity curve evaluations.
- Live Dashboard Panel:
- Current weather status: Temperature, location name, feels-like metrics, and description.
- Dynamic Canvas Particle Animations: Interactive "Live Sky Window" canvas showing falling rain, drifting clouds, glowing sun rotations, or falling snow.
- Air Quality Index (AQI): Queries the OpenWeatherMap Air Pollution API to retrieve live AQI statuses (Good, Fair, Moderate, Poor, Very Poor) along with PM2.5 and PM10 metrics.
- Detailed Metrics Cards: Custom-styled cards representing Humidity, Wind speed & direction (with interactive umbrella advice), Pressure, Sunrise, Sunset, and Visibility.
- Hourly Forecast Panel:
- Scrollable detailed breakdown of 3-hourly forecast segments for the next 5 days.
- Rows detail Time, Temperature, Weather Emoji, Sky Description, Humidity %, and Wind Speed.
- Predictive Model Validation:
- Evaluates a 3rd-degree least-squares polynomial regression model using NumPy on the forecast points.
- Tracks the Mean Absolute Error (MAE) and calculates fit confidence scores to validate the model's accuracy on the dashboard card.
weather/
├── src/
│ ├── config.py # Global settings and OpenWeatherMap API Key
│ ├── pipeline.py # API retrieval engine
│ ├── model.py # Predictive polynomial least-squares fitting (NumPy)
│ ├── gui.py # CustomTkinter dashboard layout and animated sky canvas
│ └── __init__.py # Package initialization marker
├── .gitignore # Git exclusion rules
├── main.py # Package execution entry point
├── requirements.txt # Third-party dependencies specifications
└── README.md # Project documentation (this file)
- Python 3.8 or higher.
- An active internet connection.
Navigate to the root project directory in your terminal and run:
pip install -r requirements.txtOpen the configuration file src/config.py and ensure the API_KEY string is populated with your OpenWeatherMap key:
API_KEY = "your_openweathermap_api_key"To launch the dashboard, execute the main package runner:
python main.pyThe following libraries are used to build this application:
customtkinter: For the modern, styled desktop user interface.pandas: For structured forecast data representations.numpy: For least-squares polynomial coefficient curve fittings and regressions.requests: For fetching data from OpenWeatherMap REST endpoints.pillow(PIL): For image asset scaling.