Skip to main content

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

pranavnbapat
Pranav Bapat
running-machin
running-machin
Cloud956
Piotr Lewandowski
shashankmc
shashankmc
gijsvd
gijsvd

How to install?

pip install rechtspraak_extractor

What are the functions?

  • Rechtspraak Extractor
    1. get_rechtspraak
    2. Gets all the ECLIs and saves them in the CSV file or in-memory.
      It gets, ECLI, title, summary, updated date, link.
    3. get_rechtspraak_metadata
    4. Gets the metadata of the ECLIs created by above function and saves them in the new CSV file or in-memory.
      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?

    1. get_rechtspraak(max_ecli=100, sd='2022-05-01', ed='2022-10-01', save_file='y')
    2. Parameters:
      • max_ecli: int, optional
      • Maximum amount of ECLIs to retrieve
        Default: 100
      • 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
        n - Save data as a dataframe in-memory
    3. get_rechtspraak_metadata
      • save_file: ['y', 'n'], default 'y'
      • y - Save data as a CSV file in data folder
        n - Save data as a dataframe in-memory
      • 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

    Examples

    import rechtspraak_extractor as rex
    
    -----------------------------------------------------------------------------------------------------------------------
    
    # For rechtspraak
    
    # To get the rechtspraak data in a dataframe:
    df = rex.get_rechtspraak(max_ecli=100, sd='2022-08-01', save_file='n')  # Gets 100 ECLIs from 1st August 2022
    
    # To save rechtspraak data as a CSV file:
    rex.get_rechtspraak(max_ecli=100, sd='2022-08-01', save_file='y') 
    
    -----------------------------------------------------------------------------------------------------------------------
    
    # For rechtspraak metadata
    
    # To get metadata as a dataframe from rechtspraak data (as a dataframe):
    df_metadata = rex.get_rechtspraak_metadata(save_file='n', dataframe=df)
    
    # To get metadata as a dataframe from rechtspraak file (as a dataframe):
    df_metadata = rex.get_rechtspraak_metadata(save_file='n', filename='rechtspraak.csv')
    
    # To get metadata as a dataframe from rechtspraak data (saved as CSV file):
    rex.get_rechtspraak_metadata(save_file='y', dataframe=df)
    
    # To get metadata and save as a CSV file:
    rex.get_rechtspraak_metadata(save_file='y', filename='rechtspraak.csv')
    
    -----------------------------------------------------------------------------------------------------------------------
    
    # filename='rechtspraak.csv' - filename.csv is a file from the data folder created by get_rechtspraak method
    # dataframe=df - df is a dataframe created by get_rechtspraak method
    
    # Will not get any metadata
    df = rex.get_rechtspraak_metadata(save_file='n')
    
    # Will get the metadata of all the files in the data folder
    rex.get_rechtspraak_metadata(save_file='y')
    

    License

    License: Apache 2.0

    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


    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

    Source Distribution

    rechtspraak_extractor-1.5.2.tar.gz (22.5 kB view details)

    Uploaded Source

    Built Distribution

    rechtspraak_extractor-1.5.2-py3-none-any.whl (23.3 kB view details)

    Uploaded Python 3

    File details

    Details for the file rechtspraak_extractor-1.5.2.tar.gz.

    File metadata

    • Download URL: rechtspraak_extractor-1.5.2.tar.gz
    • Upload date:
    • Size: 22.5 kB
    • Tags: Source
    • Uploaded using Trusted Publishing? Yes
    • Uploaded via: twine/6.1.0 CPython/3.12.9

    File hashes

    Hashes for rechtspraak_extractor-1.5.2.tar.gz
    Algorithm Hash digest
    SHA256 c67479f16f1f9650eb1035d6c7c7e9652c0cc56c1e207cf373513a2fe3639a29
    MD5 c2a6b1ef8f44c751e12e2d28543c89a8
    BLAKE2b-256 7f1945a339979d8e8ac930bb7ce93eb4d8ce2ec7fbab2f8c0ef2e388ab01fb61

    See more details on using hashes here.

    Provenance

    The following attestation bundles were made for rechtspraak_extractor-1.5.2.tar.gz:

    Publisher: github-actions.yml on maastrichtlawtech/extraction_libraries

    Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

    File details

    Details for the file rechtspraak_extractor-1.5.2-py3-none-any.whl.

    File metadata

    File hashes

    Hashes for rechtspraak_extractor-1.5.2-py3-none-any.whl
    Algorithm Hash digest
    SHA256 5b1728fd207c644ceca7b8f930d960b8068df8b148df873bd336b55a8e5a92ae
    MD5 0584973897ad9e147e8f53a768b933f7
    BLAKE2b-256 c4da04ebb9f1a9dd00901582f506bd559c67b0fe940f61e1574cdbdbdc5b7815

    See more details on using hashes here.

    Provenance

    The following attestation bundles were made for rechtspraak_extractor-1.5.2-py3-none-any.whl:

    Publisher: github-actions.yml on maastrichtlawtech/extraction_libraries

    Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

    Supported by

    AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page