title | author | date | output | ||
---|---|---|---|---|---|
README |
Chukwubuikem Ume-Ugwa |
December 16, 2019 |
|
discussion-mapper
┣ 🗂api
┃ ┣ 🗂migrations
┃ ┃ ┗ 📄__ init__.py
┃ ┣ 📄__ init__.py
┃ ┣ 📄admin.py
┃ ┣ 📄apps.py
┃ ┣ 📄mapper.py
┃ ┣ 📄models.py
┃ ┣ 📄test.py
┃ ┣ 📄urls.py
┃ ┗ 📄views.py
┣ 🗂libs
┃ ┣ 📄__ init__.py
┃ ┣ 📄analyzers.py
┃ ┣ 📄base_crawler.py
┃ ┣ 📄database_api.py
┃ ┣ 📄db_loaders.py
┃ ┣ 📄graph_writers.py
┃ ┣ 📄json_models.py
┃ ┣ 📄mapper.py
┃ ┣ 📄models.py
┃ ┣ 📄mp_test.py
┃ ┣ 📄reddit_crawler.py
┃ ┣ 📄redditor_attributes.py
┃ ┗ 📄textsim.py
┣ 🗂main
┃ ┣ 🗂migrations
┃ ┃ ┗ 📄__ init__.py
┃ ┣ 🗂static
┃ ┃ ┗ 🗂main
┃ ┃ ┃ ┣ 🗂css
┃ ┃ ┃ ┃ ┗ 📄style.css
┃ ┃ ┃ ┗ 🗂js
┃ ┃ ┃ ┃ ┣ 📄event_handlers.js
┃ ┃ ┃ ┃ ┣ 📄jquery-3.3.1.min.js
┃ ┃ ┃ ┃ ┣ 📄loaders.js
┃ ┃ ┃ ┃ ┣ 📄main.js
┃ ┃ ┃ ┃ ┣ 📄mapper_module.js
┃ ┃ ┃ ┃ ┣ 📄render_main.js
┃ ┃ ┃ ┃ ┗ 📄render_mapper.js
┃ ┣ 🗂templates
┃ ┃ ┗ 🗂main
┃ ┃ ┃ ┣ 📄header.html
┃ ┃ ┃ ┗ 📄viz.html
┃ ┣ 📄__ init__.py
┃ ┣ 📄admin.py
┃ ┣ 📄apps.py
┃ ┣ 📄models.py
┃ ┣ 📄tests.py
┃ ┣ 📄urls.py
┃ ┗ 📄views.py
┣ 🗂mapper
┃ ┣ 📄__ init__.py
┃ ┣ 📄settings.py
┃ ┣ 📄urls.py
┃ ┗ 📄wsgi.py
┣ 🗂misc
┃ ┣ 🗂graphML
┃ ┣ 🗂images
┃ ┗ 🗂raw
┣ 🗂pictures
┣ 📄.gitignore
┣ 📄Dockerfile
┣ 📄docker-compose.yml
┣ 📄README.md
┣ 📄_config.yml
┣ 📄db.sqlite3
┣ 📄main.py
┣ 📄manage.py
┣ 📄requirements.txt
┗ 📄test.py
The mapper folder is where the Django project settings files live. There is one application in the project, api. api is the backend support that implements mapper logic and provides endpoints to interact with mapper. The frontend to interact with mapper is mapper_ui. libs package contains the system modules.
- clone this repo
- cd into the repo folder
- run pip3 install -r requirements.txt
- you're set for development! cheers!
Prerequisite
- download and install docker
- clone this repository
- open a new terminal
- cd into discussion-mapper/
- run docker build -t [username]/[repository]:[tag] .
For the backend to communicate with the neo4j database you need to use docker-compose to start the whole system. See the docker-compose.yml file
. You can modified the file to use the image you built.
- make sure you're in repository folder
- run docker-compose up
- browse to http://localhost:7474
- when prompted enter neo4j for password
- change password to neo4j2
- cd into discussion-mapper/libs/
- make sure that credential.json is in discussion-mapper/libs dir and contains your login for Reddit
sample: credential.json file content
{
"client_secret":"client secret",
"client_id":"client id",
"username": "username",
"password": "password"
}
- set the following environment variables: NEO4J_URL=0.0.0.0:7474, NEO4J_USERNAME=neo4j,NEO4J_PASSWORD=neo4j2
- navigate back to repository folder
- run
python3 main.py
to start uploading data from reddit to neo4j - browse to http://localhost:3000
- interact with the application