Skip to content

A Python desktop application delivering real-time weather data, scientific metrics (dew point, UV index, AQI, pressure), and historical trends. Built with Tkinter, ttkbootstrap, Matplotlib, and APIs (OpenWeatherMap, Open-Meteo), it features geolocation, robust error handling, and a modern GUI.

License

Notifications You must be signed in to change notification settings

AmSh4/ClimaCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClimaCode

Climacode is a Python 3 desktop application that provides real-time weather data and scientific metrics for any location worldwide. Users can manually enter a city and country or use geolocation to fetch weather details, including temperature, humidity, wind speed, air quality index (AQI), dew point, UV index, and mean sea level pressure.

The application features a modern graphical user interface (GUI) built with Tkinter and ttkbootstrap, data visualization with Matplotlib, and robust error handling. It integrates the OpenWeatherMap API for standard weather data and the Open-Meteo API for advanced scientific metrics, making it a comprehensive tool for weather enthusiasts and professionals.

Folder Structure

Features

  • Real-Time Weather Data: Fetches current weather conditions, including temperature, humidity, wind speed, and weather description.
  • Scientific Metrics: Displays dew point, UV index, and mean sea level pressure, providing insights beyond standard weather apps.
  • Geolocation Support: Automatically detects the user's location or allows manual input of city and country.
  • Data Visualization: Plots historical temperature trends using Matplotlib for data analysis.
  • Modern GUI: Styled with ttkbootstrap for a professional and user-friendly interface.
  • Error Handling: Robust handling of API failures, invalid inputs, and geolocation errors.
  • Logging: Maintains detailed logs for debugging and monitoring.
  • Offline Data: Includes sample datasets for testing and development.

Installation

  1. Clone the Repository:
    Git clone
       https://github.com/your-username/ClimaCode.git
       cd ClimaCode
    
  2. Install Dependencies:
  • Ensure Python 3.8+ is installed.
  • Then, install required packages: pip install -r requirements.txt
  1. Obtain API Keys:
    • Sign up at OpenWeatherMap to get an API key.
    • Update src/utils/config.py with your OpenWeatherMap API key:
        OPENWEATHER_API_KEY = "your-api-key-here"
      
  2. Run the Application:
      python src/main.py
    

Usage

  • Manual Location Input: Enter a city and optional country in the GUI, then click "Get Weather" to fetch data.
  • Current Location: Click "Use Current Location" to automatically detect and display weather for your location.
  • Weather Display: View detailed weather information, including scientific metrics like AQI, dew point, and UV index.
  • Visualization: Historical temperature trends are plotted in the "Weather Trends" section.

Project Structure

  • src/: Source code directory.
  • main.py: Entry point for the application.
  • api/: Modules for API interactions (weather data and geolocation).
  • gui/: GUI components and styling.
  • data/: Data processing and visualization modules.
  • utils/: Configuration and logging utilities.
  • assets/: Weather icon images.
  • data/: Sample weather data and historical datasets.
  • tests/: Unit tests for API and data processing.
  • requirements.txt: Python dependencies.
  • LICENSE: MIT License for open-source usage.
  • .gitignore: Ignores logs, virtual environments, and temporary files.

Dependencies

  • Python 3.8+
  • requests: For API calls
  • geocoder: For location detection
  • ttkbootstrap: For GUI styling
  • matplotlib: For data visualization

Testing

Run unit tests to verify functionality: python -m unittest discover tests

Contributing

  • Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request with your changes.
  • Ensure code follows PEP 8 guidelines and includes appropriate tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or feedback, please open an issue on the GitHub repository.

About

A Python desktop application delivering real-time weather data, scientific metrics (dew point, UV index, AQI, pressure), and historical trends. Built with Tkinter, ttkbootstrap, Matplotlib, and APIs (OpenWeatherMap, Open-Meteo), it features geolocation, robust error handling, and a modern GUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages