A Visual Analytics dashboard for gaining insights into the Social Network: Reddit Hyperlink Network data set.
Made by InfoVis Team 9.
Consisting of:
This project uses Poetry as both a package and environment manager, essentially replacing pip/conda/pipenv and venv/conda.
- Python version
3.8.*
This project can be run in a Docker container, by building the Dockerfile into an image and running the image as a container.
-
Insert data in the dir
src/data/. Make sure it is aparquet.gzipfile. -
Copy
.env.distand name the copy.env. Check if the values are correct. -
Build the image.
# Build an image called 'infovis-reddit' from the Dockerfile in the current directory '.' docker build -t infovis-reddit .
-
Create and start a container from the image.
# Creates and starts a container named infovis-reddit. sh start_container.sh
Not recommended for development as this will make the container crash when the webserver crashes, see below.
For development it is however recommended to not directly start the webserver when you start the container, as an error in your code will crash the running webserver and since it is the main process of the container, it will also crash the entire container.
Rather, we will start the container without the webserver and then manually start the webserver from inside the container.
Instead of step 4 above, we do the following:
-
Start the container without the webserver
sh start_dev_container.sh
-
Run the
bashcommand in the running container in order to start a terminal session.docker exec -it infovis-reddit bash -
You are now inside the container. Start the Flask server manually (using the Poetry env).
poetry run python main.py
-
Check that you meet the prerequisites outlined in the beginning of the readme.
-
Insert data in the dir
src/data/. Make sure it is aparquet.gzipfile. -
Copy
.env.distand name the copy.env. Check if the values are correct. -
Create a Poetry environment and install the packages into this environment
poetry install
-
Run the Flask development server
poetry run python main.py
# Start terminal session in the running container
docker exec -it infovis-reddit bash
poetry add <package-name>poetry add <package-name>