PerryXDeng / RankedChoiceVotingScript

Using Google Sheets API to compute the winner of particular Form Response

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RankedChoiceVotingScript

Using Google Sheets API to compute the winner of a Ranked Choice Voting Election, then makes a Sankey Chart to show the calculations.

Setup

Change the two variables at the top of the script (SpreadSheetID and OAuthClientSecretJSON) these are crucial for the script to get the correct spreadsheet and permissions respectively. Also the INSERT_PLOTLY_USERNAME and INSERT_PLOTLY_API_KEY values are generated from https://plot.ly/settings/api.

OAuthClientSecretJSON

This is generated for you by google :) just log in at https://console.developers.google.com/apis/credentials and set up a project with permissions and download the json file.

Output

The script will output a url for where the graph is located. A Sample output can be seen below. ranked_voting_photo

About

Using Google Sheets API to compute the winner of particular Form Response


Languages

Language:Python 100.0%