Giter Site home page Giter Site logo

disaster_response_pipeline's Introduction

Disaster Response Pipeline

Building a web app that classifies disaster messages. The datasets used in bulding the Machine Learning Model are provided from Figure Eight.

Libraries

The following libraties should be imported; pandas, numpy, os, matplotlib json, multiple sklearn models, plotly, sys, re, pickle, warnings, sqlalchemy, NLTK, subprocess, termcolor, joblib, and flask

Motivation

The dataset contains real messages that were sent during disaster events. The repository include a web app where an emergency worker can input a new message and get classification results in several categories, and hence, the message will be sent to an appropriate disaster relief agency. The web app displaies a data visualizations of the overall training data.

File Descriptions

  1. data Folder includes 4 files:
  • disaster_messages.csv: Dataset includes all the messages and genres.
  • disaster_categories.csv: Dataset includes all the categories.
  • process_data.py: Code used to transforme and clean the data and then to create a SQLite database.
  • DisasterResponse.db: SQLite database contains the transformed and cleaned data.
  1. models Folder includes 2 files:
  • train_classifier.py: Machine Learning Model to train and export a classifier as a pickle file.
  • classifier.pkl: Final model as a pickle file.
  1. app Folder includes 1 files:
  • run.py: Flask file to run the web app.

Instructions

  1. process_data.py:
  • To process and run the ETL pipeline that transforms and cleans the data and the creates a SQLite database:
python process_data.py disaster_messages.csv disaster_categories.csv DisasterResponse.db
  1. train_classifier.py:
  • To train and run the ML pipeline that train and export a classifier as a pickle file:
python train_classifier.py ../data/DisasterResponse.db classifier.pkl
  1. run.py:
  • To run the web application that allows for adding new messages and then getting classification results in several categories:
python run.py

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Licensing and Acknowledgement

  • The datasets used were provided by Figure Eight.
  • Code templates were provided by Udacity as a part of the Udacity Data Scientist Nanodegree.
  • Plotly provides examples of codes for different types of plots of which some have been adapted, edited, and used as needed.

disaster_response_pipeline's People

Contributors

salitr avatar

Forkers

arvindsri87

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.