This project is a part of the Data Science Nanodegree Program by Udacity.
The aim of this project is to build a machine learning model to analyze disaster data from Figure Eight that classifies disaster messages, and show the result in an interactive webpage.
- app | - template | |- master.html # main page of web app | |- go.html # classification result page of web app |- run.py # Flask file that runs app - data |- disaster_categories.csv # data to process |- disaster_messages.csv # data to process |- process_data.py # script to process data |- DiastersDB.db # database to save clean data to - models |- train_classifier.py # script to train model |- classifier.pkl # saved model - results |- screenshot-1 # distribution of message categories |- screenshot-2 # top 10 distribution of message categories in percentage |- screenshot-3 # distribution of message genres |- screenshot-4 # an example of disaster response webpage - README.md
-
Run the following commands in the project's root directory to set up your database and model.
- To run ETL pipeline that cleans data and stores in database
python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisastersDB.db
- To run ML pipeline that trains classifier and saves
python models/train_classifier.py data/DisastersDB.db models/classifier.pkl
- To run ETL pipeline that cleans data and stores in database
-
Run the following command in the app's directory to run your web app.
python run.py
-
Go to http://0.0.0.0:3001/
Screenshots from the web application.
I would like to thank Udacity and Figure Eight for their support in this project.