courtlistener | accessible archive of court data | Dataset library
kandi X-RAY | courtlistener Summary
kandi X-RAY | courtlistener Summary
Started in 2009, CourtListener.com is the main initiative of Free Law Project. The goal of CourtListener.com is to provide high quality data and services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a list of judges
- Make a GET query string
- Get a value from a mapping
- Make a title for a person
- Render the results of a search
- Check if the given request is a bot
- Returns a boolean indicating if the given bot matches a known bot
- Return the count of a stat
- Fetches the docket for the given fq
- View a person
- Get the title of a referer
- Process a RECAP claim
- Toggle Docket alert confirmation
- Process a RECAP ZIP archive
- Register a new user
- Process the Appellate Docket item
- Validates upload fields
- Returns a dictionary representation of the object
- Block the opinion for the given content
- Translates a string into Bankrupts
- Return a search list
- Return a search dictionary
- Runs the handler
- Check if the feed has changed
- Process email notification
- Parses a file into a dictionary
courtlistener Key Features
courtlistener Examples and Code Snippets
Community Discussions
Trending Discussions on courtlistener
QUESTION
I am trying to make Primary Source American Law more American with Disabilities Act (ADA), more compliant for my Study.
The technical question is in the topic.
The source files I am using are found here: https://www.courtlistener.com/api/bulk-data/opinions/wash.tar.gz
A sample JSON file within that archive (which contains 52,565 Washington State Supreme Court Judicial Opinions),
987095.json is an example with the following "elements" (I want to carry the element names over as column names while providing a new id for record count; rather than source database id column):
Using Dadroit Viewer 1.5 Build 1935.appimage to view the JSON data easiest for me.
I extracted the following data (the bottom opinions_cited has [] brackets with 0 - 28 in them; and I expect each JSON to have different numbers of opinions_cited ; anyone from 0 to 1000 or more perhaps); I don't know the most cases cited in a Judicial Opinion.
Extracted from JSON:
...ANSWER
Answered 2021-Nov-19 at 09:35Here is a fast solution using jq. It requires hardly any memory, but there is general caveat and one potential complication.
The caveat is that it has been assumed that the "joined_by" array can be flattened into a string using "; " as a separator.
The complication is that some CSV parsers require a "rectangular" structure. In the first potential solution below, the header that is generated will only take into account the length of the "opinions_cited" array in the first file that is presented. If later JSON files contain more "opinions_cited", the rows will still be correct, but the header will not take them into account.
If the header is an issue, then you might wish to consider a two-pass solution to avoid memory issues. As shown in Part 2 of this answer, the first pass would be responsible for determining the maximum array length, and in the second pass, this value would be used to determine the appropriate headers.
You might also wish to consider a post-processing "fixup".
For testing, I'd suggest using a truncated version of topKeys
, e.g.
QUESTION
I phrased this question in a specific manner, but I'm more interested in how one generally approaches the problem of figuring out the input parameters for an API. I am trying to filter by date_created__range for the option endpoint in this API and I can't figure out how it wants the date range formatted. They specify that they use the ISO-8601 format, but I have tried all the following to no avail:
- https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01--20-12-10
- https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01..20-12-10
- https://www.courtlistener.com/api/rest/v3/opinions/?date_created__range=2020-12-01/20-12-10
I've also tried with those date ranges reversed. All of these fail with the message "Enter a valid date/time."
I've even tried downloading the source code for the API and searching through it, but I haven't found anything relevant to this question. How would you go about figuring this out?
ANSWER
Answered 2020-Dec-23 at 13:52I tried this and it might be what you're looking for!
For reference on process, I just copied one of the dates they used in their example date_modified query
curl https://www.courtlistener.com/api/rest/v3/dockets/?court__date_modified__gt=2013-01-01T00:00:00Z
and added a second one separated by a comma, since you had already tried dashes, periods, and a slash.
QUESTION
I have ~400,000 JSON files. There is one key/value that I would like to extract into a .txt file for each JSON. (1 text file for each JSON. All JSON files are formatted the same.) I've looked into various options using python's pandas and json.loads, but I haven't been able to find a solution that works. (Below I'll include a shortened sample JSON file as an example, in case it's helpful. I want to extract "plain_text".)
...ANSWER
Answered 2020-Nov-08 at 00:31If your JSON is in the right format you can use JSON library to load the JSON as a dictionary and then each key in JSON is a key in the dictionary:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install courtlistener
You can use courtlistener like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page