Welcome to the California Code of Regulations

The files in this directory are current as of MARCH 2013.

These files are an ALPHA RELEASE meant for developers. You are welcome to use these files without restriction, but please consult an official version of the code for anything important. Note well: these are large html files!

This data comes from the Barclay's West Official California Code of Regulations. You may browse the Official Code here:

http://ccr.oal.ca.gov/linkedslice/default.asp?SP=CCR-1000&Action=Welcome

We start with the "Complete CCR on CD-ROM":

http://barclaysccr.com/store/ccr_cdrom.html

The CD-ROM is issued six times per year. Our processing consists of the following steps:

1. When the raw disk comes in, we use the Barclay's interface to save each title as an RTF file. A directory is created for each disk and the RTF files are placed at the root level. The graphics are then placed in an img/tif subdirectory. You may find those releases here:

https://law.resource.org/pub/us/ccr/raw/

2. The TIFF images are converted to a png file, sized down to reflect the 72 ppi screen resolution as opposed to the 300 ppi paper resolution for the TIFF files.

3. We then process all the RTF files into valid HTML using "textutil" which is found on Mac OS X. Each graphic in the html file is then given a unique ID number based on the title and the sequence number of the image. We also update the link to the style sheet and create name references for each of the section numbers. You will find our script here:

https://law.resource.org/pub/us/ccr/raw/process.sh

4. A manual process is then used to map the TIFF images to their proper location in the code. In some cases, we are unable to find the image in the graphics directory distributed with the CD-ROM. In that case, we manually find the appropriate graphic in either the official web site or in a paper distribution of the Code.

https://law.resource.org/pub/us/ccr/raw/graphic.mapping.txt

The reason we have to do this process is because there is no link between a graphic and the position in the code available except inside of the proprietary portion of West's user interface. Since we only extract the publicly available text, we are forced to map the graphics manually.

5. A script is then run to turn the graphic mapping file into a shell script, which is then run to update the links in the HTML files:

https://law.resource.org/pub/us/ccr/raw/mk.images.sh
https://law.resource.org/pub/us/ccr/raw/graphic.mapping.sh

6. Another script is run that replaces the png files with svg files for those that we have.

Our goal in all cases is to create a one-way, repeatable transformation. This means that we can take an RTF file, re-run the scripts, and come up with the same HTML file. In the future, we may loosen these restrictions.

Please understand that this is an initial developer release. It is our hope that people will take this data and use it to construct systems that have user navigation, that allow display of subsections of the code instead of full titles, as well as other modern features.

In addition to processing the ongoing updates to the CCR, there are two activities that are currently underway to increase the usability of the system:

  1. Converting the images from TIF files to more usable formats, including conversion of the formulas to MATHML, the illustrations to SVG, tabular material to HTML text to be included, and (where appropriate) forms-based material to fill-in PDF files or other formats. You can find these materials in the html and svg subdirectories.
  2. The inclusion of any technical materials that have been duly and legally incorporated by reference into the code.

We will also be moving Title 24 (the Building and other public safety codes) into this area. For now, you can find that information here:

https://law.resource.org/pub/us/code/bsc.ca.gov/

Please let us know if you have any suggestions or find any bugs.

Carl Malamud (carl@media.org)
Public.Resource.Org
Last Updated:4/17/2013