Examples for getting started using https://case.law
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api_wordsearch
bulk_extract
config
map_courts
tests
.gitignore
.travis.yml
LICENSE
README.md
__init__.py
fabfile.py
requirements.in
requirements.txt
utils.py

README.md

CAP examples

A repository of examples of what can be done with Caselaw Access Project data.

3.5.4 is the python version we're currently using on CAP, so to keep things simple, we'll be using the same version for these examples.

We recommend installing pyenv — follow instructions to install here.

Install your python version using pyenv and activate your virtual environment:

$ pyenv install 3.5.4 
$ pyenv 3.5.4 capexamples
$ pyenv activate capexamples
(capexamples) $ 

Set up!

(capexamples) $ pip install -r requirements.txt && fab setup

Downloading bulk data

Helper methods to download whitelisted bulk data

Download the Illinois dataset

(capexamples) $ fab get_cases_from_bulk:Illinois

Or, download the Arkansas dataset

(capexamples) $ fab get_cases_from_bulk:Arkansas

Using the API

Read our API documentation.

In order to download non-whitelisted cases, you must register for an API key.

Once you have your API key, copy and paste it into your secret keys file settings.py.

Projects

  • bulk_case_extract - Get cases from our api's /bulk endpoint. Extract cases into a dataframe.
  • api_wordsearch - Get cases that include a search word, using the API. This requires an API key.
  • map_courts - Map all the courts on a U.S. map.