Open jlopp opened 3 months ago
This can be achieved using python:
Using playwright and requests:
list()
object.dict()
object.requests
module to save each report using a meaningful nomenclature.Use OCR to extract the scanned text data.
Store the results. (This is going to depend on the level of true automation desired, for fun, I will go all-out)
Template the desired operation and script the output.
Bring it all together, either on a schedule, or by personal execution we will trigger the following events:
I hope this helps, as it's a merely a method and not a finished solution, I furnish this outside of the scope of the bounty.
-- Delve,
https://github.com/langchain-ai/langchain https://github.com/faustomorales/keras-ocr https://github.com/huggingface/transformers https://github.com/chroma-core/chroma https://github.com/microsoft/playwright
The above procedure may in fact now be completely invalid after seeing the OpenAI spring update...
Here's step 1 using Congress.gov API, and partial of step 5 (output table as markdown) for folks that want to keep going (no payment expected):
import requests
from tabulate import tabulate
state_to_abbreviation = {
'Alabama': 'AL',
'Alaska': 'AK',
'Arizona': 'AZ',
'Arkansas': 'AR',
'California': 'CA',
'Colorado': 'CO',
'Connecticut': 'CT',
'Delaware': 'DE',
'Florida': 'FL',
'Georgia': 'GA',
'Hawaii': 'HI',
'Idaho': 'ID',
'Illinois': 'IL',
'Indiana': 'IN',
'Iowa': 'IA',
'Kansas': 'KS',
'Kentucky': 'KY',
'Louisiana': 'LA',
'Maine': 'ME',
'Maryland': 'MD',
'Massachusetts': 'MA',
'Michigan': 'MI',
'Minnesota': 'MN',
'Mississippi': 'MS',
'Missouri': 'MO',
'Montana': 'MT',
'Nebraska': 'NE',
'Nevada': 'NV',
'New Hampshire': 'NH',
'New Jersey': 'NJ',
'New Mexico': 'NM',
'New York': 'NY',
'North Carolina': 'NC',
'North Dakota': 'ND',
'Ohio': 'OH',
'Oklahoma': 'OK',
'Oregon': 'OR',
'Pennsylvania': 'PA',
'Rhode Island': 'RI',
'South Carolina': 'SC',
'South Dakota': 'SD',
'Tennessee': 'TN',
'Texas': 'TX',
'Utah': 'UT',
'Vermont': 'VT',
'Virginia': 'VA',
'Washington': 'WA',
'West Virginia': 'WV',
'Wisconsin': 'WI',
'Wyoming': 'WY'
}
def get_members(api_key, congress=118, limit=250):
base_url = f"https://api.congress.gov/v3/member/congress/{congress}"
members = []
# limit is number of items to return
# default to 20
# max is 250, and produces a great speedup when there are many pages
params = {'api_key': api_key, 'limit': limit}
url = base_url
while url:
response = requests.get(url, params=params)
if response.status_code != 200:
print(f"Error: Received status code {response.status_code}")
break
data = response.json()
if 'members' not in data:
print(f"Error: 'members' key not found in the response. Response: {data}")
break
for member in data['members']:
members.append(member)
# Update the URL to the next page
next_url = data['pagination'].get('next')
if next_url:
# Parse out the params from the next_url
next_url_split = next_url.split('?')
url = next_url_split[0]
params.update(dict(x.split('=') for x in next_url_split[1].split('&')))
else:
url = None
return members
def parse_members(members):
parsed_members = []
for member in members:
name = member['name']
party = member['partyName'][0]
state = member['state'].title()
state_abbreviated = state_to_abbreviation.get(state, state)
terms = member['terms']['item']
current_term = [term for term in terms if 'endYear' not in term.keys()]
# ignore them if they resigned during their current term
if not current_term:
continue
# extract the Chamber from the current term
chamber = current_term[0]['chamber']
chamber_shortened = chamber.split(maxsplit=1)[0]
parsed_member = [
name,
party,
state_abbreviated,
chamber_shortened,
"-",
"-",
""
]
parsed_members.append(parsed_member)
return parsed_members
def output_member_data_as_markdown(data):
headers = [
'Name',
'Party',
'State',
'Chamber',
'Bitcoin Owner',
'Disclosure',
'Notes'
]
return tabulate(data, headers=headers, tablefmt='github')
# Example usage
api_key = "<API_KEY>"
members = get_members(api_key)
members = sorted(members, key=lambda x: x['name'])
parsed_members = parse_members(members)
md_table_parsed_members = output_member_data_as_markdown(parsed_members)
print(md_table_parsed_members)
Will output:
| Name | Party | State | Chamber | Bitcoin Owner | Disclosure | Notes |
|---------------------------------|---------|--------------------------|-----------|-----------------|--------------|---------|
| Adams, Alma S. | D | NC | House | - | - | |
| Aderholt, Robert B. | R | AL | House | - | - | |
| Aguilar, Pete | D | CA | House | - | - | |
| Alford, Mark | R | MO | House | - | - | |
| Allen, Rick W. | R | GA | House | - | - | |
| Allred, Colin Z. | D | TX | House | - | - | |
| Amo, Gabe | D | RI | House | - | - | |
| Amodei, Mark E. | R | NV | House | - | - | |
| Armstrong, Kelly | R | ND | House | - | - | |
| Arrington, Jodey C. | R | TX | House | - | - | |
| Auchincloss, Jake | D | MA | House | - | - | |
| Babin, Brian | R | TX | House | - | - | |
| Bacon, Don | R | NE | House | - | - | |
| Baird, James R. | R | IN | House | - | - | |
| Balderson, Troy | R | OH | House | - | - | |
| Baldwin, Tammy | D | WI | Senate | - | - | |
| Balint, Becca | D | VT | House | - | - | |
| Banks, Jim | R | IN | House | - | - | |
| Barr, Andy | R | KY | House | - | - | |
| Barragán, Nanette Diaz | D | CA | House | - | - | |
| Barrasso, John | R | WY | Senate | - | - | |
| Bean, Aaron | R | FL | House | - | - | |
| Beatty, Joyce | D | OH | House | - | - | |
| Bennet, Michael F. | D | CO | Senate | - | - | |
| Bentz, Cliff | R | OR | House | - | - | |
| Bera, Ami | D | CA | House | - | - | |
| Bergman, Jack | R | MI | House | - | - | |
| Beyer, Donald S. | D | VA | House | - | - | |
| Bice, Stephanie I. | R | OK | House | - | - | |
| Biggs, Andy | R | AZ | House | - | - | |
| Bilirakis, Gus M. | R | FL | House | - | - | |
| Bishop, Dan | R | NC | House | - | - | |
| Bishop, Sanford D. | D | GA | House | - | - | |
| Blackburn, Marsha | R | TN | Senate | - | - | |
| Blumenauer, Earl | D | OR | House | - | - | |
| Blumenthal, Richard | D | CT | Senate | - | - | |
| Blunt Rochester, Lisa | D | DE | House | - | - | |
| Boebert, Lauren | R | CO | House | - | - | |
| Bonamici, Suzanne | D | OR | House | - | - | |
| Booker, Cory A. | D | NJ | Senate | - | - | |
| Boozman, John | R | AR | Senate | - | - | |
| Bost, Mike | R | IL | House | - | - | |
| Bowman, Jamaal | D | NY | House | - | - | |
| Boyle, Brendan F. | D | PA | House | - | - | |
| Braun, Mike | R | IN | Senate | - | - | |
| Brecheen, Josh | R | OK | House | - | - | |
| Britt, Katie Boyd | R | AL | Senate | - | - | |
| Brown, Sherrod | D | OH | Senate | - | - | |
| Brown, Shontel M. | D | OH | House | - | - | |
| Brownley, Julia | D | CA | House | - | - | |
| Buchanan, Vern | R | FL | House | - | - | |
| Bucshon, Larry | R | IN | House | - | - | |
| Budd, Ted | R | NC | Senate | - | - | |
| Budzinski, Nikki | D | IL | House | - | - | |
| Burchett, Tim | R | TN | House | - | - | |
| Burgess, Michael C. | R | TX | House | - | - | |
| Burlison, Eric | R | MO | House | - | - | |
| Bush, Cori | D | MO | House | - | - | |
| Butler, Laphonza R. | D | CA | Senate | - | - | |
| Calvert, Ken | R | CA | House | - | - | |
| Cammack, Kat | R | FL | House | - | - | |
| Cantwell, Maria | D | WA | Senate | - | - | |
| Capito, Shelley Moore | R | WV | Senate | - | - | |
| Caraveo, Yadira | D | CO | House | - | - | |
| Carbajal, Salud O. | D | CA | House | - | - | |
| Cardin, Benjamin L. | D | MD | Senate | - | - | |
| Carey, Mike | R | OH | House | - | - | |
| Carl, Jerry L. | R | AL | House | - | - | |
| Carper, Thomas R. | D | DE | Senate | - | - | |
| Carson, André | D | IN | House | - | - | |
| Carter, Earl L. "Buddy" | R | GA | House | - | - | |
| Carter, John R. | R | TX | House | - | - | |
| Carter, Troy A. | D | LA | House | - | - | |
| Cartwright, Matt | D | PA | House | - | - | |
| Casar, Greg | D | TX | House | - | - | |
| Case, Ed | D | HI | House | - | - | |
| Casey, Robert P., Jr. | D | PA | Senate | - | - | |
| Cassidy, Bill | R | LA | Senate | - | - | |
| Casten, Sean | D | IL | House | - | - | |
| Castor, Kathy | D | FL | House | - | - | |
| Castro, Joaquin | D | TX | House | - | - | |
| Chavez-DeRemer, Lori | R | OR | House | - | - | |
| Cherfilus-McCormick, Sheila | D | FL | House | - | - | |
| Chu, Judy | D | CA | House | - | - | |
| Ciscomani, Juan | R | AZ | House | - | - | |
| Clark, Katherine M. | D | MA | House | - | - | |
| Clarke, Yvette D. | D | NY | House | - | - | |
| Cleaver, Emanuel | D | MO | House | - | - | |
| Cline, Ben | R | VA | House | - | - | |
| Cloud, Michael | R | TX | House | - | - | |
| Clyburn, James E. | D | SC | House | - | - | |
| Clyde, Andrew S. | R | GA | House | - | - | |
| Cohen, Steve | D | TN | House | - | - | |
| Cole, Tom | R | OK | House | - | - | |
| Collins, Mike | R | GA | House | - | - | |
| Collins, Susan M. | R | ME | Senate | - | - | |
| Comer, James | R | KY | House | - | - | |
| Connolly, Gerald E. | D | VA | House | - | - | |
| Coons, Christopher A. | D | DE | Senate | - | - | |
| Cornyn, John | R | TX | Senate | - | - | |
| Correa, J. Luis | D | CA | House | - | - | |
| Cortez Masto, Catherine | D | NV | Senate | - | - | |
| Costa, Jim | D | CA | House | - | - | |
| Cotton, Tom | R | AR | Senate | - | - | |
| Courtney, Joe | D | CT | House | - | - | |
| Craig, Angie | D | MN | House | - | - | |
| Cramer, Kevin | R | ND | Senate | - | - | |
| Crane, Elijah | R | AZ | House | - | - | |
| Crapo, Mike | R | ID | Senate | - | - | |
| Crawford, Eric A. "Rick" | R | AR | House | - | - | |
| Crenshaw, Dan | R | TX | House | - | - | |
| Crockett, Jasmine | D | TX | House | - | - | |
| Crow, Jason | D | CO | House | - | - | |
| Cruz, Ted | R | TX | Senate | - | - | |
| Cuellar, Henry | D | TX | House | - | - | |
| Curtis, John R. | R | UT | House | - | - | |
| Cárdenas, Tony | D | CA | House | - | - | |
| D'Esposito, Anthony | R | NY | House | - | - | |
| Daines, Steve | R | MT | Senate | - | - | |
| Davids, Sharice | D | KS | House | - | - | |
| Davidson, Warren | R | OH | House | - | - | |
| Davis, Danny K. | D | IL | House | - | - | |
| Davis, Donald G. | D | NC | House | - | - | |
| De La Cruz, Monica | R | TX | House | - | - | |
| DeGette, Diana | D | CO | House | - | - | |
| DeLauro, Rosa L. | D | CT | House | - | - | |
| DeSaulnier, Mark | D | CA | House | - | - | |
| Dean, Madeleine | D | PA | House | - | - | |
| DelBene, Suzan K. | D | WA | House | - | - | |
| Deluzio, Christopher R. | D | PA | House | - | - | |
| DesJarlais, Scott | R | TN | House | - | - | |
| Diaz-Balart, Mario | R | FL | House | - | - | |
| Dingell, Debbie | D | MI | House | - | - | |
| Doggett, Lloyd | D | TX | House | - | - | |
| Donalds, Byron | R | FL | House | - | - | |
| Duarte, John S. | R | CA | House | - | - | |
| Duckworth, Tammy | D | IL | Senate | - | - | |
| Duncan, Jeff | R | SC | House | - | - | |
| Dunn, Neal P. | R | FL | House | - | - | |
| Durbin, Richard J. | D | IL | Senate | - | - | |
| Edwards, Chuck | R | NC | House | - | - | |
| Ellzey, Jake | R | TX | House | - | - | |
| Emmer, Tom | R | MN | House | - | - | |
| Ernst, Joni | R | IA | Senate | - | - | |
| Escobar, Veronica | D | TX | House | - | - | |
| Eshoo, Anna G. | D | CA | House | - | - | |
| Espaillat, Adriano | D | NY | House | - | - | |
| Estes, Ron | R | KS | House | - | - | |
| Evans, Dwight | D | PA | House | - | - | |
| Ezell, Mike | R | MS | House | - | - | |
| Fallon, Pat | R | TX | House | - | - | |
| Feenstra, Randy | R | IA | House | - | - | |
| Ferguson, A. Drew | R | GA | House | - | - | |
| Fetterman, John | D | PA | Senate | - | - | |
| Finstad, Brad | R | MN | House | - | - | |
| Fischbach, Michelle | R | MN | House | - | - | |
| Fischer, Deb | R | NE | Senate | - | - | |
| Fitzgerald, Scott | R | WI | House | - | - | |
| Fitzpatrick, Brian K. | R | PA | House | - | - | |
| Fleischmann, Charles J. "Chuck" | R | TN | House | - | - | |
| Fletcher, Lizzie | D | TX | House | - | - | |
| Flood, Mike | R | NE | House | - | - | |
| Foster, Bill | D | IL | House | - | - | |
| Foushee, Valerie P. | D | NC | House | - | - | |
| Foxx, Virginia | R | NC | House | - | - | |
| Frankel, Lois | D | FL | House | - | - | |
| Franklin, C. Scott | R | FL | House | - | - | |
| Frost, Maxwell | D | FL | House | - | - | |
| Fry, Russell | R | SC | House | - | - | |
| Fulcher, Russ | R | ID | House | - | - | |
| Gaetz, Matt | R | FL | House | - | - | |
| Gallego, Ruben | D | AZ | House | - | - | |
| Garamendi, John | D | CA | House | - | - | |
| Garbarino, Andrew R. | R | NY | House | - | - | |
| Garcia, Mike | R | CA | House | - | - | |
| Garcia, Robert | D | CA | House | - | - | |
| Garcia, Sylvia R. | D | TX | House | - | - | |
| García, Jesús G. "Chuy" | D | IL | House | - | - | |
| Gillibrand, Kirsten E. | D | NY | Senate | - | - | |
| Gimenez, Carlos A. | R | FL | House | - | - | |
| Golden, Jared F. | D | ME | House | - | - | |
| Goldman, Daniel S. | D | NY | House | - | - | |
| Gomez, Jimmy | D | CA | House | - | - | |
| Gonzales, Tony | R | TX | House | - | - | |
| Gonzalez, Vicente | D | TX | House | - | - | |
| González-Colón, Jenniffer | R | Puerto Rico | House | - | - | |
| Good, Bob | R | VA | House | - | - | |
| Gooden, Lance | R | TX | House | - | - | |
| Gosar, Paul A. | R | AZ | House | - | - | |
| Gottheimer, Josh | D | NJ | House | - | - | |
| Graham, Lindsey | R | SC | Senate | - | - | |
| Granger, Kay | R | TX | House | - | - | |
| Grassley, Chuck | R | IA | Senate | - | - | |
| Graves, Garret | R | LA | House | - | - | |
| Graves, Sam | R | MO | House | - | - | |
| Green, Al | D | TX | House | - | - | |
| Green, Mark E. | R | TN | House | - | - | |
| Greene, Marjorie Taylor | R | GA | House | - | - | |
| Griffith, H. Morgan | R | VA | House | - | - | |
| Grijalva, Raúl M. | D | AZ | House | - | - | |
| Grothman, Glenn | R | WI | House | - | - | |
| Guest, Michael | R | MS | House | - | - | |
| Guthrie, Brett | R | KY | House | - | - | |
| Hageman, Harriet M. | R | WY | House | - | - | |
| Hagerty, Bill | R | TN | Senate | - | - | |
| Harder, Josh | D | CA | House | - | - | |
| Harris, Andy | R | MD | House | - | - | |
| Harshbarger, Diana | R | TN | House | - | - | |
| Hassan, Margaret Wood | D | NH | Senate | - | - | |
| Hawley, Josh | R | MO | Senate | - | - | |
| Hayes, Jahana | D | CT | House | - | - | |
| Heinrich, Martin | D | NM | Senate | - | - | |
| Hern, Kevin | R | OK | House | - | - | |
| Hickenlooper, John W. | D | CO | Senate | - | - | |
| Higgins, Clay | R | LA | House | - | - | |
| Hill, J. French | R | AR | House | - | - | |
| Himes, James A. | D | CT | House | - | - | |
| Hinson, Ashley | R | IA | House | - | - | |
| Hirono, Mazie K. | D | HI | Senate | - | - | |
| Hoeven, John | R | ND | Senate | - | - | |
| Horsford, Steven | D | NV | House | - | - | |
| Houchin, Erin | R | IN | House | - | - | |
| Houlahan, Chrissy | D | PA | House | - | - | |
| Hoyer, Steny H. | D | MD | House | - | - | |
| Hoyle, Val T. | D | OR | House | - | - | |
| Hudson, Richard | R | NC | House | - | - | |
| Huffman, Jared | D | CA | House | - | - | |
| Huizenga, Bill | R | MI | House | - | - | |
| Hunt, Wesley | R | TX | House | - | - | |
| Hyde-Smith, Cindy | R | MS | Senate | - | - | |
| Issa, Darrell | R | CA | House | - | - | |
| Ivey, Glenn | D | MD | House | - | - | |
| Jackson Lee, Sheila | D | TX | House | - | - | |
| Jackson, Jeff | D | NC | House | - | - | |
| Jackson, Jonathan L. | D | IL | House | - | - | |
| Jackson, Ronny | R | TX | House | - | - | |
| Jacobs, Sara | D | CA | House | - | - | |
| James, John | R | MI | House | - | - | |
| Jayapal, Pramila | D | WA | House | - | - | |
| Jeffries, Hakeem S. | D | NY | House | - | - | |
| Johnson, Dusty | R | SD | House | - | - | |
| Johnson, Henry C. "Hank" | D | GA | House | - | - | |
| Johnson, Mike | R | LA | House | - | - | |
| Johnson, Ron | R | WI | Senate | - | - | |
| Jordan, Jim | R | OH | House | - | - | |
| Joyce, David P. | R | OH | House | - | - | |
| Joyce, John | R | PA | House | - | - | |
| Kaine, Tim | D | VA | Senate | - | - | |
| Kamlager-Dove, Sydney | D | CA | House | - | - | |
| Kaptur, Marcy | D | OH | House | - | - | |
| Kean, Thomas H. | R | NJ | House | - | - | |
| Keating, William R. | D | MA | House | - | - | |
| Kelly, Mark | D | AZ | Senate | - | - | |
| Kelly, Mike | R | PA | House | - | - | |
| Kelly, Robin L. | D | IL | House | - | - | |
| Kelly, Trent | R | MS | House | - | - | |
| Kennedy, John | R | LA | Senate | - | - | |
| Kennedy, Timothy M. | D | NY | House | - | - | |
| Khanna, Ro | D | CA | House | - | - | |
| Kiggans, Jennifer A. | R | VA | House | - | - | |
| Kildee, Daniel T. | D | MI | House | - | - | |
| Kiley, Kevin | R | CA | House | - | - | |
| Kilmer, Derek | D | WA | House | - | - | |
| Kim, Andy | D | NJ | House | - | - | |
| Kim, Young | R | CA | House | - | - | |
| King, Angus S., Jr. | I | ME | Senate | - | - | |
| Klobuchar, Amy | D | MN | Senate | - | - | |
| Krishnamoorthi, Raja | D | IL | House | - | - | |
| Kuster, Ann M. | D | NH | House | - | - | |
| Kustoff, David | R | TN | House | - | - | |
| LaHood, Darin | R | IL | House | - | - | |
| LaLota, Nick | R | NY | House | - | - | |
| LaMalfa, Doug | R | CA | House | - | - | |
| LaTurner, Jake | R | KS | House | - | - | |
| Lamborn, Doug | R | CO | House | - | - | |
| Landsman, Greg | D | OH | House | - | - | |
| Langworthy, Nicholas A. | R | NY | House | - | - | |
| Lankford, James | R | OK | Senate | - | - | |
| Larsen, Rick | D | WA | House | - | - | |
| Larson, John B. | D | CT | House | - | - | |
| Latta, Robert E. | R | OH | House | - | - | |
| Lawler, Michael | R | NY | House | - | - | |
| Lee, Barbara | D | CA | House | - | - | |
| Lee, Laurel M. | R | FL | House | - | - | |
| Lee, Mike | R | UT | Senate | - | - | |
| Lee, Summer L. | D | PA | House | - | - | |
| Lee, Susie | D | NV | House | - | - | |
| Leger Fernandez, Teresa | D | NM | House | - | - | |
| Lesko, Debbie | R | AZ | House | - | - | |
| Letlow, Julia | R | LA | House | - | - | |
| Levin, Mike | D | CA | House | - | - | |
| Lieu, Ted | D | CA | House | - | - | |
| Lofgren, Zoe | D | CA | House | - | - | |
| Loudermilk, Barry | R | GA | House | - | - | |
| Lucas, Frank D. | R | OK | House | - | - | |
| Luetkemeyer, Blaine | R | MO | House | - | - | |
| Lujan, Ben Ray | D | NM | Senate | - | - | |
| Lummis, Cynthia M. | R | WY | Senate | - | - | |
| Luna, Anna Paulina | R | FL | House | - | - | |
| Luttrell, Morgan | R | TX | House | - | - | |
| Lynch, Stephen F. | D | MA | House | - | - | |
| Mace, Nancy | R | SC | House | - | - | |
| Magaziner, Seth | D | RI | House | - | - | |
| Malliotakis, Nicole | R | NY | House | - | - | |
| Maloy, Celeste | R | UT | House | - | - | |
| Manchin, Joe, III | D | WV | Senate | - | - | |
| Mann, Tracey | R | KS | House | - | - | |
| Manning, Kathy E. | D | NC | House | - | - | |
| Markey, Edward J. | D | MA | Senate | - | - | |
| Marshall, Roger | R | KS | Senate | - | - | |
| Massie, Thomas | R | KY | House | - | - | |
| Mast, Brian J. | R | FL | House | - | - | |
| Matsui, Doris O. | D | CA | House | - | - | |
| McBath, Lucy | D | GA | House | - | - | |
| McCaul, Michael T. | R | TX | House | - | - | |
| McClain, Lisa C. | R | MI | House | - | - | |
| McClellan, Jennifer L. | D | VA | House | - | - | |
| McClintock, Tom | R | CA | House | - | - | |
| McCollum, Betty | D | MN | House | - | - | |
| McConnell, Mitch | R | KY | Senate | - | - | |
| McCormick, Richard | R | GA | House | - | - | |
| McGarvey, Morgan | D | KY | House | - | - | |
| McGovern, James P. | D | MA | House | - | - | |
| McHenry, Patrick T. | R | NC | House | - | - | |
| McMorris Rodgers, Cathy | R | WA | House | - | - | |
| Meeks, Gregory W. | D | NY | House | - | - | |
| Menendez, Robert | D | NJ | Senate | - | - | |
| Menendez, Robert | D | NJ | House | - | - | |
| Meng, Grace | D | NY | House | - | - | |
| Merkley, Jeff | D | OR | Senate | - | - | |
| Meuser, Daniel | R | PA | House | - | - | |
| Mfume, Kweisi | D | MD | House | - | - | |
| Miller, Carol D. | R | WV | House | - | - | |
| Miller, Mary E. | R | IL | House | - | - | |
| Miller, Max L. | R | OH | House | - | - | |
| Miller-Meeks, Mariannette | R | IA | House | - | - | |
| Mills, Cory | R | FL | House | - | - | |
| Molinaro, Marcus J. | R | NY | House | - | - | |
| Moolenaar, John R. | R | MI | House | - | - | |
| Mooney, Alexander X. | R | WV | House | - | - | |
| Moore, Barry | R | AL | House | - | - | |
| Moore, Blake D. | R | UT | House | - | - | |
| Moore, Gwen | D | WI | House | - | - | |
| Moran, Jerry | R | KS | Senate | - | - | |
| Moran, Nathaniel | R | TX | House | - | - | |
| Morelle, Joseph D. | D | NY | House | - | - | |
| Moskowitz, Jared | D | FL | House | - | - | |
| Moulton, Seth | D | MA | House | - | - | |
| Moylan, James C. | R | Guam | House | - | - | |
| Mrvan, Frank J. | D | IN | House | - | - | |
| Mullin, Kevin | D | CA | House | - | - | |
| Mullin, Markwayne | R | OK | Senate | - | - | |
| Murkowski, Lisa | R | AK | Senate | - | - | |
| Murphy, Christopher | D | CT | Senate | - | - | |
| Murphy, Gregory F. | R | NC | House | - | - | |
| Murray, Patty | D | WA | Senate | - | - | |
| Nadler, Jerrold | D | NY | House | - | - | |
| Napolitano, Grace F. | D | CA | House | - | - | |
| Neal, Richard E. | D | MA | House | - | - | |
| Neguse, Joe | D | CO | House | - | - | |
| Nehls, Troy E. | R | TX | House | - | - | |
| Newhouse, Dan | R | WA | House | - | - | |
| Nickel, Wiley | D | NC | House | - | - | |
| Norcross, Donald | D | NJ | House | - | - | |
| Norman, Ralph | R | SC | House | - | - | |
| Norton, Eleanor Holmes | D | District Of Columbia | House | - | - | |
| Nunn, Zachary | R | IA | House | - | - | |
| Obernolte, Jay | R | CA | House | - | - | |
| Ocasio-Cortez, Alexandria | D | NY | House | - | - | |
| Ogles, Andrew | R | TN | House | - | - | |
| Omar, Ilhan | D | MN | House | - | - | |
| Ossoff, Jon | D | GA | Senate | - | - | |
| Owens, Burgess | R | UT | House | - | - | |
| Padilla, Alex | D | CA | Senate | - | - | |
| Pallone, Frank | D | NJ | House | - | - | |
| Palmer, Gary J. | R | AL | House | - | - | |
| Panetta, Jimmy | D | CA | House | - | - | |
| Pappas, Chris | D | NH | House | - | - | |
| Pascrell, Bill | D | NJ | House | - | - | |
| Paul, Rand | R | KY | Senate | - | - | |
| Pelosi, Nancy | D | CA | House | - | - | |
| Peltola, Mary Sattler | D | AK | House | - | - | |
| Pence, Greg | R | IN | House | - | - | |
| Perez, Marie Gluesenkamp | D | WA | House | - | - | |
| Perry, Scott | R | PA | House | - | - | |
| Peters, Gary C. | D | MI | Senate | - | - | |
| Peters, Scott H. | D | CA | House | - | - | |
| Pettersen, Brittany | D | CO | House | - | - | |
| Pfluger, August | R | TX | House | - | - | |
| Phillips, Dean | D | MN | House | - | - | |
| Pingree, Chellie | D | ME | House | - | - | |
| Plaskett, Stacey E. | D | Virgin Islands | House | - | - | |
| Pocan, Mark | D | WI | House | - | - | |
| Porter, Katie | D | CA | House | - | - | |
| Posey, Bill | R | FL | House | - | - | |
| Pressley, Ayanna | D | MA | House | - | - | |
| Quigley, Mike | D | IL | House | - | - | |
| Radewagen, Aumua Amata Coleman | R | American Samoa | House | - | - | |
| Ramirez, Delia C. | D | IL | House | - | - | |
| Raskin, Jamie | D | MD | House | - | - | |
| Reed, Jack | D | RI | Senate | - | - | |
| Reschenthaler, Guy | R | PA | House | - | - | |
| Ricketts, Pete | R | NE | Senate | - | - | |
| Risch, James E. | R | ID | Senate | - | - | |
| Rogers, Harold | R | KY | House | - | - | |
| Rogers, Mike D. | R | AL | House | - | - | |
| Romney, Mitt | R | UT | Senate | - | - | |
| Rose, John W. | R | TN | House | - | - | |
| Rosen, Jacky | D | NV | Senate | - | - | |
| Rosendale, Matthew M. | R | MT | House | - | - | |
| Ross, Deborah K. | D | NC | House | - | - | |
| Rounds, Mike | R | SD | Senate | - | - | |
| Rouzer, David | R | NC | House | - | - | |
| Roy, Chip | R | TX | House | - | - | |
| Rubio, Marco | R | FL | Senate | - | - | |
| Ruiz, Raul | D | CA | House | - | - | |
| Ruppersberger, C. A. Dutch | D | MD | House | - | - | |
| Rutherford, John H. | R | FL | House | - | - | |
| Ryan, Patrick | D | NY | House | - | - | |
| Sablan, Gregorio Kilili Camacho | D | Northern Mariana Islands | House | - | - | |
| Salazar, Maria Elvira | R | FL | House | - | - | |
| Salinas, Andrea | D | OR | House | - | - | |
| Sanders, Bernard | I | VT | Senate | - | - | |
| Sarbanes, John P. | D | MD | House | - | - | |
| Scalise, Steve | R | LA | House | - | - | |
| Scanlon, Mary Gay | D | PA | House | - | - | |
| Schakowsky, Janice D. | D | IL | House | - | - | |
| Schatz, Brian | D | HI | Senate | - | - | |
| Schiff, Adam B. | D | CA | House | - | - | |
| Schmitt, Eric | R | MO | Senate | - | - | |
| Schneider, Bradley Scott | D | IL | House | - | - | |
| Scholten, Hillary J. | D | MI | House | - | - | |
| Schrier, Kim | D | WA | House | - | - | |
| Schumer, Charles E. | D | NY | Senate | - | - | |
| Schweikert, David | R | AZ | House | - | - | |
| Scott, Austin | R | GA | House | - | - | |
| Scott, David | D | GA | House | - | - | |
| Scott, Rick | R | FL | Senate | - | - | |
| Scott, Robert C. "Bobby" | D | VA | House | - | - | |
| Scott, Tim | R | SC | Senate | - | - | |
| Self, Keith | R | TX | House | - | - | |
| Sessions, Pete | R | TX | House | - | - | |
| Sewell, Terri A. | D | AL | House | - | - | |
| Shaheen, Jeanne | D | NH | Senate | - | - | |
| Sherman, Brad | D | CA | House | - | - | |
| Sherrill, Mikie | D | NJ | House | - | - | |
| Simpson, Michael K. | R | ID | House | - | - | |
| Sinema, Kyrsten | I | AZ | Senate | - | - | |
| Slotkin, Elissa | D | MI | House | - | - | |
| Smith, Adam | D | WA | House | - | - | |
| Smith, Adrian | R | NE | House | - | - | |
| Smith, Christopher H. | R | NJ | House | - | - | |
| Smith, Jason | R | MO | House | - | - | |
| Smith, Tina | D | MN | Senate | - | - | |
| Smucker, Lloyd | R | PA | House | - | - | |
| Sorensen, Eric | D | IL | House | - | - | |
| Soto, Darren | D | FL | House | - | - | |
| Spanberger, Abigail Davis | D | VA | House | - | - | |
| Spartz, Victoria | R | IN | House | - | - | |
| Stabenow, Debbie | D | MI | Senate | - | - | |
| Stansbury, Melanie A. | D | NM | House | - | - | |
| Stanton, Greg | D | AZ | House | - | - | |
| Stauber, Pete | R | MN | House | - | - | |
| Steel, Michelle | R | CA | House | - | - | |
| Stefanik, Elise M. | R | NY | House | - | - | |
| Steil, Bryan | R | WI | House | - | - | |
| Steube, W. Gregory | R | FL | House | - | - | |
| Stevens, Haley M. | D | MI | House | - | - | |
| Strickland, Marilyn | D | WA | House | - | - | |
| Strong, Dale W. | R | AL | House | - | - | |
| Sullivan, Dan | R | AK | Senate | - | - | |
| Suozzi, Thomas R. | D | NY | House | - | - | |
| Swalwell, Eric | D | CA | House | - | - | |
| Sykes, Emilia Strong | D | OH | House | - | - | |
| Sánchez, Linda T. | D | CA | House | - | - | |
| Takano, Mark | D | CA | House | - | - | |
| Tenney, Claudia | R | NY | House | - | - | |
| Tester, Jon | D | MT | Senate | - | - | |
| Thanedar, Shri | D | MI | House | - | - | |
| Thompson, Bennie G. | D | MS | House | - | - | |
| Thompson, Glenn | R | PA | House | - | - | |
| Thompson, Mike | D | CA | House | - | - | |
| Thune, John | R | SD | Senate | - | - | |
| Tiffany, Thomas P. | R | WI | House | - | - | |
| Tillis, Thomas | R | NC | Senate | - | - | |
| Timmons, William R. | R | SC | House | - | - | |
| Titus, Dina | D | NV | House | - | - | |
| Tlaib, Rashida | D | MI | House | - | - | |
| Tokuda, Jill N. | D | HI | House | - | - | |
| Tonko, Paul | D | NY | House | - | - | |
| Torres, Norma J. | D | CA | House | - | - | |
| Torres, Ritchie | D | NY | House | - | - | |
| Trahan, Lori | D | MA | House | - | - | |
| Trone, David J. | D | MD | House | - | - | |
| Tuberville, Tommy | R | AL | Senate | - | - | |
| Turner, Michael R. | R | OH | House | - | - | |
| Underwood, Lauren | D | IL | House | - | - | |
| Valadao, David G. | R | CA | House | - | - | |
| Van Drew, Jefferson | R | NJ | House | - | - | |
| Van Duyne, Beth | R | TX | House | - | - | |
| Van Hollen, Chris | D | MD | Senate | - | - | |
| Van Orden, Derrick | R | WI | House | - | - | |
| Vance, J. D. | R | OH | Senate | - | - | |
| Vargas, Juan | D | CA | House | - | - | |
| Vasquez, Gabe | D | NM | House | - | - | |
| Veasey, Marc A. | D | TX | House | - | - | |
| Velázquez, Nydia M. | D | NY | House | - | - | |
| Wagner, Ann | R | MO | House | - | - | |
| Walberg, Tim | R | MI | House | - | - | |
| Waltz, Michael | R | FL | House | - | - | |
| Warner, Mark R. | D | VA | Senate | - | - | |
| Warnock, Raphael G. | D | GA | Senate | - | - | |
| Warren, Elizabeth | D | MA | Senate | - | - | |
| Wasserman Schultz, Debbie | D | FL | House | - | - | |
| Waters, Maxine | D | CA | House | - | - | |
| Watson Coleman, Bonnie | D | NJ | House | - | - | |
| Weber, Randy K. | R | TX | House | - | - | |
| Webster, Daniel | R | FL | House | - | - | |
| Welch, Peter | D | VT | Senate | - | - | |
| Wenstrup, Brad R. | R | OH | House | - | - | |
| Westerman, Bruce | R | AR | House | - | - | |
| Wexton, Jennifer | D | VA | House | - | - | |
| Whitehouse, Sheldon | D | RI | Senate | - | - | |
| Wicker, Roger F. | R | MS | Senate | - | - | |
| Wild, Susan | D | PA | House | - | - | |
| Williams, Brandon | R | NY | House | - | - | |
| Williams, Nikema | D | GA | House | - | - | |
| Williams, Roger | R | TX | House | - | - | |
| Wilson, Frederica S. | D | FL | House | - | - | |
| Wilson, Joe | R | SC | House | - | - | |
| Wittman, Robert J. | R | VA | House | - | - | |
| Womack, Steve | R | AR | House | - | - | |
| Wyden, Ron | D | OR | Senate | - | - | |
| Yakym, Rudy | R | IN | House | - | - | |
| Young, Todd | R | IN | Senate | - | - | |
| Zinke, Ryan K. | R | MT | House | - | - | |
after filtering for only "Annual Reports", it appears that we only have disclosures for 2022 for the members in house of representatives..
Is it okay if I just set the year to 2022 and update data accordingly for those who are currently in house of representatives? Or should I use the list of members back in 2022?
Good question.
I'd say the primary (easy) goal is for the list of all currently seated members of Congress to be accurate. Ideally it should be updated within a week or month of new members being sworn in.
The unfortunate truth of financial disclosures is that they tend to be extremely slow to be filed. IIRC members are supposed to have their annual reports for the prior year filed in April or May, but in my experience the majority of members tend to file extensions that push the due date out to October. So, since it's currently May of 2024 it makes sense that we only really have complete reports from 2022 as few members would have filed their 2023 reports yet.
The Bitcoin Politicians project is woefully out of date due to the hundreds of hours required to manually sift through financial disclosures from 535 members of Congress.
I'm offering a bounty of $1,000 in bitcoin to someone who writes enough code to automate this process. I don't particularly care what tools are used as long as I can reproduce the results and run it on a weekly basis. If you think $1,000 is insufficient for the complexity of this project, feel free to make a bid.
What would automation entail?
This should be straightforward for the members who file digitally, as searching for terms should be as simple as scraping the relevant web page. However, many members of Congress still file on paper and the filings web site will return a PDF, some of which are hundreds of pages long. This will likely be the most challenging part of the project, requiring either a really good OCR library or some kind of LLM that can effectively perform OCR.
In order to consider a submission to be of high enough quality, I'd like to see at least a 95% accuracy rate when it comes to correctly identifying politicians holding the assets for which we're searching.