A web application that compares weather forecasts from multiple sources against actual data from a personal weather station, enabling accuracy analysis and trend tracking over time.
- Compare forecast accuracy between different weather services (Met Office, OpenWeatherMap)
- Track forecast performance over time with interactive visualizations
- Provide data-driven insights for choosing the most reliable forecast sources
- Mobile-optimized interface for quick weather accuracy checks
- β Personal Weather Station data ingestion via webhook
- β Met Office and OpenWeatherMap API integration
- β Interactive timeline charts with mobile touch controls
- β Real-time accuracy metrics for temperature, wind, and rainfall
- β Configurable location and API settings
- β Responsive design optimized for mobile devices
- π Additional weather service integrations
- π Home Assistant custom component
- π User-defined accuracy thresholds
- π Lead-time performance analysis (1h, 6h, 24h forecast buckets)
- π Advanced data archiving and retention policies
- Framework: FastAPI (Python)
- Database: PostgreSQL with TimescaleDB
- Caching: Redis
- APIs: Met Office DataHub, OpenWeatherMap
- Framework: React
- Charts: Recharts + D3.js for timeline interactions
- Styling: Tailwind CSS
- PWA: Workbox for offline functionality
- Containerization: Docker
- CI/CD: GitHub Actions
- Deployment: Docker Compose on Proxmox
- Docker and Docker Compose
- API keys for Met Office and OpenWeatherMap
- Personal Weather Station with Home Assistant integration
-
Clone the repository
git clone https://github.com/m90att/weather-forecast-comparison.git cd weather-forecast-comparison
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys and configuration
-
Start the development environment
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Configure your Home Assistant to send weather data to the webhook endpoint:
# configuration.yaml
rest_command:
local_weather_webhook:
url: "http://your-app-server:8000/api/v1/webhook/weather-data"
method: POST
content_type: "application/json"
payload: >
{
"PASSKEY": "{{ passkey }}",
"stationtype": "{{ stationtype }}",
"dateutc": "{{ dateutc }}",
"tempf": "{{ tempf }}",
"humidity": "{{ humidity }}",
"winddir": "{{ winddir }}",
"windspeedmph": "{{ windspeedmph }}",
"rainratein": "{{ rainratein }}",
"dailyrainin": "{{ dailyrainin }}",
"baromrelin": "{{ baromrelin }}"
}
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# End-to-end tests
npm run test:e2e
# Test responsive design
npm run test:mobile
# Performance testing
npm run test:lighthouse
The app is designed mobile-first with:
- Touch-friendly timeline scrubbing
- Responsive chart layouts
- Progressive Web App capabilities
- Optimized for iOS and Android devices
- Active Data: 3 months of detailed hourly readings
- Archived Data: 1+ years of aggregated summaries
- Automatic Cleanup: Configurable retention policies
- Temperature (Β°C)
- Humidity (%)
- Wind Speed/Direction (mph/degrees)
- Rainfall (mm)
- Pressure (hPa)
- Solar Radiation (W/mΒ²)
- UV Index
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/weather_app
REDIS_URL=redis://localhost:6379
# API Keys
MET_OFFICE_API_KEY=your_met_office_key
OPENWEATHERMAP_API_KEY=your_openweather_key
# Weather Station
WEATHER_STATION_PASSKEY=your_passkey
WEATHER_STATION_LAT=51.5074
WEATHER_STATION_LON=-0.1278
# Application
APP_DEBUG=false
APP_LOG_LEVEL=info
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- Core functionality implementation
- Mobile optimization
- Basic accuracy metrics
- Deployment automation
- Additional weather service integrations
- User-defined accuracy thresholds
- Advanced visualization options
- Data export capabilities
- Home Assistant integration
- Public API development
- Multi-user support
- Community weather station network
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support:
- Create an issue for bugs or feature requests
- Check existing documentation
- Review the API documentation at
/docs
when running locally