Live data from Hacker News

The entire US Code is now online in XML

uscodebeta.house.gov

51–60 of 244 posts

Re: The entire US Code is now online in XML

#51
post #18

Earlier quoted context omitted.

As the schema guide explains, in 1999 they picked XML based on the study from 1996: "Following a 1999 feasibility study on XML/SGML, the Committee on House Administration adopted XML as a data standard for the exchange of legislative documents" http://uscodebeta.house.gov/download/resources/USLM-User-Gui... It took the US Govt 17 years to release 200,000 pages of the US code in XML.

I think the most time consuming part of the conversion is from text to digital. That's what took so long. Interchanging formats should be relatively easy. Back in 1999, json wasn't even around. IMO in today's API centric, and javascript ruled world. json would be a lot more useful.

Given that it can be mechanically converted to JSON, I have a hard time seeing how JSON would be a lot more useful. "Very slightly more convenient" seems like the most we could reasonably say.

Re: The entire US Code is now online in XML

#52

now if the same could be provided for bills(ideally before they are voted on), and that should go in github or something.

Maybe try to organize some tech-minded staffers on the hill? Get them to put bills onto a github repo when they are made public, maybe even XMLizing it to make it more exposed to machine analysis. It'd be a huge step in congressional transparency, especially now that bills are going into the high hundreds and thousands of pages (not a dig at the healthcare bill in particular, just a trend).

Well it looks like the sunlight foundation has done some nice work in this area, but as far as I can tell these are all bills that have made it to vote. http://www.opencongress.org/bill/all

Whereas, I would like to see the drafts and how they progress behind closed doors with all the lobbying influence.

Re: The entire US Code is now online in XML

#53
Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to 'interpret' this code nondeterministically by many different means including its 'spirit,' admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately.

In short, that allows a lawyer to answer almost any question with "it depends," and start billing.

Re: The entire US Code is now online in XML

#54

It's tragic that the United States (Federal) Legislative Model (USLM) is defined in terms of W3C XML Schema Definition language (XSD) instead of the comparably sane RELAX NG and its easily interpreted compact syntax. You would think that something this important ought to be made clear and understandable. EDITED TO CLARIFY: The tragic part isn't that the schema is given in XSD but that it's defined in XSD, which lacks…

In practice, it probably doesn't make any difference. Assuming, for the sake of argument, that XSD is expressive enough to allow the authors to say what they're trying to say, in an unambiguous way, it's more or less a moot point. RELAX/NG is awesome, sure... but to some extent the "war" between it and XSD is a religious war.

Pretty much every popular & widely used language / platform has XSD support... hell, it's so commonplace there are probably schema aware xml parsers in Brainfuck, INTERCAL and Befunge.

RELAX NG may well be a better choice, but saying this is "tragic" strikes me as a bit of excessive hyperbole.

Re: The entire US Code is now online in XML

#55
Putting something online is very different than actually getting meaning out of it. I'm afraid that this will push us towards more laws rather than less. But... Perhaps there will be good machine learning apps that can make sense out of all the contradictions.

Re: The entire US Code is now online in XML

#56
post #33

Earlier quoted context omitted.

Agreed, for long running data sets you really want schemas.

There are Json schema implementations out there.

There are but XML schemas are well understood, standardized and have been around for a long time. Even if they did this project today, XML is the right choice due to its maturity and suitability for documents.

Re: The entire US Code is now online in XML

#57

Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to 'interpret' this code nondeterministically by many different means including its 'spirit,' admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately. In short, that allows a lawyer to answer almost any question with "it depends," and start billing.

You make this sound like a bad thing. Would you really prefer "black and white" laws that leave zero room for flexibility or interpretation in light of a given situation?

Re: The entire US Code is now online in XML

#58
post #24

Earlier quoted context omitted.

I was under the impression law is essentially "append only". New laws override existing laws, but the text of the existing law never changes.

Laws are essentially diffs against the US code. The diff (slip law) is canonical. They are continually compiled into the US code, which can involve deleting or changing text just like a diff, and periodically an edited, annotated code is published. After a certain amount of time, Congress enacts a portion of the published code, making it canonical and overriding any prior slip law. See: http://en.wikipedia.org/wiki/U…

Interesting: http://uscode.house.gov/codification/legislation.shtml

Re: The entire US Code is now online in XML

#59

This actually makes law accessible to the technologically-savvy out there, and is going to launch a thousand apps giving specialized legal advice. This could in turn mean a reduction in the cost of litigation, which would hopefully be passed on to the rest of us. Hopefully I won't get sued for that statement.

or, after people get burned a few times with bad legal advice from those apps, it'd drive up demand for actual legal advice.

Re: The entire US Code is now online in XML

#60

This is pretty awesome, and if it were in git/hg would have the ability to write a 'blame' tool to figure out who voted on the part of the law that is pissing you off :-)

You can already do this - Congressional voting records are publicly available. However, even if you correlated these records with specific legislation, you would be making a dangerous mistake by missing the big picture.

Many laws are passed jn bundles and require compromise. Just because your Senator voted to support farm subsidies, doesn't mean he likes them - it just means he wanted a minimum wage increase to pass more.

Post reply on HN