Skip to content

Project of Data Visualisation Dashboard for the 2016 US elections.

Notifications You must be signed in to change notification settings

benseddikmo/us_election

 
 

Repository files navigation

Goal

Installation

Virtual env

# Create virtual environment and activate it

conda create --name us_election python=3
source activate us_election

# Install requirements
pip install -r requirements.txt

Set up MongoDB

You have to launch a local MongoDB instance or use a distant one, and create a secret.json file in us_election/us_election/ folder with: If you work with a local MongoDB:

{
    "MONGO_HOST": "localhost",
    "MONGO_PORT":"27017",

    "SECRET_KEY":"*** for prod***",
}

Then, to populate your database launch the set_mongo.sh script:

todo

It might take some time.

Then create indexes:


Launch server

python manage.py runserver

The website is then available at: http://127.0.0.1:8000/dashboard

Preview

Interactive Map Map Map

Interactive Donuts Donut Donut

Database monitoring Mongo Mongo

How it works

Databases Management and queries

Todo

  • use asyncio with motor to query MongoDB
  • Add cassandra implementation to the django application

About

Project of Data Visualisation Dashboard for the 2016 US elections.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 85.0%
  • JavaScript 9.4%
  • Python 3.9%
  • CSS 1.7%