No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
repRank.js

README.md

repRank.js

repRank.js is a script written for google sheets that pulls in data from govtrack on how representatives voted on selected bills in order to produce a ranking of representatives. It was written in order to generate a ranking of how Congress members voted on bills impacting financial industry regulations but it can be used to produce a ranking along other lines of interest - e.g. environmental regulations, labor standards, trade, etc.

Installation

Create a spreadsheet in google docs, and copy and paste the script into the script editor.

Usage

In order to produce a ranking one needs to first select a coherent set of bills and create a google sheet that is formatted like such:

year roll weight grade
2015 37 3 bad
2016 510 1 bad
2016 20 2 bad
2016 12 1 bad
2016 482 2 bad
2016 28 3 bad
  • year is the year (or session) in which the bill was voted on.
  • roll is the roll number of the bill vote.
  • weight is a measure of how important or impactifull the bill is.
  • grade is whether it is regarded as a good or bad bill.

In order to produce the ranking you have to run the series of functions in the script editor in steps. That is, you have to first run the function printBillVotes_step1 and wait for it complete before running the next function with step2 in its name. There are 8 steps. This might seem convoluted but the script had to be broken up in order to avoid running up against the timeout limit imposed by Google. That is, app scripts can only run for a fixed amount of time and depending on how many bills are being ranked it is easy to exceed the maximum execution time limit.

Limitations

The script will only work for "current" members of Congress, or for bills voted on during the 114th Congress. It has to be modified if someone wants to rank members based upon votes that span multiple Congresses.