congress-api-docs icon indicating copy to clipboard operation
congress-api-docs copied to clipboard

Get state party membership counts: Vacant or total seats

Open pll33 opened this issue 7 years ago • 2 comments

Would it be possible to add a count for vacant or total seats in states?

I noticed while going through counting total party membership for both chambers, Montana is not at all listed in the results within House counts since their only representative Rep. Zinke had left his seat to become the Interior Secretary.

There are 5 total vacant seats in the House but it's not immediately obvious which state's seats are vacant without already knowing the total number of seats in a given state. There aren't any vacancies in the Senate at the moment but it's a little easier to calculate since each state has only 2 senators.

pll33 avatar Mar 24 '17 21:03 pll33

@pll33 Thanks for the suggestion. Is there an existing response you see this as fitting into, or would this be a separate response in your mind?

dwillis avatar Mar 24 '17 23:03 dwillis

@dwillis Either-or could do, depending on how Get State Party Counts is currently set up.

If that request calculates counts based on the current membership list, it might make more sense to have a separate response called something like 'Get Total State Counts', however it might save additional API calls if it were combined into a single response.

Though if it were combined, I think the current response would have to change a bit for readability from

"CA": [
  {
    "DEM": "39"
  },
  {
    "REP": "14"
  }
]

to maybe something like this (with counts represented as either strings or integers)

"CA": {
  "parties": {
    "DEM": "39", 
    "REP": "14"
  },
  "total": "53"
}

but that would break users' implementations for parsing the current response.

pll33 avatar Mar 25 '17 00:03 pll33