Live data from Hacker News

Ask HN: Any good tools for viewing congressional bills?

news.ycombinator.com

1–10 of 44 posts

Ask HN: Any good tools for viewing congressional bills?

#1
I was interested in skimming through the "Big Beautiful Bill" and I found the contents of it on congress.gov[1].

It comes in two formats: One is a text document with with column size restrictions that makes it very hard to read, worse than the text version of an IETF RFC. The second is a machine readable XML document which itself isn't easily read.

Are there any good tools for viewing these? I did find GovTrack.us but it seems to be down so I'm not sure if it solves this problem.

[1]: https://www.congress.gov/bill/119th-congress/house-bill/1/text

Re: Ask HN: Any good tools for viewing congressional bills?

#2
Should be at fun little XML parser to write, converting the thing to HTML.

Except that it's a government thing so the parser's probably not going to be little. :)

Edit: The thing's basically XHTML without any kind of header. UTF-8 encoding, it looks like. So a conversion tool would just need to wrap it up and add styling.

Edit: Despite hints that it's XHTML, it's not valid XHTML.

Edit: Stick this at the top of the file:

--------------------- 8

    

    

    H. R. 1

    
    body {
        max-width: 40em;
        margin: auto;
    }
    .lbexTocSectionOLC {
        display: inline-block;
    }
    .lbexTocDivisionOLC {
        margin-top: 5ex;
    }
    

--------------------- 8And add this to the bottom of the file:

--------------------- 8

--------------------- 8I'll leave it as an exercise to the reader to write a script to do that. Automatically extracting the bill title should be Fun.

Re: Ask HN: Any good tools for viewing congressional bills?

#7
Side-note, if anyone wants to really dig into all the data available about bills (including votes, attachments, etc.), this is a great place to start: https://github.com/unitedstates/congress

There's excellent documentation on the formats and how to access all the data.

Re: Ask HN: Any good tools for viewing congressional bills?

#8
post #6

See https://www.govinfo.gov/bulkdata/BILLS/resources . Specifically the billres.xsl and associated stylesheets. You can use those with the Saxon XSLT processor to transform the XML files into a HTML view similar to what the PDFs look like.

There's also https://www.govinfo.gov/bulkdata/FR/resources for federal register XML documents.

Note: it could be worth checking the issues at https://github.com/usgpo/bulk-data/issues as some of those contain fixes and formatting improvements.

Re: Ask HN: Any good tools for viewing congressional bills?

#10
Paste the entire thing into the LLM! Maybe people can stop relying on unreliable partisan sources to interpret bills if they have tools to grok the dense weird language in them themselves. I say this even though I was embarrassed yesterday when the LLM misinterpreted something and I posted it - read the reference text behind any summary :/
Post reply on HN