Giter Site home page Giter Site logo

disaster_response's Introduction

Disaster Response Pipeline Project

This Machine Learning Pipeline Project is built to categorize emergency messages, based on training data from emergency messages of varied genres. Project is materialized as a Flask Web App

Disaster Response message Diaster Response Result

Table of Contents

  1. Introduction
  2. Requirements
  3. Project Files
  4. Guidance
  5. Licensing

Introduction

As a part of the Data Science Nanodegree from Udacity, this project seeks to display an understanding and utlization of Natural Language Processing within a Machine Learning Pipeline. The context of the dataset is emergency messages (disaster related). The project consists of the data, data wrangling, model buildling and model packaging, and the web app.

Requirements

The Requirements.txt should equip the project for required packages, but general requirements are:

  1. Pandas
  2. Numpy.
  3. NLTK
  4. Scikit-Learn
  5. SQLAlchemy
  6. Plotly
  7. Flask

Project Files

Disaster_Response
│
├── DR_DS1.png
├── DR_DS2.png
├── README.md
├── requirements.txt
├── app/
│   ├── template/
│   │   ├── master.html  # main page
│   │   └── go.html  # classification page
│   │
│   └── run.py  # runs webapp
│
├── data/
│   ├── disaster_categories.csv  # data 
│   ├── disaster_messages.csv  # data 
│   ├── process_data.py # data processing script
│   └── Disaster_Response.db   # Output Database from SQLAlchemy
│
└──models/
    ├── train_classifier.py
    └──classifier.pkl  # Pickle file with saved model

Guidance

This project utilizes Python 3.8
Create Virtual environment
While you may other have methods to create a virtual environment, I found success with this approach:
  1. python3 -m venv dr_env
  2. dr_env\scripts\activate
  3. pip3 install -r requirements.txt
From the project directory, run these commands
The script is designed to be ran dynamically, but you may need to experiment between changing directories
ETL Pipeline: Clean data and save to database

python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/Disaster_Response.db

ML Pipeline:

python models/train_classifier.py data/Disaster_Response.db models/classifier.pkl

initiate and run webapp

python app/run.py

Web App should be located at your local host - http://0.0.0.0:3001/

Licensing

This corporate message data is from one of the free datasets provided on the Figure Eight Platform, licensed under a Creative Commons Attribution 4.0 International License.

Copyright 2020 Erik James Mason

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

disaster_response's People

Contributors

erikjamesmason avatar

Stargazers

 avatar

Watchers

 avatar

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.