Classify Disaster Response Messages
Udacity Data Scientist Nanodegree Project
This project analyzes social networking site messages collected after natural disasters. Its major goal is to build up data processing and classification pipeline to facilitate resource allocation process.
-
Install Anaconda if you have not installed it. Otherwise, skip this step.
-
Update Anaconda by typing
conda update -all
in Anaconda Prompt. -
Clone this repository to your local machine using:
$ git clone https://github.com/YueminLi/Disaster_Response_Pipeline.git
-
Delete these two files:
data/DisasterResponse.db
andmodels/classifier.pkl
-
Run the followihng 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/DisasterResponse.db
-
To run ML pipeline that trains classifier and saves:
python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl
-
-
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/
-
app
- template
master.html
: main page of web appgo.html
: classification result page of web app
run.py
: Flask file that runs app
- template
-
data
disaster_categories.csv
: data to process, from Figure Eightdisaster_messages.csv
: data to process, from Figure Eightprocess_data.py
: process text dataDisasterResponse.db
: database to save clean data to
-
models
train_classifier.py
: train machine learning modelsclassifier.pkl
: saved model
-
LICENSE
-
README.md
Yuemin Li
Github: https://github.com/YueminLi
LinkedIn: https://www.linkedin.com/in/yuemin-li-89166333/
Usage is provided under the MIT License. See LICENSE for the full details.