3 ms·
The Office of the Clerk of the House has a page for downloading Zip files of annual data[0]. If you take the DocID from the XML or TXT files in those sets you
by dvaun 6y ago
The Office of the Clerk of the House has a page for downloading Zip files of annual data[0].
If you take the DocID from the XML or TXT files in those sets you can send a request to:
https://disclosures-clerk.house.gov/public_disc/<doctype>-pdfs/<year>/<docid>.pdf
- <doctype> works for the values "ptr" and "financial"
- <year> self-explanatory
- <docid> the DocID from the entries in the XML or TXT files
Example: Nancy Pelosi disclosure/filing on 2021-04-09[1]
[0]: https://disclosures-clerk.house.gov/PublicDisclosure/FinancialDisclosure https://disclosures-clerk.house.gov/PublicDisclosure/Financi...
[1]: https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2021/20018539.pdf https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/202...
This would be fun to play around with. I wonder if there's a better endpoint to source this from?
- adolph 6y agoIf you are using Python, this is an approach to get PDF tables into Pandas dataframes. https://towardsdatascience.com/how-to-extract-tables-from-pdf-using-python-pandas-and-tabula-py-c65e43bd754 https://towardsdatascience.com/how-to-extract-tables-from-pd...