Skip to content

Ak-Nobelwolf/RiskSense-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 RiskSense AI – AI Powered Outdoor Safety Decision Support

Python FastAPI Google Cloud BigQuery Cloud Run Gemini

Should I go outside now, later, or not today?

An AI-powered environmental risk intelligence platform built on Google Cloud.


πŸš€ Live Demo

🌐 Application

https://risksense-ai-789818308989.asia-south1.run.app/


πŸ“– About the Project

Every day, millions of people make outdoor decisions based on incomplete information.

They check:

  • 🌦 Weather apps
  • 🌫 Air Quality apps
  • πŸ”₯ Wildfire alerts
  • 🌍 Earthquake reports
  • πŸ“° Local news

RiskSense AI combines all these sources into one intelligent decision-support platform that answers a single question:

"Is it safe to go outside?"

The platform collects live environmental data, processes it through an explainable risk engine, predicts future conditions using Machine Learning, and presents everything in an interactive dashboard with a unified 0–100 Environmental Risk Score.

The application is fully deployed on Google Cloud Run and is publicly accessible through the live demo.


🎯 Problem Statement

People currently rely on multiple disconnected applications to determine outdoor safety.

RiskSense AI eliminates this fragmentation by combining:

  • Weather
  • Air Quality
  • Wildfires
  • Volcanoes
  • Earthquakes
  • Severe Storms

into a single environmental intelligence platform with actionable recommendations.


🌍 Real-world Impact

RiskSense AI helps:

  • 🚢 Daily commuters
  • πŸƒ Runners & cyclists
  • πŸ‘¨β€πŸ‘©β€πŸ‘§ Parents planning outdoor activities
  • πŸŽͺ Event organizers
  • ✈️ Travelers
  • πŸ‘΄ Elderly & respiratory-sensitive individuals

Instead of checking several apps, users receive one clear recommendation within seconds.


πŸŽ₯ Demo Video

▢️ Watch Demo Video


πŸ“Έ Application Screenshots

Home Page

Home Page


Environmental Risk Score

Risk Score


Weather and Interactive Hazard Map

Weather and Interactive Hazard Map


Air Quality and AI Summary

Air Quality and AI Summary


Forecast and Score Contribution

Forecast and Score Contribution


Weather Conditions

Weather Conditions


✨ Key Features

  • 🌍 Worldwide location search
  • ⚠️ Unified 0–100 Environmental Risk Score
  • πŸ”₯ Multi-hazard monitoring
  • 🌫 Air Quality Dashboard
  • 🌦 Live Weather Monitoring
  • 🌍 Interactive Hazard Map
  • πŸ“ˆ 6-hour & 12-hour Machine Learning Forecast
  • πŸ€– Gemini-powered AI explanations
  • ⚑ Live pipeline progress (Server-Sent Events)
  • ☁️ Google Cloud deployment
  • πŸ“Š Interactive dashboard with charts and maps

πŸ”„ How It Works

  1. User searches for any location.
  2. The application geocodes the location.
  3. Environmental data is collected from NASA EONET, OpenWeatherMap, and USGS.
  4. Data is cleaned, validated, and transformed.
  5. The risk engine calculates a 0–100 environmental risk score.
  6. A Random Forest model predicts the next 6-hour and 12-hour risk.
  7. Gemini generates a natural-language explanation.
  8. Results are displayed on an interactive dashboard.

πŸ“Š Data Sources

Source Data
NASA EONET Wildfires, Volcanoes, Storms, Natural Hazards
OpenWeatherMap Weather Forecast & Air Quality
USGS Earthquake Data
Nominatim (OpenStreetMap) Worldwide Geocoding

πŸ—οΈ Solution Architecture

flowchart TD

A[User Search]
--> B[Nominatim]

B --> C[NASA EONET]
B --> D[OpenWeatherMap]
B --> E[USGS]

C --> F[Data Ingestion]
D --> F
E --> F

F --> G[Cloud Storage]

G --> H[BigQuery]

H --> I[Risk Engine]

I --> J[Random Forest]

J --> K[Gemini]

K --> L[FastAPI Dashboard]

L --> M[Cloud Run]
Loading

βš™οΈ Technology Stack

☁️ Google Cloud

  • Cloud Run
  • BigQuery
  • Cloud Storage
  • Gemini API

πŸ€– Machine Learning

  • Random Forest Regression
  • Scikit-learn

🌐 Backend

  • Python
  • FastAPI
  • Uvicorn

πŸ“Š Frontend

  • Jinja2
  • Tailwind CSS
  • Plotly
  • Leaflet

πŸ”„ End-to-End Decision Pipeline

flowchart LR

A["πŸ‘€ User<br/>Search Location"]

--> B["🌍 Geocoding"]

--> C["🌦️ Weather
🌫️ Air Quality
πŸ”₯ Hazards
🌍 Earthquakes"]

--> D["☁️ Cloud Storage"]

--> E["πŸ“Š BigQuery"]

--> F["🎯 Risk Scoring
0–100"]

--> H["πŸ“ˆ Random Forest
6h & 12h Forecast"]

--> I["πŸ€– Gemini AI
Recommendation"]

--> J["πŸ“Š Interactive Dashboard"]
Loading

πŸ“‚ Project Structure

project-root/
β”‚
β”œβ”€β”€ configs/
β”œβ”€β”€ data/
β”œβ”€β”€ Images/
β”œβ”€β”€ models/
β”œβ”€β”€ sql/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/                  # FastAPI routes & templates
β”‚   β”œβ”€β”€ dashboard/            # Charts & visualization
β”‚   β”œβ”€β”€ explain/              # Gemini AI integration
β”‚   β”œβ”€β”€ features/             # Feature engineering
β”‚   β”œβ”€β”€ ingestion/            # API connectors (EONET, OWM, USGS)
β”‚   β”œβ”€β”€ model/                # ML forecasting
β”‚   β”œβ”€β”€ transform/            # Data transformation
β”‚   β”œβ”€β”€ database.py           # DuckDB layer
β”‚   └── database_bq.py        # BigQuery layer
β”œβ”€β”€ .dockerignore
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gcloudignore
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ start_server.py
└── README.md

🌐 API Endpoints

Endpoint Description
GET / Dashboard
GET /map Interactive Hazard Map
GET /forecast Risk Forecast
GET /explanation AI Recommendation
GET /benchmark Performance Comparison
GET /api/current Current Risk Score
GET /api/forecast Forecast JSON
POST /api/refresh Refresh Environmental Pipeline
GET /api/refresh/stream Live Pipeline Progress

☁️ Cloud Deployment

RiskSense AI is fully deployed on Google Cloud Run.

Google Cloud services used:

  • βœ… Cloud Run
  • βœ… BigQuery
  • βœ… Cloud Storage
  • βœ… Gemini API

The application automatically provisions datasets, stores processed environmental data in BigQuery and Cloud Storage, and scales serverlessly based on user demand.


πŸš€ Scalability & Acceleration

RiskSense AI is deployed on Google Cloud Run (serverless containers without GPU access). For this reason, BigQuery handles large-scale data processing natively β€” parallelizing queries across thousands of slots without hardware dependencies.

The codebase includes optional NVIDIA RAPIDS cuDF integration for GPU-accelerated feature engineering when running in GPU-equipped environments (e.g., local workstations or GKE with GPU nodes), but in the production Cloud Run deployment, BigQuery serves as the scalable compute layer.


🎯 Why RiskSense AI?

βœ… Real-world problem

βœ… Decision-support application

βœ… Multi-source environmental analytics

βœ… Machine Learning forecasting

βœ… Explainable AI recommendations

βœ… Google Cloud native deployment


πŸš€ Future Enhancements

  • Mobile application
  • Personalized alerts
  • Historical trend analytics
  • Vertex AI integration
  • IoT sensor support
  • Real-time streaming updates
  • User authentication
  • Multi-language AI recommendations

πŸ“„ License

This project was developed as part of the Gen AI Academy APAC Edition Prototype Submission and is intended for educational, research, and demonstration purposes.

About

AI-powered environmental risk intelligence platform that combines weather, air quality, and natural hazards into a unified outdoor safety risk score.

Resources

Stars

Watchers

Forks

Contributors

Languages