Open TTrapper opened 1 day ago
I don't think there is a direct way to map a vote to a text version. There's no text version in the XML vote data from the House or Senate. Often the text of what is being voted on hasn't been published yet, in some cases that's because the vote outcome is what causes the new text to be published. And there's no vote ID in the govinfo text MODS metadata. While it would be helpful, there are a lot of votes that don't have IDs (anything that isn't a roll call vote).
The govinfo bill text MODS metadata has a "Last Action Date Listed" field (which I guess is the originInfo/dateIssued element) which might correspond to the date of a congressional action, but I recall that I haven't found it reliable. I think one reason is that fast-moving bills can have multiple significant actions on the same date.
For GovTrack, I have a map from bill text versions to bill status codes that are emitted by this project. The bill status codes are determined by parsing the govinfo BILLSTATUS XML data's action list. That usually works well. https://github.com/govtrack/govtrack.us-web/blob/main/bill/billtext.py
Once I've downloaded votes and bill texts, is there a way to map them? I'm currently doing this manually by extracting the billI_id from the vote data, then searching through the downloaded bills. It works but I'm still not sure if/how I can map a vote to a particular text_version (eg ih, pcs, eh, etc). Thanks!