Skip to content

MGadhvi/weather-etl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Data Visualization Project

This project retrieves weather data for specified cities using the OpenWeatherMap API, stores the data in a PostgreSQL database, and visualizes the results using Seaborn and Matplotlib. The visualizations are saved in a dedicated folder.

Project Structure

project_root/
│
├── config/
│   └── config.json          # Configuration file containing API key, database config, and city list
│
├── weather_etl/
│   ├── init.py          # Package initialization file
│   ├── config.py            # Module for loading configuration settings
│   ├── weather_api.py       # Module for fetching weather data from the API
│   ├── database.py          # Module for database operations (loading and fetching data)
│   └── visualization.py      # Module for visualizing weather data
│
├── visualizations/           # Folder for saving generated plots
│   └── (this folder will contain the saved plots)
│
└── main.py                  # Main entry point of the application

Requirements

  • Python 3.x
  • PostgreSQL
  • Required Python packages (listed in `requirements.txt`)

Setup Instructions

  1. Clone the repository:
    git clone [email protected]:MGadhvi/weather-etl.git
    cd weather-etl
        
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
        
  3. Install required packages:
    pip install -r requirements.txt
        
  4. Configure the project:
    • Create `config/config.json` and fill in your OpenWeatherMap API key and PostgreSQL database configuration.
    • Specify the list of cities you want to retrieve weather data for:
       {
        "api_key": "YOUR_API_KEY",
        "db_config": {
            "dbname": "your_db_name",
            "user": "your_username",
            "password": "your_password",
            "host": "localhost",
            "port": 5432
        },
        "cities": ["City1", "City2", "City3"]
    }
        
  5. **Run the application**:
    python main.py
        

Output

  • The weather data will be stored in the specified PostgreSQL database.
  • Visualizations will be saved in the `visualizations/` folder as PNG files.

License

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

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages