AI-driven real-time climate risk analysis platform for detecting flood and heatwave threats using live weather intelligence.
🌐 https://climate-shield.onrender.com
Climate Shield is a lightweight climate intelligence platform that combines:
- 🌦 Real-time weather monitoring
- ⚠ Flood and heatwave risk analysis
- 🤖 AI-powered climate awareness chatbot
- 📊 Modern analytics dashboard
- 🌍 Location-based weather insights
Users can enter:
- City
- State
- Country
and instantly receive:
- Live weather data
- Flood risk score
- Heatwave risk score
- Climate alerts
- Safety guidance
Climate Shield fetches live weather data using the OpenWeatherMap API and displays:
- Temperature
- Humidity
- Rainfall
- Wind Speed
The backend computes:
Based on:
- Rainfall
- Humidity
- Wind speed
Based on:
- Temperature
- Humidity
The platform automatically generates alerts such as:
- ⚠ Flood Risk Detected
- ☀ Heatwave Risk Detected
- ✅ No major climate risks detected
Climate Shield includes an integrated AI chatbot that provides:
- Flood awareness
- Heatwave precautions
- Cyclone safety guidance
- Climate change information
- Disaster preparedness suggestions
The chatbot is lightweight and rule-based.
Built using:
- HTML5
- CSS3
- Vanilla JavaScript
Frontend features:
- Glassmorphism UI
- Responsive design
- Animated result cards
- Interactive chatbot widget
- Live climate analysis
Powered by:
- Python
- Flask
- Flask-CORS
Backend responsibilities:
- Weather API communication
- Risk calculations
- Climate alert generation
- Chatbot API responses
- Frontend serving
| Technology | Purpose |
|---|---|
| Python | Backend logic |
| Flask | API server |
| Flask-CORS | Cross-origin support |
| HTML/CSS/JS | Frontend |
| OpenWeatherMap API | Live weather data |
| Render | Deployment |
Climate-Shield/
├── AI-chatbot/
│ └── chatbot.py
│
├── backend/
│ └── alertsystem.py
│
├── Frontend/
│ ├── index.html
│ ├── chatbot.js
│ ├── script.js
│ ├── style.css
│ │
│ └── Analysis/
│ ├── analysis.html
│ ├── analysis.css
│ └── analysis.js
│
├── CONTRIBUTING.md
├── LICENSE
├── README.md
└── requirements.txtMake sure you have the following installed before setup:
- Python 3.10 or later
- pip
- Git
- A free OpenWeatherMap API key
git clone https://github.com/thetechguardians/Climate-Shield.git
cd Climate-Shieldpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activateInstall all backend dependencies from requirements.txt:
python -m pip install --upgrade pip
pip install -r requirements.txtThis installs Flask, Flask-CORS, Requests, python-dotenv, and Gunicorn.
Create a .env file in the root directory:
OPENWEATHER_API_KEY=your_api_key_hereGet your free API key from the OpenWeatherMap API.
python backend/alertsystem.pyBackend runs on:
http://127.0.0.1:5000
The Flask backend also serves the frontend, so you can open http://127.0.0.1:5000 in your browser after the server starts.
Recommended local URL:
http://127.0.0.1:5000
You can also open the static frontend directly:
Frontend/index.html
or serve it locally:
cd Frontend
python -m http.server 8000{
"city": "Guwahati",
"state": "Assam",
"country": "India"
}{
"success": true,
"weather": {
"temperature": 29,
"humidity": 83,
"rainfall": 5,
"wind_speed": 12
},
"risks": {
"flood_risk": 0.62,
"heat_risk": 0.41
},
"alerts": ["⚠ Flood Risk Detected"]
}{
"message": "What precautions should I take during floods?"
}{
"success": true,
"response": "You should avoid low-lying areas during floods."
}Deploy this project as a Render Web Service.
| Setting | Value |
|---|---|
| Runtime | Python 3 |
| Build Command | pip install -r requirements.txt |
| Start Command | gunicorn backend.alertsystem:app |
gunicorn is required for the Render start command and is already listed in requirements.txt. Make sure Render installs dependencies from requirements.txt during the build step.
Add the following environment variable in the Render dashboard:
| Variable | Description |
|---|---|
| OPENWEATHER_API_KEY | OpenWeatherMap API Key |
| Variable | Description |
|---|---|
| OPENWEATHER_API_KEY | OpenWeatherMap API Key |
- 🌧 Rain prediction forecasting
- 📍 Interactive GIS climate maps
- 📲 SMS / Email emergency alerts
- 🛰 Satellite weather integration
- 🧠 Machine learning risk prediction
- 🌎 Multi-language support
Contributions are welcome.
Please read:
CONTRIBUTING.md
before submitting pull requests.
This project is licensed under the MIT License.
Developed by Team Climate Shield.
- 💬 Discussions: GitHub Discussions
- 🐛 Bug Reports: Open an Issue
- 📧 Discord: Join Discord Server
- 📱 Instagram: @vikrant.__07
- 💼 LinkedIn: Vikrant Kumar Mehta
- 🐙 GitHub: @Vikrant0207
Climate Shield aims to make climate risk awareness:
- Fast
- Accessible
- Intelligent
- Easy to understand
for communities, students, researchers, and emergency responders.
If this project helped you, please consider:
- ⭐ Starring this repository
- 🍴 Forking it to contribute
- 📢 Sharing it with others
- 💖 Following for more amazing projects
- 🛠 Contribute improvements