Skip to content

[InfoVis Team 9] A Visual Analytics dashboard for gaining insights into the Social Network: Reddit Hyperlink Network data set.

Notifications You must be signed in to change notification settings

info-vis/redditvis

Repository files navigation

redditvis

A Visual Analytics dashboard for gaining insights into the Social Network: Reddit Hyperlink Network data set.

Made by InfoVis Team 9.

Consisting of:

image

Running the app

This project uses Poetry as both a package and environment manager, essentially replacing pip/conda/pipenv and venv/conda.

Prerequisites

  • Python version 3.8.*

Docker

This project can be run in a Docker container, by building the Dockerfile into an image and running the image as a container.

  1. Insert data in the dir src/data/. Make sure it is a parquet.gzip file.

  2. Copy .env.dist and name the copy .env. Check if the values are correct.

  3. Build the image.

    # Build an image called 'infovis-reddit' from the Dockerfile in the current directory '.'
    docker build -t infovis-reddit . 
  4. 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.

Developing with containers

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:

  1. Start the container without the webserver

    sh start_dev_container.sh
  2. Run the bash command in the running container in order to start a terminal session.

    docker exec -it infovis-reddit bash
  3. You are now inside the container. Start the Flask server manually (using the Poetry env).

    poetry run python main.py

Without Docker

  1. Check that you meet the prerequisites outlined in the beginning of the readme.

  2. Insert data in the dir src/data/. Make sure it is a parquet.gzip file.

  3. Copy .env.dist and name the copy .env. Check if the values are correct.

  4. Install Poetry

  5. Create a Poetry environment and install the packages into this environment

    poetry install
  6. Run the Flask development server

    poetry run python main.py

Installing packages with Poetry

Docker

# Start terminal session in the running container
docker exec -it infovis-reddit bash

poetry add <package-name>

Non-Docker

poetry add <package-name>

About

[InfoVis Team 9] A Visual Analytics dashboard for gaining insights into the Social Network: Reddit Hyperlink Network data set.

Resources

Stars

Watchers

Forks

Contributors 5