Skip to content

dhuy237/disaster-response-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disaster Response Pipeline Project

This repository is the work for my second project from the Udacity Data Scientist Nanodegree Program. In this project, I applied data engineering skills to build an ETL pipeline to process the raw data then the data will go through an ML pipeline to classify data.

The classification model will help the people from disaster organizations classify the message into related categories so they can respond to the event more accurately and faster.

🚀 Table of contents

  1. Prerequisites
  2. Project Motivation
  3. Instructions
  4. Acknowledgements

Prerequisites

These are libraries that is used in this project:

  • pandas
  • numpy
  • sklearn

Project Structure

.
├── README.md
├── app
│   ├── run.py # Flask file that runs app
│   └── template
│       ├── go.html # Classification result page of web app
│       └── master.html # Main page of web app
├── data
│   ├── DisasterResponse.db # Database to save clean data
│   ├── disaster_categories.csv # Input data to process
│   ├── disaster_messages.csv # Input data to process
│   └── process_data.py # ETL pipeline
├── models
│   └── train_classifier.py # ML pipeline
│    └── classifier.pkl # Saved model. Please run the ML pipeline to create this file.
└── notebook # notebook used for preparing the code
    ├── ETL Pipeline Preparation.ipynb
    └── ML Pipeline Preparation.ipynb

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/DisasterResponse.db
    • To run ML pipeline that trains classifier and saves the model as pickle file

      python models/train_classifier.py \
          data/DisasterResponse.db \
          models/classifier.pkl
  2. Go to app directory: cd app

  3. Run your web app: python run.py

  4. Go to http://0.0.0.0:3000/ to access the website.

Acknowledgements

This project use disaster data from Appen (formally Figure 8).

The code is inspired by Udacity Data Scientist Nanodegree Program.

🔨 Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/Feature).
  3. Commit your Changes (git commit -m 'Add some feature').
  4. Push to the Branch (git push origin feature/Feature).
  5. Open a Pull Request.

📫 Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published