In this project, I will apply data engineering to analyze disaster data from Figure Eight to build a model for an API that classifies disaster messages. The initial dataset contains pre-labeled tweets and messages from real-life disasters. This project aims to build a Natural Language Processing tool that categorizes messages.
It is divided into the following sections:
- Data Processing, ETL Pipeline to extract data from the source, clean data, and save them in a proper database structure.
- Machine Learning Pipeline to train a model that can classify text messages in 36 categories.
- Web Application using Flask to show model results and predictions in real-time.
disaster_response_pipeline
|-- app
|-- templates
|-- go.html
|-- master.html
|-- run.py
|-- data
|-- disaster_message.csv
|-- disaster_categories.csv
|-- DisasterResponse.db
|-- process_data.py
|-- ETL Pipeline Preparation.ipynb
|-- Twitter-sentiment-self-drive-DFE.csv
|-- models
|-- classifier_1.pkl
|-- train_classifier.py
|-- ML Pipeline Preparation.ipynb
|-- README
This project requires Python 3.x and the following Python libraries:
- Machine Learning Libraries: NumPy, SciPy, Pandas, Sciki-Learn
- Natural Language Process Libraries: NLTK
- SQLlite Database Libraries: SQLalchemy
- Web App and Data Visualization: Flask, Plotly
- Clone this repository
git clone git@github.com:imadarsh1001/Disaster_Response_Pipeline_NLP.git
-
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
- To run ETL pipeline that cleans data and stores in database
-
Run the following command in the app's directory to run your web app.
python run.py
-
Go to http://0.0.0.0:3001/
Input - Please, we need tents and food. We are in Kalupur, Thank you!
Many thanks to Figure-8 for making this available to Udacity for training purposes. Special thanks to Udacity for the training. Feel free to utilize the contents of this while citing Udacity or figure-8 accordingly.