Skip to content

harvard-lil/cap-examples

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CAP examples

CircleCI

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

Table of Contents

Start here!

More examples

Interested in contributing your own examples?

  1. Fork this repository
  2. Install dependencies
  3. Add your work
  4. Make sure to add any requirements your project needs to requirements.in
  5. Run pip-compile --output-file requirements.txt requirements.in
  6. Add a link in the Examples section
  7. Create a pull request
  8. Receive gratitude (thank you so much!!)

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.

Downloading bulk data

Helper methods to download whitelisted bulk data

These example require the existence of an API key in settings.py. Follow the instructions above in the Using the API section to obtain one.

Download the Illinois dataset

(capexamples) $ fab get_cases_from_bulk:Illinois

Or, download the Arkansas dataset

(capexamples) $ fab get_cases_from_bulk:Arkansas

Download a dataset with casebody format as xml

(capexamples) $ fab get_cases_from_bulk:Illinois,data_format=xml

Install

These examples assume some python knowledge. We will be using python3. This code has been tested using Python 3.9.10. We will also be installing all our dependencies and working in a virtual environment.

$ python3 -mvenv venv
$ source venv/bin/activate
$ (venv) pip install -r requirements.txt

Set up!

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

To run jupyter notebook examples (i.e. any file ending in .ipynb):

(venv) $ jupyter notebook

About

Examples for getting started using https://case.law

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published