A comprehensive backend service for climate data processing, analysis, and prediction. This system integrates data from multiple sources including automated weather stations (AWS), weather stations, and crowdsourced information to provide accurate climate insights.
-
AWS Station Management
- Track rainfall data from automated weather stations
- Store and manage station information
- Provide daily and hourly rainfall predictions
- Monitor train station warnings based on rainfall data
-
Weather Station Monitoring
- Track water levels at various weather stations
- Store historical water level data
- Visual monitoring through station images
-
Crowdsource Data Collection
- Collect user-reported flood levels
- Gather location-based feedback
- Community-driven flood monitoring
-
Database Middleware
- Centralized data access layer
- Data validation and processing
- Cross-source data integration
-
Data Dashboard
- Unified data visualization interface
- Server-side filtering and processing
- Multi-source data integration
- Data export capabilities
ClimateBackend/
├── awsstations/ # AWS station data management
├── weatherstations/ # Weather station monitoring
├── crowdsource/ # Crowdsourced data collection
├── dbmiddlelayer/ # Database abstraction layer
├── dashboard/ # Data visualization interface
├── docs/ # Project documentation
└── server/ # Core Django settings
- Framework: Django 5.1.3
- Database: PostgreSQL
- Task Queue: Celery 5.4.0
- Machine Learning: TensorFlow 2.18.0
- API: Django REST Framework 3.15.2
- Clone the repository:
git clone https://github.com/yourusername/ClimateBackend.git
cd ClimateBackend
- Create and activate a virtual environment:
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Run migrations:
python manage.py migrate
- Start the development server:
python manage.py runserver
GET /aws/stations/
- List all AWS stationsGET /aws/stations/<id>/
- Get specific station detailsGET /aws/predictions/
- Get rainfall predictions
GET /weather/stations/
- List all weather stationsGET /weather/waterlevels/
- Get current water levels
POST /cs/report/
- Submit a flood reportGET /cs/reports/
- Get all flood reports
GET /db/health/
- Check system health- Various internal endpoints for data integration
Required environment variables:
# Django settings
DJANGO_SECRET_KEY=your-secret-key
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
# Database settings
DB_NAME=your-db-name
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_HOST=localhost
DB_PORT=5432
# Static files
STATIC_URL=/static/
MEDIA_URL=/media/
Detailed documentation is available in the docs/
directory:
- AWS Stations Documentation
- Weather Stations Documentation
- Crowdsource Documentation
- Dashboard Documentation
- Architecture Overview
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository or contact the maintainers directly.