All Projects → artoonie → rcvis

artoonie / rcvis

Licence: GPL-3.0 License
Understandable visualizations for Ranked-Choice Voting elections: sankey, bargraphs, tabular formats, and automatically-generated videos with text-to-speech using AWS Polly.

Programming Languages

python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to rcvis

sankeydiagram.net
sankeydiagram.net is an easy-to-use webapp for generating Sankey Diagrams to visualize flows and budgets.
Stars: ✭ 51 (+292.31%)
Mutual labels:  sankey, sankey-diagram
politicos
API com todos os candidatos Brasileiros!
Stars: ✭ 63 (+384.62%)
Mutual labels:  elections, candidate
real-time-data-viz-d3-crossfilter-websocket-tutorial
Tutorial on real-time data visualization. Python websocket server & d3.js + crossfilter.js frontend
Stars: ✭ 32 (+146.15%)
Mutual labels:  d3js
flask-react-d3-celery
A full-stack dockerized web application to visualize Formula 1 race statistics from 2016 to present, with a Python Flask server and a React front-end with d3.js as data visualization tool.
Stars: ✭ 20 (+53.85%)
Mutual labels:  d3js
hiccup-d3
D3-Charts written in Clojure
Stars: ✭ 74 (+469.23%)
Mutual labels:  d3js
word2viz
Visualization of semantic similarities in word embeddings.
Stars: ✭ 86 (+561.54%)
Mutual labels:  d3js
taipei-house-age-map
利用台北市政府開放的建築使用執照資料,製作台北市屋齡地圖
Stars: ✭ 28 (+115.38%)
Mutual labels:  d3js
haskell-code-spot
Visual tool to spot odd runtime behaviour of Haskell programs.
Stars: ✭ 106 (+715.38%)
Mutual labels:  d3js
d3.geometer
[NOT MAINTAINED] A D3js library for drawing polytopes, angles, coordinates, geometries and more.
Stars: ✭ 18 (+38.46%)
Mutual labels:  d3js
upsetjs
😠 UpSet.js - a set visualization library for rendering UpSet Plots (a JavaScript re-implementation of UpSet(R) by Lex et al), Euler Diagrams, Venn Diagrams, and Karnaugh Maps
Stars: ✭ 62 (+376.92%)
Mutual labels:  d3js
align covid
Coronavirus time series aligned by number of cases, not date.
Stars: ✭ 22 (+69.23%)
Mutual labels:  d3js
Legislativas2022
A repository with scripts and data for the Portuguese General Elections of January 2022
Stars: ✭ 15 (+15.38%)
Mutual labels:  elections
2019-UGRP-DPoom
2019 DGIST DPoom project under UGRP : SBC and RGB-D camera based full autonomous driving system for mobile robot with indoor SLAM
Stars: ✭ 35 (+169.23%)
Mutual labels:  hci
github-admin
vue和element-ui搭建一個後台管理系統,使用github提供的api搞事情。輸入您的github賬號名自動幫你生成基本的github信息哦😯
Stars: ✭ 15 (+15.38%)
Mutual labels:  d3js
treemap-chart
A treemap interactive chart web component for visualizing hierarchical data
Stars: ✭ 27 (+107.69%)
Mutual labels:  d3js
d3-kagi
An open source javascript library to render beautiful Kagi charts using D3.js and pure Javascript
Stars: ✭ 26 (+100%)
Mutual labels:  d3js
d3Tree
htmlwidget that binds d3js collapsible trees to R and Shiny to make an interactive search tool
Stars: ✭ 79 (+507.69%)
Mutual labels:  d3js
quickserv
Dangerously user-friendly web server for quick prototyping and hackathons
Stars: ✭ 275 (+2015.38%)
Mutual labels:  hci
leaflet heatmap
简单的可视化湖州通话数据 假设数据量很大,没法用浏览器直接绘制热力图,把绘制热力图这一步骤放到线下计算分析。使用Apache Spark并行计算数据之后,再使用Apache Spark绘制热力图,然后用leafletjs加载OpenStreetMap图层和热力图图层,以达到良好的交互效果。现在使用Apache Spark实现绘制,可能是Apache Spark不擅长这方面的计算或者是我没有设计好算法,并行计算的速度比不上单机计算。Apache Spark绘制热力图和计算代码在这 https://github.com/yuanzhaokang/ParallelizeHeatmap.git .
Stars: ✭ 13 (+0%)
Mutual labels:  d3js
meet-the-fans
Query and Visualize the network graph of your GitHub repositories, followers, stargazers, and forks.
Stars: ✭ 22 (+69.23%)
Mutual labels:  d3js

Documentation Status codecov Language grade: Python Language grade: JavaScript Total alerts

RCVis.com

This is the code repository for rcvis.com. Unless you're a programmer, you probably want to be there instead of here!

