Git Product home page Git Product logo

twitter-disaster-response's Introduction

Disaster-Response

Table of Contents

  1. Introduction
  2. File Descriptions
  3. Installation
  4. Screenshots

Introduction

This Project is in collaboration with Figure Eight. The data contains pre-labelled tweet and messages from real-life disaster. The aim of the project is to build a Natural Language Processing tool that categorise messages.

File Description

The project contains the following parts: 


  1. ETL Pipeline: process_data.py: reads in the data, cleans and stores it in a SQL database. The script merges the messages and categories datasets, splits the categories column into separate, clearly named columns, converts values to binary, and drops duplicates.
  2. Dataset: disaster_categories.csv and disaster_messages.csv
  3. DisasterResponse.db: created database from transformed and cleaned data.
  4. ML Model: train_classifier.py: includes the code necessary to load data, transform it using natural language processing, run a machine learning model using GridSearchCV, RandomForest and train it.
  5. Web App: run.py: Flask app and the user interface used to predict results and display them.

Run in Vs-Code

--> open folder in VS-Code

--> cd app

--> python run.py

--> Go to http://0.0.0.0:3001/

Installation

Dependencies

  • Python 3.5+ (I used Python 3.7)
  • Machine Learning Libraries: NumPy, SciPy, Pandas, Sciki-Learn
  • Natural Language Process Libraries: NLTK
  • SQLlite Database Libraqries: SQLalchemy
  • Web App and Data Visualization: Flask, Plotly

Installing Clone this GIT repository: git clone https://github.com/singh728om/Twitter-Disaster-response

Executing Program:

  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 python models/train_classifier.py data/DisasterResponse.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/


Screenshots

Below are a few screenshots of the web app.

After clicking Classify Message, you can see the categories which the message belongs to highlighted in green

Sample Output

Main Page

twitter-disaster-response's People

Contributors

singh728om avatar

Watchers

James Cloos avatar  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.