Operation Decode San Francisco…Engage!

Tomorrow night, we’re launching Operation Decode San Francisco.  That’s right – open, user-friendly and restriction-free law is coming to the City by the Bay, served up to citizens with all the niceities of modern web design and delivered to developers with a delicious API.

A few weeks ago, we launched America’s first “Open Law City” in conjunction with the Mayor of Baltimore.  Now, this MVP – minimum viable product, that is – heads west to help the people of San Francisco access the law when they want and how they want…at zero cost to taxpayers.

It will all start – just like Baltimore – with a hackathon.  How can you get in on the action?  Read on!

Who: Generally Awesome People Living In or Around San Francisco

What: Join Team OpenGov, San Francisco Mayor’s Office of Civic Innovation, sf.citi, GitHub, Code for America’s SF Brigade & Other Generally Awesome People Living In or Around San Francisco for A Night of Open Law Hacking

Where: Code for America HQ – 155 9th Street, San Francisco, CA 94103

When: 6-9 PM PST

What to Prepare: At the start of the hackathon, lead OpenGov developer Chris Birk will give a quick rundown of how we have built off the awesome open source State Decoded project to create Open Law Cities.  Chris put together a handy “homework” assignment for hackers attending (below).

  1. Check out how we parsed the Municipal Code of Chicago
  2. Review the State/City Decoded XML Parsing Specifications
  3. Clone the San Francisco Administrative Code repo
  4. Parse the `AdminCode.TXT` file into separate files for each section according to the StateDecoded specification
    1. Separate the content based on a regex matching ‘CHAPTER #:’  (some chapters also have letters following the chapter number).  Regex may be something like ‘^CHAPTER\s(\d+[A-Z]*):\s*$’
    2. Separate the content based on a regex matching ‘SEC. #.#. [The Section Title]’.  Regex may be something like ‘^SEC. (\d+\.\d+-?\d*\.)\s(.*)$’
    3. Parse the section content into subsections based on matching the beginning of each line (ie. a, 1, A, etc.) and save the line identifier as the section prefix.
    4. Save an XML file for each section with the chapter information and section information included as specified.

Some additional background from the folks at Code for America is below.  Check out the event page and hope you’ll join us for Operation Decode San Francisco!

What’s Open Legislation?

SF will be one of the first cities to officially release its legislative codes in a technologist-friendly format as Open Data; for now, the data will be in the form of a “snapshot” of the most up to date legislative code, but the city is currently working with its publisher to automate the process by which the code will be pushed to the portal as it is updated.  In the future, this will allow platforms like GitHub to routinely download the code and enable developers to track changes over time, create deeper visualizations, etc. For the hack night, the city codes will be available in an RTF or HTML format ready for people to play with.

What can I work on at the hackathon?

While we do not know what specific uses or applications will be generated as a result of this effort, we anticipate the emergent technologies will increase overall accessibility of the administrative code and uncover new insights.  Examples include visualizations of changes of the legal code over time, identification of arcane legislation that needs revision, identification of what the “hot” areas of legislative code (those that undergo constant revision ) are, etc.

Are there cool examples of things that have been done with Open Legislation already?

http://dccode.org/

http://www.statedecoded.com/

http://chicagocouncilmatic.org/

http://clearcongressproject.com/

http://open.nysenate.gov/legislation/