Library for extracting rechtspraak data
Project description
Rechtspraak extractor
This library contains two functions to get rechtspraak data and metadata from the API.
Version
Python 3.9+
Contributors
|
Pranav Bapat |
running-machin |
Piotr Lewandowski |
shashankmc |
gijsvd |
How to install?
pip install rechtspraak_extractor
What are the functions?
get_rechtspraak
Gets all the ECLIs and saves them in the CSV file or in-memory.
get_rechtspraak_metadata
Gets the metadata of the ECLIs created by above function and saves them in the new CSV file or in-memory.
It gets, ECLI, title, summary, updated date, link.
Link attribute that we get from the above function contains the links of ECLI metadata.
It gets instantie, datum uitspraak, datum publicatie, zaaknummer, rechtsgebieden, bijzondere kenmerken, inhoudsindicatie, and vindplaatsen
What are the parameters?
- get_rechtspraak(max_ecli=100, sd='2022-05-01', ed='2022-10-01', save_file='y') Parameters:
- max_ecli: int, optional Maximum amount of ECLIs to retrieve
- sd: date, optional, default '2022-08-01' The start publication date (yyyy-mm-dd)
- ed: date, optional, default current date The end publication date (yyyy-mm-dd)
- save_file: ['y', 'n'], default 'y' y - Save data as a CSV file in data folder
get_rechtspraak_metadata- save_file: ['y', 'n'], default 'y' y - Save data as a CSV file in data folder
- dataframe: dataframe, optional Dataframe containing ECLIs to retrieve metadata. Cannot be combined with filename
- filename: string, optional CSV file containing ECLIs to retrieve metadata. Cannot be combined with dataframe
Default: 100
n - Save data as a dataframe in-memory
n - Save data as a dataframe in-memory
Examples
import rechtspraak_extractor as rex
# Get rechtspraak data as a DataFrame (100 ECLIs since 2022-08-01)
df = rex.get_rechtspraak(max_ecli=100, sd="2022-08-01", save_file="n")
# Save rechtspraak data directly to CSV in the data/ folder
rex.get_rechtspraak(max_ecli=100, sd="2022-08-01", save_file="y")
# Get metadata into a DataFrame from an existing DataFrame
df_metadata = rex.get_rechtspraak_metadata(save_file="n", dataframe=df)
# Get metadata into a DataFrame from a CSV produced by get_rechtspraak
df_metadata = rex.get_rechtspraak_metadata(save_file="n", filename="rechtspraak.csv")
# Produce metadata CSV from an in-memory DataFrame
rex.get_rechtspraak_metadata(save_file="y", dataframe=df)
# Produce metadata CSV from files already in data/ (processes all files)
rex.get_rechtspraak_metadata(save_file="y")
- filename
rechtspraak.csvrefers to a file in thedata/folder created byget_rechtspraak. dfis the DataFrame returned byget_rechtspraak.
License
Previously under the MIT License, as of 28/10/2022 this work is licensed under a Apache License, Version 2.0.
Apache License, Version 2.0
Copyright (c) 2022 Maastricht Law & Tech Lab
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rechtspraak_extractor-1.5.3.tar.gz.
File metadata
- Download URL: rechtspraak_extractor-1.5.3.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb2af7013b90eda348de99acd6487d90b8781295e77a1e1cb4107582513b179
|
|
| MD5 |
8ca26298dd6bef46f47868ae37487b1b
|
|
| BLAKE2b-256 |
1e0764da7f83cc50ef9658acd32cf2941d9210a434e011d55a982b858f35cdb6
|
Provenance
The following attestation bundles were made for rechtspraak_extractor-1.5.3.tar.gz:
Publisher:
github-actions.yml on maastrichtlawtech/rechtspraak-extractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rechtspraak_extractor-1.5.3.tar.gz -
Subject digest:
0eb2af7013b90eda348de99acd6487d90b8781295e77a1e1cb4107582513b179 - Sigstore transparency entry: 604919406
- Sigstore integration time:
-
Permalink:
maastrichtlawtech/rechtspraak-extractor@2e7c89b259c4f5d86b2e6248d8adcaa2b48c6129 -
Branch / Tag:
refs/tags/v1.5.3 - Owner: https://github.com/maastrichtlawtech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
github-actions.yml@2e7c89b259c4f5d86b2e6248d8adcaa2b48c6129 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rechtspraak_extractor-1.5.3-py3-none-any.whl.
File metadata
- Download URL: rechtspraak_extractor-1.5.3-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed45c500db6852a23f873e54c5ce4f9f12b52b440fa97d4c26de613e24a00613
|
|
| MD5 |
030e381db055ad03ebd1997612fb560d
|
|
| BLAKE2b-256 |
7a20c2e6011ff427502e5f245a61a56fe7455a576f2a95d67ad083601d5017ca
|
Provenance
The following attestation bundles were made for rechtspraak_extractor-1.5.3-py3-none-any.whl:
Publisher:
github-actions.yml on maastrichtlawtech/rechtspraak-extractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rechtspraak_extractor-1.5.3-py3-none-any.whl -
Subject digest:
ed45c500db6852a23f873e54c5ce4f9f12b52b440fa97d4c26de613e24a00613 - Sigstore transparency entry: 604919409
- Sigstore integration time:
-
Permalink:
maastrichtlawtech/rechtspraak-extractor@2e7c89b259c4f5d86b2e6248d8adcaa2b48c6129 -
Branch / Tag:
refs/tags/v1.5.3 - Owner: https://github.com/maastrichtlawtech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
github-actions.yml@2e7c89b259c4f5d86b2e6248d8adcaa2b48c6129 -
Trigger Event:
push
-
Statement type: