Skip to content

Harshad071/Real-Time-Disaster-Information-Aggregation-System.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Real-Time Disaster Information Aggregation System

🚨 Overview

The Real-Time Disaster Information Aggregation System is a web-based platform that collects, classifies, and displays live disaster-related data from various sources such as news portals, social media, and official data feeds. It is designed to assist emergency response teams in making quicker, more informed decisions during crisis situations.


📌 Problem Statement

During natural or man-made disasters, timely access to accurate and centralized information is vital for minimizing damage and saving lives. However, disaster data is scattered across multiple platforms. This system addresses that gap by automatically aggregating and categorizing disaster data into a unified dashboard with automated alerting mechanisms.


🎯 Key Objectives

  • ✅ Data Collection – Gather data from news APIs, mock data, and open sources.
  • ✅ Categorization & Processing – Use keyword matching and NER (Named Entity Recognition) to classify disaster events.
  • ✅ User Dashboard – Display events on an interactive dashboard with maps, stats, and timelines.
  • ✅ Automated Alerts – Highlight critical updates and offer real-time notifications (in progress).

🖼️ Features

  • 🔍 Intelligent data extraction and classification
  • 🌐 Interactive map using Leaflet.js
  • 📊 Real-time statistics and analytics dashboard
  • 🔒 User authentication (login/register)
  • ⚠️ Mock data generation for testing (switchable)
  • 📁 MySQL integration for persistent storage

🧰 Tech Stack

Layer Technology
Frontend HTML, CSS, JavaScript, Leaflet.js
Backend Python, Flask
Database MySQL
NLP spaCy (optional)
APIs Used NewsAPI, WeatherAPI (optional)

🗂️ Project Structure

.
├── app.py                  # Flask backend logic
├── dashboard.html          # Main UI for disaster tracking
├── login.html              # User login form
├── register.html           # User registration form
├── requirements.txt        # Python dependencies
└── README.md               # Project documentation

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/your-username/disaster-info-aggregator.git
cd disaster-info-aggregator

2. Create & Activate Virtual Environment

python -m venv venv
source venv/bin/activate    # On Windows use: venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

Optional (if using NLP for location extraction):

pip install spacy
python -m spacy download en_core_web_sm

4. Setup MySQL Database

CREATE DATABASE disasters_db;

-- Example table creation
CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(100) NOT NULL,
    email VARCHAR(100) NOT NULL UNIQUE,
    password VARCHAR(100) NOT NULL
);

Update your MySQL credentials in app.py if needed:

DB_CONFIG = {
    'host': 'localhost',
    'user': 'root',
    'password': 'root',
    'database': 'disasters_db'
}

🔑 API Keys

  1. NewsAPI: https://newsapi.org/
  2. WeatherAPI (optional): https://www.weatherapi.com/

Set your keys inside app.py:

NEWS_API_KEY = "your-newsapi-key"
WEATHER_API_KEY = "your-weatherapi-key"

🏃‍♂️ Running the App

python app.py

Then open your browser and go to:

http://localhost:5000

🧪 Testing the System

The system supports a USE_MOCK_DATA = True flag for testing without API limits. When enabled, the app will simulate disaster events like earthquakes and floods.


🖥️ Dashboard Preview

Main Dashboard

  • Displays map with disaster markers
  • Real-time event feed
  • Severity badges (High/Medium/Low)
  • Timeline controls and filters

Login & Registration

  • User-auth system with secure session-based login

🧠 How It Works

🔄 Data Pipeline

  1. Collect Data using APIs and keyword searches.

  2. Process and Filter relevant information using:

    • Keyword matching (DISASTER_TYPES)
    • NLP Named Entity Recognition (spaCy)
  3. Store filtered events in a MySQL database.

  4. Visualize using Leaflet.js and dynamic HTML templates.


🛠️ Customization

You can modify disaster types, keywords, and search queries in app.py:

DISASTER_TYPES = {
    'earthquake': ['quake', 'richter', 'tremor'],
    'flood': ['flooding', 'overflow', 'deluge'],
    ...
}

Add new queries to SEARCH_QUERIES for expanding data coverage.


📈 Future Improvements

  • Integrate Twitter/X and Reddit APIs
  • Enable SMS/email alerts
  • Add AI-powered severity scoring
  • Mobile-responsive PWA version
  • Admin panel for moderation and event curation

🤝 Contribution

  1. Fork the repository
  2. Create your feature branch:
git checkout -b feature/YourFeature
  1. Commit your changes:
git commit -m "Add YourFeature"
  1. Push to the branch:
git push origin feature/YourFeature
  1. Open a Pull Request

🧾 License

This project is licensed under the MIT License.


🙌 Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published