{"id":17377458,"url":"https://github.com/artoonie/rcvis","last_synced_at":"2025-04-13T21:40:55.045Z","repository":{"id":35619254,"uuid":"163138304","full_name":"artoonie/rcvis","owner":"artoonie","description":"Easy-to-understand visualizations for Ranked-Choice Voting elections: sankey, bargraphs, and tables. Interactive and print-friendly options available. Supports most common tabulators.","archived":false,"fork":false,"pushed_at":"2025-03-22T20:19:19.000Z","size":15398,"stargazers_count":31,"open_issues_count":16,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-22T21:27:13.260Z","etag":null,"topics":["candidate","d3js","elections","electoral-system-visualization","hci","ranked-choice","rcv","rcv-election","sankey","sankey-diagram","visualization","votes"],"latest_commit_sha":null,"homepage":"https://www.rcvis.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artoonie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-26T05:05:30.000Z","updated_at":"2025-03-22T20:18:32.000Z","dependencies_parsed_at":"2023-12-13T19:11:04.427Z","dependency_job_id":"4b45184c-7686-4232-82b2-34a947fa698e","html_url":"https://github.com/artoonie/rcvis","commit_stats":{"total_commits":818,"total_committers":9,"mean_commits":90.88888888888889,"dds":"0.30195599022004893","last_synced_commit":"4a9c37e8e7a5c2aa2e4a904bfec37422afdeeb8c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artoonie%2Frcvis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artoonie%2Frcvis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artoonie%2Frcvis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artoonie%2Frcvis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artoonie","download_url":"https://codeload.github.com/artoonie/rcvis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246190430,"owners_count":20738022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["candidate","d3js","elections","electoral-system-visualization","hci","ranked-choice","rcv","rcv-election","sankey","sankey-diagram","visualization","votes"],"created_at":"2024-10-16T05:22:10.999Z","updated_at":"2025-03-29T13:31:32.602Z","avatar_url":"https://github.com/artoonie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation Status](https://readthedocs.org/projects/rcvis/badge/?version=latest)](https://rcvis.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/artoonie/rcvis/branch/main/graph/badge.svg)](https://codecov.io/gh/artoonie/rcvis)\n\n# RCVis.com\nThis is the code repository for [rcvis.com](https://www.rcvis.com). Unless you're a programmer, you probably want to be there instead of here!\n\nRCVis has been used by millions of voters in the United States and abroad for Election Night Reporting of Ranked Choice Voting elections.\nIt has hosted thousands of mock election results from RCV-compatible voting tools, including [RankedVote.co](https://RankedVote.co) and [RankedChoices.com](https://RankedChoices.com).\nIt can import data from Opavote, ElectionBuddy, Dominion software, RCTab, and more.\nIt has been published in the [Washington Post](https://www.washingtonpost.com/dc-md-va/2023/06/23/arlington-county-board-democratic-primary-election-results/), on [Ballotpedia](https://ballotpedia.org/June_22,_2021,_election_results), in the [Gothamist](https://gothamist.com/arts-entertainment/big-apple-book-ballot-results-best-nyc-book), featured on [NBC New York](https://www.nbcnewyork.com/news/politics/adams-garcia-wnbc-poll-nyc-mayor/3104963/), [Fox 5 NY](https://www.fox5ny.com/video/940333), and dozens of other news outlets.\n\nWhile you may fork and run this code to run it locally, almost all users find it sufficient to upload data directly to RCVis.com.\n\n# Ranked Choice Voting Visualization\nVisualize the results of ranked-choice voting elections.\n\n**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.\n\n**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](https://www.fairvote.org/rcv#rcvbenefits).\n\n**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.\n\nLearn more on our Medium post: [An Illustrated Guide to Ranked-Choice Voting](https://medium.com/@armin.samii/an-illustrated-guide-to-ranked-choice-voting-4ce3c5fe73f9).\n\n## Examples\nCheck out [rcvis.com](https://www.rcvis.com) for live examples, including:\n\n| Barchart | Round-by-Round |\n| --- | --- |\n| ![Barchart](static/visualizer/icon_interactivebar.gif \"Interactive Barchart\") | ![Round-by-Round](static/visualizer/icon_interactiveroundbyround.gif \"Round-by-Round\") |\n\n| Sankey | Tabular Summary |\n| --- | --- |\n| ![Sankey](static/visualizer/icon_sankey.jpg \"Sankey\") | ![Tabular Summaries](static/visualizer/icon_singletable.png \"Tabular Summaries\") |\n\n## Embedding\nRCVis implements the [oembed protocol](http://www.oembed.com) with discoverability, allowing you to embed files into your website with an iframe.\n\n\n# Running RCVis Locally\n\n## Installation\nInstall `python3`, `virtualenv`, and `npm` with your favorite package manager, then run `./scripts/install.sh`. This script will initialize a `.env` file in the root directory for your secrets and configuration. You will need to supply a secret key in `.env` before proceeding.\n\n\n## Running\n\nYou can begin serving the website at localhost:8000 using:\n```bash\n./scripts/serve.sh\n```\nThe first time you execute this script, you will be prompted to create a new admin user. You can skip this step for future executions by storing the email of the admin user as `OFFLINE_ADMIN` in `.env`.\n\nYou may also need to run this whenever the npm dependencies change:\n```bash\nsource .env\nsource venv/bin/activate\n\nnpm install  # this works for me\npython3 manage.py npminstall  # this is purported to work but doesn't\n```\n\n## Test Data\nTest data, including real and mock elections, can be found in the `testData` directory. Example input formats can be found on [RCVFormats](https://github.com/artoonie/rcvformats/tree/main/testdata/inputs).\n\n## REST API\nThe primary API documentation is in the form of [example python code](visualizer/tests/testRestApiExampleCode.py) or [a curl-based shell script](scripts/api-curl-demo.sh).\nWe recommend you start by looking over the example code.\nAddition documentation is available at [rcvis.com/api/](https://www.rcvis.com/api/).\n\nTo get started with programmatic access to rcvis:\n\n1. Create an account on RCVis\n2. Email team@rcvis.com to request API access\n3. Submit a POST request to [https://www.rcvis.com/api/auth/get-token](https://www.rcvis.com/api/auth/get-token) to obtain an API Key, e.g. `curl -X POST https://www.rcvis.com/api/auth/get-token -d username=yourUserName -d password=yourAmazingPassword`\n\nWith your API key, you may access two endpoints:\n1. [https://www.rcvis.com/api/visualizations/](https://www.rcvis.com/api/visualizations/) requires field `jsonFile` with the body of a valid summary JSON.\n2. [https://www.rcvis.com/api/bp/](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).\n\nFor both endpoints, upload with POST and modify with PUT or PATCH. Authenticated users are limited to 1000 requests per hour.\n\n\n## Movies\n\nTo get moviepy working for Ubuntu 16.04 LTS users, comment out the following statement in `/etc/ImageMagick-6/policy.xml`:\n```xml\n\u003cpolicy domain=\"path\" rights=\"none\" pattern=\"@*\"/\u003e\n```\nor, simply run `sudo ./scripts/fix-moviepy-on-ubuntu-1604.sh`\n\nTo run workers to generate movies (optional - only needed to use the movie generation flow):\n```bash\nsource .env\nsource venv/bin/activate\nexport DISPLAY=\":0\" # if not already set\ncelery -A rcvis worker --loglevel info\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoonie%2Frcvis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartoonie%2Frcvis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoonie%2Frcvis/lists"}