Giter Site home page Giter Site logo

disaster-message-categorization's Introduction

Disaster Response Classification

Overview

This is a project that uses dataset of tagged disaster response messages to create a model that will then predict tags for messages.

ClassifiyMessages

Getting Started:

The following subsections contain instructions to install the app on a local machine and start the application.

1. Pull The Repository

Use git clone https://github.com/Maple-Lazuli/Disaster-Message-Categorization.git in the terminal to make a copy on the local machine or navigate to the repository directly on github here and download the project as an archive.

2. Create The Virtual Environment

In the root of the project directory, execute one of the following command sequences based on the OS in use:

  1. Linux/macOS:

    a. python3 -m pip install --user virtualenv

    b. python3 -m venv env

  2. Windows:

    a. py -m pip install --user virtualenv

    b. py -m venv env

Install The Requirements

Execute pip install -r requirements.txt in the terminal from the root project directory to have pip install all the dependencies used by this project.

Process The Dataset And Create The Models (this takes a while)

The machine learning models are too large for github and need to be created. Run the following commands based on OS to process the data and create the models. (Linux users can alternatively use the start.sh script)

  1. Linux/macOS:

    a. source venv/bin/activate

    b. python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db

    c. python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl

  2. Windows:

    a. venv/bin/activate.bat

    b. python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db

    c. python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl

Start The App

Navigate to the app directory by entering cd app in the terminal and execute the run.py in that directory by entering python run.py

Navigate In The Browser

After the app starts, it will listen at 0.0.0.0:3001/ and allow for messages to be entered and classified. Just navigate to that link by clicking it or pasting http://0.0.0.0:3001/ in the web browser.

Acknowledgements

The following sources were crucial to the development of this project

  1. Udacity - Udacity's Data Scientist course introduced me to Flask as well as variety of natural language processing and machine learning practices that were used in this project.
  2. Plotly - Plotly was used to render the graphs and data table seen on the overview page.
  3. scikit-learn - scikit-learn was used for the machine learning portions of this project.
  4. SQLAlchemy - SQLAlchemy was used to load the dataset after extraction and transformation.
  5. Natural Language Tool Kit (NTLK) - NLTK was used for the natural language processing portion of this project
  6. Numpy - Numpy was used for numerical computations in the extraction and transformation portion of this project
  7. Pandas - Pandas was used for data analysis in the exploratory, extraction, and transformation portions of this project.

disaster-message-categorization's People

Contributors

maple-lazuli 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.