RCVis has been used to visualize hundreds of polls and dozens of elections. It has been used as part of the official reporting of tabulation data in cities across Utah, as well as unofficially in New York City, Minnesota, Maine, California, and more. It is connected to both Rankit.Vote and RankedVote.co, the premier online-RCV websites. It can import data from Opavote, ElectionBuddy, Dominion software, the Universal Ranked-Choice Tabulator, and more. It was featured on a Ballotpedia page during the 2020 NYC election cycle, as well as in the Gothamist, NBC New York, Fox 5 NY, JD Forward, among others.

You may fork and run this code locally, though you can probably get what you want by just uploading your data directly to RCVis.

Ranked Choice Voting Visualization

Visualize the results of ranked-choice voting elections.

What is RCV? RCV allows you to have backup options. If your preferred candidate can't win, you still have a say: your vote gets transferred to your next-best pick.

Why RCV? In an RCV election, you can't spoil votes. Third-party candidates don't waste votes. Similar candidates help each other instead of hurting each other. They're less polarized and more fair. Multi-winner RCV elections mitigate the effects of gerrymandering. For more information, check out FairVote's guide to the benefits of RCV elections.

Why the visualizer? In a traditional election, the results are easy to understand: how many votes did each candidate get? In an RCV election, it can be a harder to understand how a candidate won, based on what happens in each round. Our goal is to create a series of visualizations which can work for a variety of audiences on a variety of mediums: print, web, and TV.

Learn more on our Medium post: An Illustrated Guide to Ranked-Choice Voting.

Installation

Install python3 and virtualenv, then

virtualenv venv
source venv/bin/activate
pip3 install -e .
pip3 install -r requirements.txt

Create a .env file with your secrets and configuration options:

export RCVIS_SECRET_KEY=''
export RCVIS_DEBUG=True
export RCVIS_HOST=localhost

# Either have OFFLINE_MODE=True
export OFFLINE_MODE=True

# The following fields are optional, though you will
# have limited functionality without them.

# Or set up an AWS bucket and enter your credentials
# export OFFLINE_MODE=False
# export AWS_STORAGE_BUCKET_NAME=''
# export AWS_S3_REGION_NAME=''
# export AWS_ACCESS_KEY_ID=''
# export AWS_SECRET_ACCESS_KEY=''

# To send registration emails when OFFLINE_MODE is False:
# export SENDGRID_USERNAME=''
# export SENDGRID_PASSWORD=''

# To clear cloudflare cache when models update:
# export CLOUDFLARE_ZONE_ID=''
# export CLOUDFLARE_AUTH_TOKEN=''

# To run the SauceLabs integration tests, you will need
export SAUCE_USERNAME=''
export SAUCE_ACCESS_KEY=''

# To generate videos, you need:
# export SQS_QUEUE_NAME=''
# export IMAGEIO_FFMPEG_EXE='/usr/bin/ffmpeg'
# export MOVIE_FONT_NAME="Roboto"
# export AWS_POLLY_STORAGE_BUCKET_NAME="bucket-name-on-s3"

# To subscribe users to mailchimp upon registration, you need:
# export MAILCHIMP_API_KEY=''
# export MAILCHIMP_LIST_ID=''
# export MAILCHIMP_DC=''

To get moviepy working for Ubuntu 16.04 LTS users, comment out the following statement in /etc/ImageMagick-6/policy.xml:

<policy domain="path" rights="none" pattern="@*"/>

or, simply run sudo ./scripts/fix-moviepy-on-ubuntu-1604.sh

Running

To begin serving the website at localhost:8000:

./scripts/serve.sh

You may also need to run this whenever the npm dependencies change:

source .env
source venv/bin/activate

npm install  # this works for me
python3 manage.py npminstall  # this is purported to work but doesn't

To run workers to generate movies (optional - only needed to use the movie generation flow):

source .env
source venv/bin/activate
export DISPLAY=":0" # if not already set
celery -A rcvis worker --loglevel info

Examples

Check out rcvis.com for live examples, including:

Barchart Round-by-Round
Barchart Round-by-Round
Sankey Tabular Summary
Sankey Tabular Summaries

REST API

The primary API documentation is in the form of example code, which is documented line-by-line. We recommend you start by looking over the example code. Addition documentation is available at rcvis.com/api/.

To get started with programmatic access to rcvis:

  1. Create an account on RCVis
  2. Email [email protected] to enable API access
  3. Submit a GET request to https://www.rcvis.com/api/auth/get-token to obtain an API Key, e.g. http GET https://www.rcvis.com/api/auth/get-token username='username' password="password".

With your API key, you may access two endpoints:

  1. https://www.rcvis.com/api/visualizations/ requires field jsonFile with the body of a valid summary JSON.
  2. https://www.rcvis.com/api/bp/ requires field resultsSummaryFile with the body of a valid summary JSON and allows four optional fields: candidateSidecarFile, dataSourceURL (string), areResultsCertified (boolean), and isPrimary (boolean).

For both endpoints, upload with POST and modify with PUT or PATCH. Authenticated users are limited to 1000 requests per hour.

oembed

RCVis implements the oembed protocol with discoverability, allowing you to embed files into your website with an iframe.

Testing

Cross-browser Testing Platform and Open Source ❤️ provided by Sauce Labs, and CI/CD testing via TravisCI.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].