-
Data Processing Assessing and cleaning the data, so that it can be utilized by machine learning algorithms.
-
Model training Data was passed through a pipeline and a prediction model is made.
-
Prediction and Visualization: a webapp where user input emergency messages and see visualization of distribution of genres and categories.
-
Make sure your environment is setup correctly (I use Python 3.6 with conda full setup).
-
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, go to data folder and run:
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, go to models folder and run:
python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl
- To run ETL pipeline that cleans data and stores in database, go to data folder and run:
-
Run the following command in the app's directory to run your web app.
cd app
python run.py
-
Go to http://0.0.0.0:3001/
NOTE: I use Python 3.6. All versions of packages should be in the requirements.txt file. FYI macOS
I exported the requirements.txt
file. You can just do pip install -r requirements.txt
to install required packages for your environment.
For Anaconda users:
- Create Environment:
-
Run this line in Terminal to install all ~290 packages from Anaconda
conda create -n env_full anaconda python=3.6
-
Otherwise, run this to create an enviroment and install only the necessary on for this project.
conda create -n env --file requirements.txt
-
- Activate Environment
conda activate env_full
- When not used, deactivate Environment
conda deactivate
- To check all packages installed
conda list -n env_full