project-seldon / intake

Ideas, bug reports, questions and any other type of feedback.
https://projectseldon.org
1 stars 0 forks source link

Explore / Politics / Politicians by gender breakdown by country #40

Closed skipjack closed 10 months ago

skipjack commented 1 year ago

Stemming from one of the quora threads in project-seldon/spec#23, we already have gender populated on our "people" resources for all US politicians (as well as some others) so it should be a relatively light lift to come up with a visualization or two. I think the only thing that would need to be considered more is a change over time visualization as we don't support multi-year views yet. I already updated our search index to make aggregating and filtering on gender easier, though for this we'd probably want to stand up a new block of statistics.

skipjack commented 11 months ago

Ok, so I've started prototyping this in seldon-index/src/load/statistics as a new getCountryPoliticsHistorical function that will be our first set of historical statistics. I've stubbed out this as the data structure for the time being but open to ideas...

{
  "country": "us",
  "type": "country-politics-historical",
  "data": [{
    "year": 1960,
    "legislative_upper": {
      "male": null,
      "female": null
    },
    "legislative_lower": {
      "male": null,
      "female": null
    }
  }]
}

We could pretty easily add other political metrics to this per legislature as well (e.g. for average_age or sexual_orientation, see project-seldon/intake#41).

skipjack commented 11 months ago

Almost done!

Image

And I figured out the cause for the discrepancy in some counts, looks like we do have non-voting representatives in our data but we don't delineate them in any way. This is also likely causing a discrepancy in our seating charts compared to what most people would expect because those reps may not typically be included in what most consider a "normal" seat count. See the highlighted text on this wikipedia page.

As of March 7, 2023, there are 125 women in the U.S. House of Representatives (not including four female non-voting delegates), making women 28.7% of the total.