MARITIME AND PETROLEUM SENTIMENT ANALYSIS TOOL FOR NIGERIA
# THE MARITIME AND PETROLEUM SENTIMENT ANALYSIS TOOL (MAPSAT)
The tool is built using a django webserver, VADER sentiment analysis tool, celery (python library for automation), scrapy for webscraping news data
## INSTALLING DEPENDENCIES & SETTING UP MAPSAT
If your package manager is pip navigate to the root directory of the django web server (the folder with manage.py) and run:
```bash
pip install -r requirements.txt
```
if your package manage is Conda navigate to the root directory and run:
```bash
conda env create -f environment.yml
```
Then activate the conda environment with:
```bash
conda activate maritimeScrape
```
### Installing RabbitMQ Server
RabbitMQ is not a Python package and therefore cannot be installed via a `requirements.txt` file. It is a standalone server application that needs to be installed separately.
#### On Ubuntu or other Debian-based Linux distributions
```bash
sudo apt-get update
sudo apt-get install -y erlang
sudo apt-get install rabbitmq-server
```
Start the service with
```bash
sudo service rabbitmq-server start
```
#### On MacOS using Homebrew
brew update
brew install rabbitmq
start the service with
```zsh
brew services start rabbitmq
```
#### On Windoows
Download the installer from the official RabbitMQ website and follow the instructions provided.
The service should start immmediately after download
## THE FOUR SECTORS OF THE TOOL
The analysis tool consists of 4 parts
1. **Django**
2. **Celery**
3. **Celery beat**
4. **RabbitMQ**
### Django
The analysis tool uses **Django** for our server along with **Scrapy** for webscraping
### Celery
**Celery** for task automation,
### Celery beat
**Celery beat** for task scheduling,
### RabbitMQ
**RabbitMQ** is used to send the jobs we want to perform from our main program to **Celery** worker processes
## RUNNING THE TOOL
### STARTING THE Django SERVER
Navigate to the root directory and run the following command in your terminal
```bash
python manage.py runserver
` …