Hacker News new | past | comments | ask | show | jobs | submit login

There is at the Federal level.[1] It's XML-based. Here's an example of a bill in raw XML.[1] It displays in the form that a bill is printed.[2] The GPO even puts in the XML, "Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain."

There's a change control system behind all this. Here's a history of a bill, again, in XML.[4] There are change transactions, which are also in XML, but they're not in this database.

[1] https://www.gpo.gov/fdsys/bulkdata [2] view-source:https://www.gpo.gov/fdsys/bulkdata/BILLS/114/2/hconres/BILLS... [3] https://www.gpo.gov/fdsys/bulkdata/BILLS/114/2/hconres/BILLS... [4] https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/114/sres/BILLS...




Another co-founder of Open Law Library, here. This is precisely what we are doing - building a patch-based xml database of the law. However, we are building a general tool that can work with the vast majority of state and local jurisdictions.

We can't build good tools without good data. The only way to get it is to work directly with governments and make it easier for them to publish their official laws as clean xml than to publish their laws as PDFs.

Revision control and the law deserves its own blog post. In addition to being patch-based, patches can be created today, but apply retroactively, or languish for years, then suddenly apply because a triggering event occurred.

Our system ingests official laws and outputs an xml version of the official law. A government attorney uses our IDE to review the xml output and annotate it with codification instructions. Our system then uses those instructions to automatically codify the law, which is then published openly on the web in multiple formats.

We have been rapidly iterating on our xml format. You can see the beta version for our first partner, the District of Columbia, here: https://github.com/dccouncil/dc-law-xml/tree/development (feedback welcome).

As we partner with more jurisdictions, we will build a foundation of open, clean, accurate, and timely computer-readable laws on which anybody can build tools to improve government, citizen engagement, and access to justice.


> In addition to being patch-based, patches can be created today, but apply retroactively, or languish for years, then suddenly apply because a triggering event occurred.

Hmm, interesting! I always assumed the patch applied immediately but the new law might contain some "effective z/y/z, ...".

This is rather unfortunate (of course not your fault), because as we all know rebasing is not necessarily conflict-free.


Thank you! I was unaware of any of this.

It is understanding that bills are patches, and thus the law works like darcs—patch-oriented rather than revision-oriented.

Does this sound correct to you? I arrived at this conclusion asking people who know nothing about VCS, so something mighthave been lost in translation.


Yes, and no. Each bill is subject to revisions, but once it is passed, it is a single patch – you could imagine that each bill is a branch in git, developed in commits one after another, and then the latest status is squashed and merged.


Yeah, that is what I meant. The revision of the bill would be some meta-history that doesn't quite fit the darcs metaphor.

I also hear the applying of all these patches is a slow manual process only done periodically? :|


Amendment updating is done nightly, and the results are on "congress.gov", which is the user-friendly access interface. The XML dump is the raw data, made available to the public.

The user guide for the XML data is on Github.[1]

[1] https://github.com/usgpo/bill-status/blob/master/BILLSTATUS-...


"ammendment updating" would be the meta-history of the bills themselves, right? I meant the applying passed and signed bills to the overall body of all. When is that done?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: