-
Notifications
You must be signed in to change notification settings - Fork 3
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
Propagate Cosponsor table to the cosponsor_dict
in the detail.html view
#305
Comments
I will create a dump of the database (about 2Gb) to make the Committee, Cosponsor and other data available, but the info above should be enough to get started on a branch for this issue. |
Is there a readme file with instructions on how to populate Cosponsor and Committee tables? |
There is a note on Cosponsors in https://github.com/aih/FlatGov/tree/main/DATA_BACKGROUND.adoc It doesn't provide details. The cosponsors.py has an updateCosponsorsAndCommittees (check the spelling) function at the bottom. Running that will download the yaml files, process them and update the db tables. |
* issue #305 committe cosponsors * cosponsors table upddated * committes and cosponsors updated * committees and cosponsors, related bills features added * committees cosponsors sorted
There are now Cosponsor and Committee tables in the bills model, and a scraper in common.cosponsor.py that downloads, processes and loads those tables.
Meanwhile, the list of cosponsors of a bill is stored in a list within the bill table,
cosponsors_dict
. For this issue, we:Look up each item in the
cosponsors_dict
,Get the
committees
field for each cosponsor (the cosponsor'sbioguide_id
is unique). The committees field looks like:[{"name": "Raphael G. Warnock", "rank": 7, "party": "majority", "bioguide": "W000790", "committee": "SPAG"}...]
Filter this list by the
committees_dict
list associated with the bill (e.g.[{"activity": ["referral"], "committee": "Senate Judiciary", "committee_id": "SSJU", "subcommittee": "", "subcomittee_id": ""}]
)For each committee that the cosponsor is on that is in the bill's
committees_dict
, add it to acommittees
field for that user in thecosponsor_dict
. That is the information that goes into the 'On Assigned Committee(s)' column of theCommittees and Cosponsors
box in the top right, and theCommittees
column of theSponsors of Related Measures
section.The Cosponsor model looks like:
The text was updated successfully, but these errors were encountered: