Package: reporters-db
Background of the Free Law Reporters DatabaseA long, long time ago near a courthouse not too far away, people started
keeping books of every important opinion that was ever written. These
books became known asreportersand were generally created by
librarian-types of yore such asMr. William
CranchandAlex
Dallas.These people were busy for the next few centuries and createdthousandsof these books, culminating in what we know today as West’s
reporters or as regional reporters like the “Dakota Reports” or the
thoroughly-named, “Synopses of the Decisions of the Supreme Court of
Texas Arising from Restraints by Conscript and Other Military
Authorities (Robards).”In this repository we’ve taken a look at all these reporters and tried
to sort out what we know about them and convert that to data. This data
is available as a JSON file, as Python variables, and can be browsed in an
unofficial CSV (it’s usually out of date).Naturally, converting several centuries’ history into clean data results
in a mess, but we’ve done our best and this mess is in use in a number
of projects as listed below. As of version 3.2.32, this data contains information
about 1,167 reporters and 2,102 name variations.We hope you’ll find this useful to your endeavors and that you’ll share
your work with the community if you improve or use this work.Data SourcingThis project has been enhanced several times with data from several sources:The original data came from parsing the citation fields for millions of cases in CourtListener.A second huge push came from parsing metadata obtained from two major legal publishers, and by parsing the citation fields of Havard’s Case.law database.An audit was performed and additional fields were added by using regular expressions to find number-word-number strings in the entire Harvard Case.law database. The results of this were sorted by frequency, with the top omissions fixed.Along the way, small and subtle improvements have been made as gaps were identified and fixed.The result is that this database should thus be very complete when it comes to reporter abbreviations and variations. It has the data from CourtListener, two major legal publishers, and Harvard’s Case.law. Hundreds of hours have gone into this database to make it complete.Installation (Python)You can install the Free Law Reporters Database with a few simple
commands:pip install reporters-dbOf course, if you’re not using Python, the data is in thejsonformat, so you should be able to import it using your language of
choice. People occasionally play with converting this to other languages, but
no other implementations are presently known.APIUsing this database is pretty simple. As this is a database, here are no
public methods or classes, only variables. Importing any of these these
variables loads them all, including loading several JSON files from disk. It is
therefore recommended not to load these variables more than necessary.The simplest way to understand this data is to simply import these variables
and look at them.All variables are imported from the package root as follows:from reporters_db import REPORTERSThe available variables are:REPORTERS— This is the main database and contains a huge dict of reporters as described below.LAWS— Our database of statutory abbreviations, mapping the statute abbreviations to their metadata. For exampleArk. Regis the abbreviation for theArkansas Register.JOURNALS— Same idea asLAWS, but for legal journal abbreviations.STATE_ABBREVIATIONS— Bluebook style abbreviations for each state. For example,Ala.for Alaska andHaw.for Hawaii.CASE_NAME_ABBREVIATIONS— Bluebook style abbreviations for common words, mapping each abbreviation to a list of possible words. For example,Adminmaps to["Administrative", "Administration"].A few specialized reporter-related variables are:VARIATIONS_ONLY— This contains a dict mapping a canonical reporter abbreviation to a list of possible variations it could represent. For example,A. 2dsometimes incorrectly lacks a space, and has a variation list of["A.2d"].P.R.could be["Pen. &W.","P.R.R.","P."].EDITIONS— A simple dict to map the abbreviations for each reporter edition to the canonical reporter. For example,A.2dmaps toA..NAMES_TO_EDITIONS— A simple dict to map the name of a reporter back to its canonilcal abbreviations. For example,Atlantic Reportermaps to['A.','A.2d'].CSVYou can make a CSV of this data by running:make_csv.pyWe keep a copy of this CSV in this repository (reporters.csv), but
it is not kept up to date. It should, however, provide a good idea of
what’s here.Known ImplementationsThis work was originally deployed in theCourtListenercitation finder
beginning in about 2012. It has been used literally millions of times
to identify citations between cases.An extension for Firefox known as theFree Law
Ferretuses this code to find citations in your browser as you read things
– all over the Web.A Node module calledWalverineuses an
iteration of this code to find citations using the V8 JavaScript
engine.Additional usages can befound via Github.Some Notes on the DataSome things to bear in mind as you are examining the Free Law Reporters
Database:Each Reporter key maps to a list of reporters that that key can
represent. In some cases (especially in early reporters), the key is
ambiguous, referring to more than one possible reporter.Formats follow the Blue Book standard, with variations listed for
local rules and other ways lawyers abbreviate it over the years or
accidentally.Thevariationskey consists of data from local rules, found
through organic usage in our corpus and from theCardiff Index to
Legal Abbreviations. We
have used a dict for these values due to the fact that there can be
variations for each series.mlz_jurisdictioncorresponds to the work that is being done for
Multi-Lingual Zotero. This field is maintained by Frank Bennett and
may sometimes be missing values.Some reporters havehrefornotesfields to provide a link to
the best available reference (often Wikipedia) or to provide notes
about the reporter itself.Regarding dates of the editions, there are a few things to know. In
reporters with multiple series, if multiple volumes have the same
dates, this indicates that the point where one series ends and the
other begins is unknown. If an edition has 1750 as its start date,
this indicates that the actual start date is unknown. Likewise, if an
edition hasnullas its end date, that indicates the actual end
date is either unknown, or it’s known that the series has not
completed. These areas need research before we can release version
1.1 of this database. Finally, dates are inclusive, so the first and
last opinions in a reporter series have the same dates as the
database.A complete data point has fields like so:"$citation": [
    {
        "cite_type": "state|federal|neutral|specialty|specialty_west|specialty_lexis|state_regional|scotus_early",
        "editions": {
            "$citation": {
                "end": null,
                "regexes": [],
                "start": "1750-01-01T00:00:00"
            },
            "$citation 2d": {
                "end": null,
                "regexes": [],
                "start": "1750-01-01T00:00:00"
            }
        },
        "examples": [],
        "mlz_jurisdiction": [],
        "name": "",
        "variations": {},
        "notes": "",
        "href": "",
        "publisher": ""
    }
],The “regexes” field and regexes.json placeholdersThe “regexes” field can contain raw regular expressions to match a custom citation format,
or can contain placeholders to be substituted fromregexes.jsonusingpython Template formatting.If custom regexes are provided, the tests will require that all regexes match at least one
example inexamplesand that all examples match at least one regex.When adding a new regex it can be useful topip install exrexand run the testswithoutadding any examples to get a listing of potential citations that would be matched by the new
regex.state_abbreviationsandcase_name_abbreviationsfilesAbbreviations are based on data from the values in the nineteenth
edition of the Blue Book supplemented with abbreviations found in our
corpus.case_name_abbreviations.jsoncontains the abbreviations that are
likely to occur in the case name of an opinion.state_abbreviations.jsoncontains the abbreviations that are
likely to be used to refer to American states.Notes on Specific Data Point and ReferencesA good way to look up abbreviations is inPrince’s Bieber Dictionary
of Legal Abbreviations. You can find a lot of this book on Google Books,
but we have it as a PDF too. Just ask.Mississippi supports neutral citations, but does so in their own
format, as specified inthis
rule.
Research is needed for the format inreporters.jsonto see if it
is used accidentally as a variant of their rule or whether it is an
error in this database.New Mexico dates confirmed via thetable
here.Both Puerto Rico and “Pennsylvania State Reports, Penrose and Watts”
use the citation “P.R.”TestsWe have a few tests that make sure things haven’t completely broken.
They are automatically run by Travis CI each time a push is completed
and should be run by developers as well before pushing. They can be run
with:python tests.pyIt’s pretty simple, right?ReleasesUpdate setup.py, add a git tag to the commit with the version number, and push
to master. Be sure you have your tooling set up to push git tags. That’s often
not the default. Github Actions will push a release to PyPi if tests pass.LicenseThis repository is available under the permissive BSD license, making it
easy and safe to incorporate in your own libraries.Pull and feature requests welcome. Online editing in Github is possible
(and easy!)