🌤️ A comprehensive weather forecasting system combining Classical ML, Quantum Computing, and Modern Web Technologies
- Machine Learning Models: Linear Regression, XGBoost, LSTM for weather prediction
- Quantum Computing: Qiskit-based quantum feature selection and classification
- Interactive Web Interface: Clean HTML/CSS/JS frontend with real-time visualizations
- REST API: FastAPI backend with comprehensive endpoints
- Data Processing: Advanced preprocessing pipeline for weather datasets
- Visualizations: Interactive charts and performance comparisons
- Python 3.8+
- FastAPI & Uvicorn for web backend
- Scikit-learn, XGBoost, TensorFlow for ML models
- Qiskit & PennyLane for quantum computing
- Pandas, NumPy for data processing
- Matplotlib, Plotly for visualizations
- 4GB+ RAM recommended
- Modern web browser with JavaScript enabled
- Internet connection for CDN resources
- Clone the repository
git clone <repository-url>
cd New-Weather- Create virtual environment
python -m venv weather_env
source weather_env/bin/activate # On Windows: weather_env\Scripts\activate- Install dependencies
pip install -r requirements.txt- Verify installation
python -c "import qiskit, tensorflow, fastapi; print('All dependencies installed successfully!')"cd src/api
python main.pyThe API will be available at http://localhost:8000
Navigate to http://localhost:8000 in your browser or open src/frontend/index.html
- Click "Generate Sample Data" to create synthetic weather data
- Or upload your own CSV file with weather measurements
- Select models to train (Linear Regression, XGBoost, LSTM, Quantum)
- Click "Start Training" and monitor progress
- View performance metrics after training completes
- Enter weather features (temperature, humidity, pressure, wind speed)
- Select a trained model
- Get instant predictions
New-Weather/
├── data/ # Data processing modules
│ └── preprocessing.py # Weather data preprocessing
├── src/
│ ├── api/ # FastAPI backend
│ │ └── main.py # Main API server
│ ├── frontend/ # Web interface
│ │ ├── index.html # Main HTML page
│ │ ├── styles.css # Styling
│ │ └── script.js # Frontend JavaScript
│ ├── ml_models/ # Machine learning models
│ │ └── models.py # ML model implementations
│ ├── quantum/ # Quantum computing modules
│ │ └── quantum_ml.py # Quantum ML algorithms
│ └── utils/ # Utility functions
│ └── visualization.py # Plotting and visualization
├── models/ # Saved model files
├── notebooks/ # Jupyter notebooks for analysis
├── tests/ # Unit tests
├── requirements.txt # Python dependencies
└── README.md # This file
- Linear Regression: Baseline model for weather prediction
- XGBoost: Gradient boosting for improved accuracy
- LSTM: Neural network for time series forecasting
- Quantum Feature Selector: Uses variational quantum circuits for feature selection
- Quantum Kernel Classifier: Quantum-enhanced SVM for pattern classification
- Hybrid Classical-Quantum: Combines classical preprocessing with quantum processing
- Variational Quantum Circuits (VQC)
- Quantum Feature Maps
- Quantum Kernel Methods
- NISQ-era quantum algorithms
- Quantum neural networks
- Hybrid optimization
- Automatic differentiation
- CSV files with weather measurements
- Open-Meteo API integration (future)
- Multiple weather stations data
- Temperature, humidity, pressure, wind speed
- Datetime handling and feature engineering
- Missing value imputation
- Outlier detection and removal
- Feature scaling and normalization
POST /api/upload-data- Upload weather data CSVPOST /api/generate-sample-data- Generate synthetic dataGET /api/data-info- Get dataset information
POST /api/train-models- Start model trainingGET /api/training-status- Check training progressGET /api/model-metrics- Get model performance metrics
POST /api/predict- Make weather predictionsPOST /api/visualize- Generate visualization plots
GET /api/quantum-info- Get quantum computing status
- Mean Absolute Error (MAE)
- Root Mean Square Error (RMSE)
- R² Score
- Cross-validation scores
- Quantum advantage measurements
- Feature selection efficiency
- Quantum vs classical comparison
- Forecast vs Actual comparisons
- Model performance comparisons
- Feature importance charts
- Residual analysis
- Time series forecasting
- Correlation matrices
- Plotly-based interactive charts
- Real-time data updates
- Downloadable visualizations
- Responsive design
Run the test suite:
python -m pytest tests/Test individual components:
# Test data preprocessing
python data/preprocessing.py
# Test ML models
python src/ml_models/models.py
# Test quantum modules
python src/quantum/quantum_ml.py- Implement model class in
src/ml_models/ - Add training logic to
WeatherMLModels - Update API endpoints in
src/api/main.py - Add frontend controls in
src/frontend/
- Implement quantum circuit in
src/quantum/ - Add to
QuantumWeatherPredictor - Update quantum info endpoint
- Document quantum advantage
- Implement loader in
data/preprocessing.py - Add data validation
- Update frontend upload handling
- Test with various data formats
Quantum libraries not found
pip install qiskit qiskit-aer pennylaneTensorFlow/LSTM errors
pip install tensorflow>=2.13.0API server issues
# Check if port 8000 is available
lsof -i :8000
# Or use different port
uvicorn main:app --port 8001Frontend not loading
- Ensure API server is running
- Check browser console for errors
- Verify CORS settings
- Reduce dataset size for testing
- Use CPU-only TensorFlow for development
- Enable quantum simulator fallbacks
- Fork the repository
- Create feature branch:
git checkout -b feature-name - Commit changes:
git commit -m "Add feature" - Push to branch:
git push origin feature-name - Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Qiskit community for quantum computing tools
- FastAPI team for excellent web framework
- Plotly for interactive visualizations
- Weather data providers and research community
For questions or issues:
- Open GitHub issue
- Check documentation
- Review troubleshooting guide
Built with ❤️ using Python, Quantum Computing, and Modern Web Technologies