# SkiPredictor **Autonomous Ski Station Forecasting System for Northern Spain.** SkiPredictor uses a hybrid approach (Rules Engine + Machine Learning) to provide high-accuracy forecasts for ski station status, open kilometers, and crowd levels. It targets three main stations: **Valgrande-Pajares**, **San Isidro**, and **Fuentes de Invierno**. ## πŸš€ Overview - **Hybrid Prediction**: Combines physical rules (wind thresholds, minimum snow depth, precipitation) with ML models (Random Forest, Gradient Boosting, LightGBM) trained on 15+ years of historical data. - **Automated Pipeline**: Daily data collection from Open-Meteo (weather) and Infonieve (station status), followed by automated feature engineering and prediction runs. - **Multi-Channel Delivery**: - **Telegram Bot**: Instant updates and interactive station queries. - **FastAPI Backend**: Professional REST API for integration with web and mobile apps. - **Scheduled Tasks**: Internal APScheduler manages forecast cycles and weekly model retraining. - **Crowd Analysis**: YOLOv11-based crowd detection via public webcams. - **Push Notifications**: Telegram users can subscribe to daily forecasts via `/suscribir` and `/desuscribir` commands. - **Admin Accuracy Reports**: Daily divergence analysis sent to admin Telegram accounts comparing predictions vs. actual data. ## πŸ› οΈ Core Components - **Backend (`app/`)**: FastAPI server providing JWT-authenticated access to forecasts and system status. - **ML Engine (`ml/`, `predictor/`)**: Training and inference logic using scikit-learn and LightGBM. - **Bot (`bot/`)**: Telegram bot implementation for user interaction. - **Pipeline (`pipeline/`, `scripts/`)**: Data ingestion, scraping, and feature engineering. - **Storage (`storage/`)**: Unified SQLite database for historical datasets, runtime logs, and predictions. ## 🏁 Quick Start ```bash # Clone the repository git clone https://git.dariosevilla.es/dasemu/skipredictor.git cd skipredictor # Initialize environment and start bot ./start.sh --cron --collect-now --bot ``` *See [DEPLOYMENT.md](DEPLOYMENT.md) for detailed server setup, ML training, and systemd integration.* ## πŸ“– Documentation - [API Specification](API_SPEC.md): REST API endpoints, schemas, and authentication. - [Deployment Guide](DEPLOYMENT.md): Server installation, cron jobs, and ML workflows. - [Operations Guide](OPERATIONS.md): Common administrative tasks and troubleshooting. - [TODO / Roadmap](TODO.md): Current status and planned features. ## βš–οΈ License MIT License - Copyright (c) 2026 DarΓ­o Sevilla