Skip to content

Instantly share code, notes, and snippets.

@ndarville
Last active December 22, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndarville/6484947 to your computer and use it in GitHub Desktop.
Save ndarville/6484947 to your computer and use it in GitHub Desktop.
Bill Votes

(This chart is a part of the d3-charts collection available here.)


Example data from Sunlight Foundation's API:

"breakdown": {
  "total": {
    "Yea": 62,
    "Nay": 36,
    "Not Voting": 2,
    "Present": 0
  },
  "party": {
    "R": {
      "Yea": 9,
      "Nay": 36,
      "Not Voting": 0,
      "Present": 0
    },
    "D": {
      "Yea": 52,
      "Not Voting": 1,
      "Nay": 0,
      "Present": 0
    },
    "I": {
      "Not Voting": 1,
      "Yea": 1,
      "Nay": 0,
      "Present": 0
    }
  }
}

Otherwise:

Party,Not Voting,Yea,Nay,Present
D,52,1,0,0
R,9,36,0,0
I,1,1,0,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment