https://github.com/gevanilopez/python-weather-etl-app
Simple Python ETL that loads Open-Meteo hourly weather into SQLite and prints summary stats.
https://github.com/gevanilopez/python-weather-etl-app
data-engineering etl open-meteo python sqlite
Last synced: about 1 month ago
JSON representation
Simple Python ETL that loads Open-Meteo hourly weather into SQLite and prints summary stats.
- Host: GitHub
- URL: https://github.com/gevanilopez/python-weather-etl-app
- Owner: GevaniLopez
- License: other
- Created: 2025-11-04T16:25:38.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-04T16:49:28.000Z (8 months ago)
- Last Synced: 2025-11-04T18:24:08.194Z (8 months ago)
- Topics: data-engineering, etl, open-meteo, python, sqlite
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Weather ETL App
Fetch historical hourly weather for Pensacola, FL on **September 26** for the last 5 years, store into SQLite, and print quick summary stats.
## Stack
- Python 3.10+
- Requests (HTTP client)
- SQLite (built-in)
- Minimal standard library (no framework)
## Quickstart
```bash
# 1) Create & activate a virtual environment
python -m venv .venv
# Windows:
# .venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# 2) Install dependencies
pip install -r requirements.txt
# 3) Run
python main.py
```
This creates a local `weather.db` (SQLite) and prints summary metrics.
## What it does
- Builds a list of target dates (09-26 for each of the last 5 years)
- Calls Open‑Meteo archive API for hourly temperature, precipitation, and wind
- Upserts into a simple `weather` table keyed by `(date, hour)`
- Prints: row count, average temperature, total precipitation, average wind
## Files
- `main.py` — single-file ETL script
- `requirements.txt` — pinned dependencies
- `.gitignore` — ignores `weather.db`, venv cache, and artifacts
## Example output
```
2021-09-26: inserted 24 hourly records
2022-09-26: inserted 24 hourly records
2023-09-26: inserted 24 hourly records
2024-09-26: inserted 24 hourly records
Summary across all dates:
Rows: 96
Avg Temp (°C): 26.41
Total Precip (mm): 3.2
Avg Wind (m/s): 4.18
```
## Notes
- API: https://archive-api.open-meteo.com/v1/archive (no API key required)
- Location: Pensacola, FL (lat 30.4213, lon -87.2169)
- Timezone: UTC for simplicity
- You can change `YEARS_BACK`, `LAT`, `LON`, `MONTH`, `DAY` at the top of `main.py`.