2012-07-16
http://l4w.us free legal URL shortener now shortening links to the CFR
Currently, it works for Bills in Congress (back to the 104th Congress), U.S. Public Laws (ditto), the U.S. Code, the Federal Register (to 1995 for text, 1994 for tables of contents), and as of today, the Code of Federal Regulations.
These documents are available through the the Library of Congress's legislative information site, THOMAS, the U.S. Government Printing Office's "FDSys", The Legal Information Institute's U.S. Code and Code of Federal Regulations, and the online (though unfortunately, still unofficial) Federal Register.
If they're free sources, and the sites are easily searchable, why is an URL shortener necessary? Well, these sites, thankfully, are loaded with other features that make it difficult for them to offer clean, simple, and short URLs to access legal text.
For example, to get to Public Law 111-148, you need to go to:
http://www.gpo.gov/fdsys/pkg/PLAW-111publ148
That's not too complicated, and if you can remember the scheme, not such a big deal. What if you want to send someone a link to the text? You have to send them this:
http://www.gpo.gov/fdsys/pkg/PLAW-111publ148/html/PLAW-111publ148.htm
Not so easy. But why go through trying to remember that (or making a custom shortcut in your browser, or setting up a raft of unnecessary bit.ly links) when you can just type this:
http://l4w.us/PublicLaw/111-148 for the landing page or
http://l4w.us/PublicLaw/text/111-148 for the full text or
http://l4w.us/PublicLaw/pdf/111-148 for the PDF.
Alternatively, if you're used to legal citations or you can handle spaces in your URLs:
http://L4w.us/Pub. L. 111-148
http://L4w.us/Pub. L. 111-148 text, and
http://L4w.us/Pub. L. 111-148 pdf
will work too, with or without spaces. Hopefully, those are self-explanatory enough.
There are more examples at http://L4w.us for other legal materials.
So why has no one done this before? Honestly, I have no idea. Is it really necessary? Unless you're Rain Man, I think it can't hurt, especially if you want to send or show people links to primary (or close-to-primary) legal source material.
My main idea was to let people use L4w.us links as easy-to-remember shortcuts to public versions of our laws, so instead of going to the destination sites and searching, or trying to remember the multiple URL schemes, if you know what you're looking for (sorry, no search yet), just type it in and go.
I also put it together to help simplify ontolawgy™ LLC's bulk data downloading programs. The overhead on the server is minimal, so I thought I'd share. Feel free to use it, and tell people how it's going; use L4w.us links in blog posts, articles, theses, student projects, non-profit citizen-engagement applications/campaigns, etc. Just don't bake it into a commercial software or hardware (e.g., a book) application without permission.
Currently, the site doesn't offer any fancy features, and we don't plan to. But it also doesn't track you. We maintain basic access logs with IP addresses to make sure people aren't abusing the service (e.g., DDOS-ing it for some unknown reason or incorporating the service into commercial activity without a license), but other than that, whatever laws you look at are between you, the site providing the content, and whoever is monitoring your internet traffic.
Suggestions for how to improve the site which resources to add are most welcome here in the comments, on Twitter, or by email.
© 2012 Alex M. Hendler. All Rights Reserved.
*If you haven't picked up on it by now, technically, L4w.us is not really an URL-shortener, it's more like an API for people to access other (simple) people-facing APIs, but without scaring them away by calling it an API.
2012-05-15
How to eat legislative sausage
- Treat every textual division as a unique document, and allow it to be accessed via a unique URL based on its location in the government taxonomy (a - c in Mr. Bruce's overview).
- Store each descriptive element about that document in a tag/field. This includes official and unofficial “popular names” (e.g., the Social Security Act), section numbers within those popular names, section numbers of the U.S. Code, Public Law enacting provisions, etc. (c - g)
- Allow users to query on any of those elements. (a - g)
- Track duplicates and give them distinct records that are still retrieved in an appropriate way using their descriptive tags/fields. (a - d, g)
- Track each provision using its current designation, but maintain a full locative, temporal, and ontological history within the record and the system. (a - e, g) For example, 42 U.S.C. § 1320a-7b(b)(3)(I) used to be the second 42 U.S.C. 1320a-7b(b)(3)(H) that was enacted by Pub. L. 108-173 § 431 (the first subparagraph (H) was enacted by § 237 of the same Public Law); the system tracks all that information and allows users to query it and, e.g., gather together all historical versions of subparagraph (H) to track how it has changed over time.
matches most closely to the author's original intent... [and] fully describes the structure of the Code of Federal Regulations, including the large structure (chapters, parts, sections, etc.), the document structure (paragraphs, etc.), and semantic structure” then goes on to explain that the SGML indentation for subsections, paragraphs, subparagraphs, clauses, etc. have all been collapsed to a the same single tag. This means that every last bit of indentation/separation (except for line breaks) within each section—“sections” can be very long and complex, with multiple nested levels of semantically-relevant indentation—has been completely stripped from all publicly-available electronic materials. How is this supposed to help the public?
© 2012 Alex M. Hendler. All Rights Reserved.
2010-03-01
Brace yourself for "dense reading of the most tortuous kind"
If the bill is going to survive in roughly the same form in which the Senate passed it (i.e., likely its best hope for survival), then it is going to present a number of challenges to those who want to understand and implement it, as suggested in a previous post.
The first step in analyzing it is looking at the current laws that it would amend. Among the laws the bill would amend is the Social Security Act, which, among other things, governs Medicare and Medicaid. The bill would make significant changes to how Medicare and Medicaid are funded and reimburse for services. The U.S. Court of Appeals for 4th Circuit has characterized this body of law rather colorfully:
There can be no doubt but that the statutes and provisions in question, involving the financing of Medicare and Medicaid, are among the most completely impenetrable texts within human experience. Indeed, one approaches them at the level of specificity herein demanded with dread, for not only are they dense reading of the most tortuous kind, but Congress also revisits the area frequently, generously cutting and pruning in the process and making any solid grasp of the matters addressed merely a passing phase.Rehabilitation Ass'n of Va. v. Kozlowski, 42 F. 3d 1444, 1450 (4th Cir., 1994)
"Surely," you might think, "this must be judicial hyperbole." I can assure with great confidence that it is not.
For example, below is a simplified (and rather incomplete) 1-degree semantic map of the term "physician" as it appears in Section 1861 of the Social Security Act, based upon analytical information available on the ontolawgy™ platform. By "1-degree", I mean that the map tracks only direct relationships among element within a system, i.e., A -> B and relationships that A and B share with other elements.

On the right are the terms that require understanding of the term "physician" or that one must understand to understand the term "physician". On the left are the legal provisions—only within Section 1861—that are in some way related to the term "physician". Each of the lines in this diagram represents not only that a relationship exists between elements in the system, but also actually describes what the relationship is. Think of each line as a thought that a lawyer would need to have—consciously or not—in order to actually understand what a term or statutory provision means.
In some instances, it may require 4 or 5 "thoughts" to fully understand the relationship among the elements. The ontolawgy™ platform tracks those thoughts and places them into a searchable database.
If that's a "simplified" map, what does an unsimplified map look like? Well, because you asked so nicely, here's a 2-degree map; it tracks relationships beyond the first degree. For example, A -> B is a 1-degree relationship. A -> B -> C is a 2-degree relationship; the map also tracks common relationships among A, B, or C:

If these diagrams don't look particularly helpful to navigate or understand the law, don't worry: They're not supposed to be (at least not when presented as static images). They are supposed to represent the complexity and interconnectedness of elements of the law and to demonstrate the difficulty that a mere mortal lawyer might encounter when researching Medicare and Medicaid issues.
Now before you jump to any conclusions about the intellectual prowess of lawyers, remember that this diagram just relates to the term "physician" as used in Section 1861 of the Social Security Act. It does not address the term as it may appear in the other 108 sections of Title XVIII of the Social Security Act, nor does it address the term as it might be used in the context of Medicaid, nor in any of the millions of words (no exaggeration) of regulations, rules, Medicare and Medicaid manuals, and other statements of official policy. It may also help to bear in mind that Medicare and Medicaid regulate considerably more than just physicians.
I submit that anyone who can keep track of all of this in his or her head either has a beautiful mind or an unusual affinity for toothpicks. Let's just say that I don't have a little shed out back and I eat with a knife and fork....
© 2010 Alex M. Hendler. All Rights Reserved. No claim to original government works.
2010-01-08
Brobdingnagian, Leviathan, or just plain enormous?
That said, below are some potentially interesting statistics on the bill that the Senate passed (much of it based on automated analysis):
- Size
- As a plain text file, it is about 2.5 MB;
- The official PDF of the bill is about 4.3 MB;*
- The table of contents is 16 pages long;
- The bill is approximately 16,000 lines long;
- It contains approximately 379,638 words.
- Complexity
- It has 441 Sections of its own;
- It adds 173 new Sections to existing law;
- I doubt there is any religious significance, but that amounts to 614 sections altogether (one more than the number of commandments commonly held to exist in the Hebrew Bible), a fact that might be interesting to certain factions that oppose this legislation;
- It makes approximately 912 amendments to existing law;
- It mentions the "Social Security Act" 706 times;
- It mentions the "Public Health Service Act" 284 times;
- It mentions the "Internal Revenue Code" 195 times;
- It mentions the "Employee Retirement Income Security Act" (also known as ERISA) 25 times.
- Money
- It contains 360 dollar signs;
- It mentions numbers in unrounded millions (i.e., xxx,000,000) approximately 206 times;
- It mentions numbers in billions rounded to millions (i.e., xxx,xxx,000,000) approximately 39 times;
- Of those 39 times, it mentions numbers in unrounded billions (i.e., xxx,000,000,000) approximately 26 times.
Unfortunately, the straightforward solutions to the problem of securing universal health insurance coverage (i.e., mandate individual insurance purchases through imposition of a new income tax, refunded in part through vouchers to pay for such insurance, in part to subsidize insurance for those who could not otherwise afford it; get rid of preexisting condition exclusions; completely remove the federal antitrust exception for health insurance), are, for the most part, political non-starters.
While some of the complexity in health reform legislation may stem from earmarks or other concessions to bring certain legislators on board, I submit that a larger part comes from attempting to reach the same results as above in such convoluted—sorry, "creative"—ways that politicians can try to explain their way around the outcome in a manner that would allow them to get reelected.
There are some hints of what a "pared-down", passable bill might do, and while it could be a start, if that is what Congress ultimately does, it is still quite far from where we need to be, i.e., universal (but not necessarily unified, i.e., "single payer") coverage.
So, is Scott Brown's election a good or a bad thing for "health reform"? With that, I leave you to Federalist No. 10 and your own conclusions:
A zeal for different opinions concerning religion, concerning government, and many other points, as well of speculation as of practice; an attachment to different leaders ambitiously contending for pre-eminence and power; or to persons of other descriptions whose fortunes have been interesting to the human passions, have, in turn, divided mankind into parties, inflamed them with mutual animosity, and rendered them much more disposed to vex and oppress each other than to co-operate for their common good.
2009-12-23
What Congress could learn from farting phones
With the Senate inching ever closer to passing health care reform legislation, unless you’re working on the Hill or have a few dozen hours to dig through THOMAS to piece together what the most recent version of the health reform legislation actually does, you’re out of luck if you actually have the gall to want to read it.
There’s a November 19 version of the available from the previous link (H.R. 3590.AS), but you need to look at the “Bill summary and status file” (specifically, “All Congressional Actions with Amendments”) to see what has happened to the multiple amendments that Thomas reports have been made to the bill. Then you’ll have to manually insert the adopted amendments into the Nov. 19 text yourself and see what you can figure out has been done. There’s no freely available unified text as of this writing. Some commercial services may have independently produced unified text, but I don’t subscribe to any of those—nor should I have to to find out what my Congress is doing.
Given that Congress actually uses computers now (at least, that’s the rumor), it is thoroughly shameful that we, for whom the Representatives and Senators work, cannot actually see what they are doing until well after they’ve done it—a major problem in a Republic where the Representatives and Senators are supposed to represent our interests. It is also highly doubtful that the Representatives or Senators can see what they are doing if this is the system they are actually using to keep track of things. Fortunately, there is software—much of it free—that could help.
It is no coincidence that we speak of computer “code” just as we speak of legal “code”. Each is a set of relatively arcane instructions to a computer (silicon or human, respectively) to perform or not perform a certain set of actions within a defined framework. Each is typically comprised of complexly interconnected elements, yet remains readable and (somewhat) intelligible to experts in their respective fields.
Typically, when one speaks of human-readable computer code, one is describing “source code”, that is, a human-readable equivalent of what a programmer intends for a computer to do. Once the code is “compiled” for a particular type of microchip, a computer can run it. For example, multiple developers can work on a program to make an iPhone simulate flatulence. The program is split into different sections, and the developers can revise these sections, tracking each revision along the way, debating changes, and, in some cases, letting anyone in the world track progress on the developing source code through a public website. Once the code is complete, it is compiled, and can be used by an iPhone to everyone’s juvenile delight.
Similarly, legislation is “source code” that must be “compiled” (either into the Statutes at Large or in the U.S. Code, or both) after its passage to be applied (“run”) by the legal system (judges, lawyers, police, etc.). However, it is put together in person (for the most part), on paper (in large part), then transcribed into a computer system that (at least to the general public) seemingly simulates paper in many ways. Changes are rarely integrated in real time, instead, they are often posted as monolithic “amendments” (if the amendments are posted at all) and not integrated into a “live” version of the text. Typically, with complex legislation, its full text is not available until after it has been passed by the House and the Senate and signed by the President—too late for mere mortal citizens to do anything about it (e.g., talk to their Representatives or Senators).
The analogy is not as useful when taking it much further, so let’s stop there for the moment and get to the point:
The same free software that people can use to collaboratively make their phones fart could be used to draft complex legislation and share it—in real time—with the general public.
There is a trove of free, (relatively) easy to use software that is designed to track the minutest of changes to extraordinarily complex documents and share those changes—including all the history back to the original text—with the entire world. Git, CVS, subversion, Mercurial, take your pick.
Although THOMAS is an incredible resource, it still largely catalogues information as if it were written on vellum parchment with quills, bound together with catgut, horsehide glue, and a calfskin cover. It does give one some appreciation for the complexity of what Congress does, but as as legislation and the legislative process grow increasingly complex, THOMAS’s utility as a tool to extract meaningful information decreases dramatically. Hopefully THOMAS will git (or some equivalent) with the program soon.