Canada Weekly Weather Report Generator
Goal
Generate a professional PDF weather report for Canada using real-time data from Open-Meteo API (free, no API key required). The report uses the "Orange and Black Modern Annual Report" template style.
Inputs
- Week Start Date (optional): Start date for the report period (defaults to current week)
- Cities (optional): List of Canadian cities to include (defaults to major cities)
Default Canadian Cities
The report covers these major cities by default:
- West Coast: Vancouver, Victoria
- Prairies: Calgary, Edmonton, Winnipeg
- Central: Toronto, Ottawa, Montreal
- Atlantic: Halifax, St. John's
- North: Whitehorse, Yellowknife
Scripts
All scripts are in ./scripts/:
fetch_weather.py - Fetches weather data from Open-Meteo API (no API key needed)
generate_report_pdf.py - Generates the styled PDF report
Process
1. Fetch Weather Data
python3 ./scripts/fetch_weather.py --output .tmp/canada_weather.json
Optional parameters:
--cities "Vancouver,Toronto,Montreal" - Custom city list
--days 7 - Number of forecast days (default: 7, max: 16)
2. Generate PDF Report
python3 ./scripts/generate_report_pdf.py \
--input .tmp/canada_weather.json \
--output .tmp/canada_weekly_weather_report.pdf \
--template ".tmp/Orange and Black Modern Annual Report.pdf"
3. Review and Deliver
- Open
.tmp/canada_weekly_weather_report.pdf to verify
- Upload to Google Drive or send via email if requested
Report Structure (Matching Template)
- Cover Page: "Canada Weekly Weather Report" with date range
- Table of Contents: Regional sections listed
- National Overview: Summary of weather patterns across Canada
- Regional Highlights: Key metrics (avg temp, precipitation, extremes)
- West Coast Weather: Vancouver, Victoria details
- Prairies Weather: Calgary, Edmonton, Winnipeg details
- Central Canada Weather: Toronto, Ottawa, Montreal details
- Atlantic Weather: Halifax, St. John's details
- Northern Territories: Whitehorse, Yellowknife details
- 7-Day Outlook: Forecast summary with trends
- Weather Alerts: Any active warnings/advisories
- Data Sources: Open-Meteo attribution
Output
Primary deliverable: PDF report at .tmp/canada_weekly_weather_report.pdf
The report includes:
- Current conditions for each city
- 7-day forecast with highs/lows
- Precipitation amounts
- Regional comparisons
Error Handling
- City not found: Skip city, log warning, continue
- Network error: Retry up to 3 times with backoff
- Missing data: Use "N/A" placeholders
Environment
No API key required! Open-Meteo is free and open-source.
Data source: https://open-meteo.com/
Schema
Inputs
| Name |
Type |
Required |
Description |
week_start_date |
string |
No |
Start date for report period (defaults to current week) |
cities |
string |
No |
Comma-separated list of Canadian cities |
Outputs
| Name |
Type |
Description |
pdf_path |
file_path |
PDF report at .tmp/canada_weekly_weather_report.pdf |
Cost
Free (Open-Meteo API)
1---2name: generate-report3description: Generate weekly weather reports for Canada using Open-Meteo API (free, no API key required) and PDF generation. Use when user asks to create a weather report, generate Canada weather summary, or build weekly weather PDF.4---56# Canada Weekly Weather Report Generator78## Goal9Generate a professional PDF weather report for Canada using real-time data from Open-Meteo API (free, no API key required). The report uses the "Orange and Black Modern Annual Report" template style.1011## Inputs12- **Week Start Date** (optional): Start date for the report period (defaults to current week)13- **Cities** (optional): List of Canadian cities to include (defaults to major cities)1415## Default Canadian Cities16The report covers these major cities by default:17- **West Coast**: Vancouver, Victoria18- **Prairies**: Calgary, Edmonton, Winnipeg19- **Central**: Toronto, Ottawa, Montreal20- **Atlantic**: Halifax, St. John's21- **North**: Whitehorse, Yellowknife2223## Scripts24All scripts are in `./scripts/`:25- `fetch_weather.py` - Fetches weather data from Open-Meteo API (no API key needed)26- `generate_report_pdf.py` - Generates the styled PDF report2728## Process2930### 1. Fetch Weather Data31```bash32python3 ./scripts/fetch_weather.py --output .tmp/canada_weather.json33```3435Optional parameters:36- `--cities "Vancouver,Toronto,Montreal"` - Custom city list37- `--days 7` - Number of forecast days (default: 7, max: 16)3839### 2. Generate PDF Report40```bash41python3 ./scripts/generate_report_pdf.py \42 --input .tmp/canada_weather.json \43 --output .tmp/canada_weekly_weather_report.pdf \44 --template ".tmp/Orange and Black Modern Annual Report.pdf"45```4647### 3. Review and Deliver48- Open `.tmp/canada_weekly_weather_report.pdf` to verify49- Upload to Google Drive or send via email if requested5051## Report Structure (Matching Template)521. **Cover Page**: "Canada Weekly Weather Report" with date range532. **Table of Contents**: Regional sections listed543. **National Overview**: Summary of weather patterns across Canada554. **Regional Highlights**: Key metrics (avg temp, precipitation, extremes)565. **West Coast Weather**: Vancouver, Victoria details576. **Prairies Weather**: Calgary, Edmonton, Winnipeg details587. **Central Canada Weather**: Toronto, Ottawa, Montreal details598. **Atlantic Weather**: Halifax, St. John's details609. **Northern Territories**: Whitehorse, Yellowknife details6110. **7-Day Outlook**: Forecast summary with trends6211. **Weather Alerts**: Any active warnings/advisories6312. **Data Sources**: Open-Meteo attribution6465## Output66**Primary deliverable**: PDF report at `.tmp/canada_weekly_weather_report.pdf`6768The report includes:69- Current conditions for each city70- 7-day forecast with highs/lows71- Precipitation amounts72- Regional comparisons7374## Error Handling75- **City not found**: Skip city, log warning, continue76- **Network error**: Retry up to 3 times with backoff77- **Missing data**: Use "N/A" placeholders7879## Environment80**No API key required!** Open-Meteo is free and open-source.8182Data source: https://open-meteo.com/8384---8586## Schema8788### Inputs89| Name | Type | Required | Description |90|------|------|----------|-------------|91| `week_start_date` | string | No | Start date for report period (defaults to current week) |92| `cities` | string | No | Comma-separated list of Canadian cities |9394### Outputs95| Name | Type | Description |96|------|------|-------------|97| `pdf_path` | file_path | PDF report at .tmp/canada_weekly_weather_report.pdf |9899### Cost100Free (Open-Meteo API)