Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the order of cosponsors for the Committees and Cosponsors box #306

Closed
aih opened this issue Apr 13, 2021 · 9 comments
Closed

Set the order of cosponsors for the Committees and Cosponsors box #306

aih opened this issue Apr 13, 2021 · 9 comments
Assignees

Comments

@aih
Copy link
Collaborator

aih commented Apr 13, 2021

This applies only to the ordering of the Cosponsors desired in the Committees and Cosponsors box in the top right.

From Daniel

I've been thinking about how to order the display of cosponsors. Here is what I'm thinking -- and feedback is encouraged:

First group -- original bill sponsors (D/R) -- #1 and #2 sponsors if they are of different parties, otherwise only the 1st sponsor
Second group -- co-sponsors who are the current chair or ranking member of the full committee to which the bill is referred (majority then minority)
Third group -- in the leadership of either party (speaker, democratic leader, majority whip, assistant speaker, democratic caucus chair, republican leader, republican whip, republican conference chair (majority then minority)
Fourth group -- subcommittee chair or ranking member of a committee of jurisdiction (majority then minority)
Fifth group -- serving on a committee of jurisdiction (majority, then minority)
Sixth group -- any other full committee chairs or ranking members (majority, then minority)
Last group -- everyone else

If this is too complicated I can simplify the ordering. When there is a conflict within a party subgroup, go alphabetical.

For the top title card: list the top 5 and then have the button say "More sponsor info" <-- open to better language here, too.

@aih
Copy link
Collaborator Author

aih commented Apr 13, 2021

The Committee information we have for each legislator is of the form:
[{"name": "Lisa Blunt Rochester", "rank": 25, "party": "majority", "bioguide": "B001303", "committee": "HSIF"}]

So we can tell a) which committees, b) majority/minority from this.

From the committee membership data, we can get the rank and title of the cosponsor. We will need to add these two fields when processing updateCommitteeMembers in common.sponsors.py.

https://github.com/unitedstates/congress-legislators/blob/master/committee-membership-current.yaml

SSAF:
- name: Debbie Stabenow
  party: majority
  rank: 1
  title: Chairman
  bioguide: S000770

Edit: we already add this information in common.cosponsors.py, in updateCommitteeMembers. We are supposed to add the information to the 'committees' field for each Cosponsor (note here that Stabenow does not have SSAF in the list; so the algorithm is still not complete):

image

@ayeshamk
Copy link
Collaborator

ayeshamk commented Apr 13, 2021

@aih Is this a priority for this week or a backlog item?

@aih
Copy link
Collaborator Author

aih commented Apr 13, 2021

This is one of two priorities for this week

@ayeshamk ayeshamk modified the milestone: Week of April 13 Apr 14, 2021
@ayeshamk
Copy link
Collaborator

@aih and I had a discussion about this issue. We have decided that I will be prioritizing #305 first. After that, I'd do some research on the seven sorting/grouping logics mentioned above and see whether or not we have all of the attributes required to implement them, and the relationships among those attributes.

@aih
Copy link
Collaborator Author

aih commented Apr 15, 2021

As of e488eb5 cosponsors.py adds the right information to the Cosponsor table, so that the committees field for an individual Cosponsor includes rank, majority/minority and role (e.g. Chairman):

image

@aih
Copy link
Collaborator Author

aih commented Apr 16, 2021

Minority ranking member (criterion 3 above) is the minority member with rank = 1, and has title = 'Ranking Member':

[{"name": "Jim Jordan", "rank": 2, "party": "minority", "bioguide": "J000289", "committee": "HSGO"}, 
{"name": "Jim Jordan", "rank": 1, "party": "minority", "title": "Ranking Member", "bioguide": "J000289", "committee": "HSJU"}]

@aih
Copy link
Collaborator Author

aih commented Apr 16, 2021

Leadership position, if any, is in the Cosponsor table, in the 'leadership' field, e.g.:

[{"start": "2021-01-03", "title": "Speaker of the House", "chamber": "house"}, 
{"end": "2021-01-03", "start": "2019-01-03", "title": "Speaker of the House", "chamber": "house"}, {"end": "2019-01-03", "start": "2017-01-03", "title": "House Minority Leader", "chamber": "house"}, {"end": "2017-01-03", "start": "2015-01-06", "title": "House Minority Leader", "chamber": "house"}, {"end": "2015-01-03", "start": "2013-01-03", "title": "House Minority Leader", "chamber": "house"}, {"end": "2013-01-03", "start": "2011-01-05", "title": "House Minority Leader", "chamber": "house"}]

@ayeshamk
Copy link
Collaborator

Per discussion with Daniel, I will implement the following sorting order for the top-right table. I will pick 5 from the list of co-sponsors. The sorting criteria are:

  1. Original bill sponsors (D/R) -- Sources for 'in Focus' information  #1 and Adam's Sandbox #2 sponsors if they are of different parties, otherwise only the 1st sponsor.

  2. Co-sponsors with rank 1.

  3. Rest of the positions will be filled with any cosponsors from the full list.

@aih
Copy link
Collaborator Author

aih commented Apr 26, 2021

Implemented (#328) and deployed
image

(D/R) -- #1 and #2 sponsors if they are of different parties

I believe that this sorting feature is not yet implemented. I'll open a separate issue for it.

@aih aih closed this as completed Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants