/Disaster-Response-Pipelines

This project is a part of the Data Scientist Nanodegree by Udacity

Primary LanguagePython

Disaster Response Pipeline Project

This project is a part of the Data Science Nanodegree Program by Udacity.

Table of Contents

  1. Introduction
  2. File Descriptions
  3. Instructions
  4. Results
  5. Acknowledgements

1. Introduction

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.

2. File Descriptions

- 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

3. Instructions

  1. 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
  2. Run the following command in the app's directory to run your web app. python run.py

  3. Go to http://0.0.0.0:3001/

4. Results

Screenshots from the web application. screenshot-1 screenshot-2 screenshot-3 screenshot-4

5. Acknowledgmements

I would like to thank Udacity and Figure Eight for their support in this project.