Command-line tool that extracts structured data about all of the US Supreme Court Cases since 2000
Last updated 22 days ago by davesag .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install wikiscores -g
SYNC missed versions from official npm registry.


A Command-line tool that extracts structured data about all of the US Supreme Court Cases since 2000. Developed for my brother to use to harvest some data.


  • Node JS brew install node or brew install nvm then nvm install 12.18.2 (or whatever is the most recent LTS version)


Install wikiscores as a global module as follows:

npm i -g wikiscores

Simple Usage

From a Terminal run


This will go to the Lists_of_United_States_Supreme_Court_cases page in wikipedia and get a list of all of the 'Term Opinions'. And for Each 'Term Opinion' it grabs the 'Cases', and for each Case it grabs some statistical data.


  1. By default it will write it to a file output.csv but you can specify the relative file path via the -o flag.
  2. You can rate limit it with the -r option to specify the max number of requests per second.
  3. You can limit the concurrency with the -c option to restrict the number of simultaneous requests.
  4. You can filer for a specific case name with the -f option. (replace spaces with _)
wikiscores -o some/other/output.csv -r 10 -c 2 -f Bush_v._Palm_Beach_County


wikiscores --help

for more info.


Fork this repo and use the forked-git-flow process as outlined in the Contributing notes.


Branch Tests Code Coverage Audit Comments
develop CircleCI codecov Vulnerabilities Latest Staging Release
master CircleCI codecov Vulnerabilities Latest Production Release

Functional Requirements

Scrape a list of Term Opinions from a list of US Supreme Court Cases, and from each one grab a list of individual cases. For each case grab data in the form:

  "term": 2002, // the term year
  "title": "Some title",
  "defaultSort": "Some default sort title",
  "length": 100, // the length of the article in bytes
  "articleId": 12345, // the numeric article id
  "contentModel": "wikitext",
  "watchers": 33, // The number of watchers, or the phrase 'Fewer than 30 watchers'
  "edits": 22, //number of edits
  "recentEdits": 20, // number of recent edits
  "monthCount": 55, // number of reads in the last month
  "createdAt": '2010-12-28T19:35:00.000Z', // date created in Zulu Time format"
  "creator": "The username of the original editor",

Test it

  • npm test — runs the unit tests (quick, runs offline)
  • npm test:unit:cov — runs the unit tests with code coverage
  • npm run test:mutants — runs the mutation tests

Lint it

npm run lint


Please see the contributing notes.

Current Tags

  • 1.1.4                                ...           latest (22 days ago)

10 Versions

  • 1.1.4                                ...           22 days ago
  • 1.1.3                                ...           9 months ago
  • 1.1.2                                ...           9 months ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 22
Dependencies (12)
Dependents (0)

Copyright 2014 - 2016 © |