Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Weather Insights & Predictive Forecast Dashboard

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.

🚀 Key Features

  • 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.

📁 System Directory Structure

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)

🛠️ Installation & Setup

Prerequisites

  • Python 3.8 or higher.
  • An active internet connection.

Step 1: Install Dependencies

Navigate to the root project directory in your terminal and run:

pip install -r requirements.txt

Step 2: Configure OpenWeatherMap API Key

Open the configuration file src/config.py and ensure the API_KEY string is populated with your OpenWeatherMap key:

API_KEY = "your_openweathermap_api_key"

💻 Running the Application

To launch the dashboard, execute the main package runner:

python main.py

📦 Dependencies Reference

The 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.

About

To fetch weather data using an API in Python, you can utilize a service like OpenWeatherMap. First, you'll need to obtain an API key by signing up on their website.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages