- Overview
- File Description
- Getting Started
- Project Motivation
- Web Application Demo
- Author
- Acknowledgments
The omnipresence of smartphones has enabled people to call for help in the event of a disaster/emergency in real-time. This project monitors such SOS messages, which can then be forwarded to respective relief organizations for a targeted disaster response.
Disaster-Response-Pipeline
├── data
│ ├── disaster_categories.csv # Disaster categories dataset for processing
│ ├── disaster_messages.csv # Sample disaster messages dataset for processing
│ └── process_data.py # Data cleaning processing script
| └── DisasterResponse.db # Final database, generated as a result of process_data.py
├── app
│ ├── run.py # Flask file that runs the web app
│ └── templates
│ ├── go.html # Classification result page of web app
│ └── master.html # Main page of web app
├── models
│ ├── train_classifier.py # ML model processing script
| └── classifier.pkl # Trained ML model, generated as a result of train_classifier.py
├── webapp-demo.PNG
└── README.md
- Python 3.5+
- Machine Learning Libraries: NumPy, SciPy, Pandas, Sciki-Learn
- Natural Language Process Libraries: NLTK
- SQLlite Database Libraqries: SQLalchemy
- Model Loading and Saving Library: Pickle, joblib
- Web App and Data Visualization: Flask, Plotly
Datasets: The set of sample disaster SOS messages can be downloaded from here. Disaster categories are available here.
Run the following commands in the project's root directory.
To run the ETL pipeline that cleans data and stores it in a database:
$ python3 data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db
To run the ML pipeline that trains classifier and saves the model in a pickle file:
$ python3 models/train_classifier.py data/DisasterResponse.db models/classifier.pkl
To run the web app:
$ python3 app/run.py
Go to http://0.0.0.0:3001/ or localhost:3001
For this project, I have tried to build a disaster response web application that can classify SOS messages into different categories like medical supplies, food, or block road. This categorised data can then be used by organizations for providing targeted disaster relief.
The web application successfully classifies the message "Due to heavy rains, there's flood in Mumbai. Help neeeded" into categories such as aid related, and search and rescue.
- Udacity and Figure Eight for providing the relevant dataset to train the model.