A simple Python ETL pipeline that fetches real-time weather data from the OpenWeather API every 5 minutes and saves it to a CSV file.
- Python 3
- requests
- pandas
- schedule
- Extracts live weather data using OpenWeather API
- Transforms JSON into structured data
- Loads incremental data into CSV
- Runs automatically every 5 minutes
- Clone this repository:
git clone https://github.com/sshossen/weather_ctg.git cd weather-api-etl - Create virtual environment and install dependencies:
`python -m venv venv venv\Scripts\activate pip install -r requirements.txt`
- Edit these lines in
weather_etl.py:api_key = 'b38e08962eb2cd65e5644744af042b9a' city_name = 'Chittagong'
- Run the script:
python weather_etl.py