rechtspraak-extractor


Namerechtspraak-extractor JSON
Version 1.1.21 PyPI version JSON
download
home_page
SummaryLibrary for extracting rechtspraak data
upload_time2023-10-03 08:47:26
maintainer
docs_urlNone
authorLawTech Lab
requires_python
licenseMIT
keywords rechtspraak extractor rechtspraak extractor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Rechtspraak extractor
This library contains two functions to get rechtspraak data and metadata from the API.

## Version
Python 3.9

## Contributors

<!-- readme: contributors,gijsvd -start -->
<table>
<tr>
    <td align="center">
        <a href="https://github.com/pranavnbapat">
            <img src="https://avatars.githubusercontent.com/u/7271334?v=4" width="100;" alt="pranavnbapat"/>
            <br />
            <sub><b>Pranav Bapat</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/running-machin">
            <img src="https://avatars.githubusercontent.com/u/60750154?v=4" width="100;" alt="running-machin"/>
            <br />
            <sub><b>running-machin</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/Cloud956">
            <img src="https://avatars.githubusercontent.com/u/24865274?v=4" width="100;" alt="Cloud956"/>
            <br />
            <sub><b>Piotr Lewandowski</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/shashankmc">
            <img src="https://avatars.githubusercontent.com/u/3445114?v=4" width="100;" alt="shashankmc"/>
            <br />
            <sub><b>shashankmc</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/gijsvd">
            <img src="https://avatars.githubusercontent.com/u/31765316?v=4" width="100;" alt="gijsvd"/>
            <br />
            <sub><b>gijsvd</b></sub>
        </a>
    </td>
</tr>
</table>
<!-- readme: contributors,gijsvd -end -->

## How to install?
<code>pip install rechtspraak_extractor</code>

## What are the functions?
<li><b>Rechtspraak Extractor</b>
<ol>
    <li><code>get_rechtspraak</code></li>
    Gets all the ECLIs and saves them in the CSV file or in-memory.
    <br>It gets, ECLI, title, summary, updated date, link.
    <li><code>get_rechtspraak_metadata</code></li>
    Gets the metadata of the ECLIs created by above function and saves them in the new CSV file or in-memory.
    <br>Link attribute that we get from the above function contains the links of ECLI metadata.
    <br>It gets instantie, datum uitspraak, datum publicatie, zaaknummer, rechtsgebieden, bijzondere kenmerken, 
    inhoudsindicatie, and vindplaatsen
</ol> </li>

## What are the parameters?
<ol>
    <li><strong>get_rechtspraak(max_ecli=100, sd='2022-05-01', ed='2022-10-01', save_file='y')</strong></li>
    <strong>Parameters:</strong>
    <ul>
        <li><strong>max_ecli: int, optional</strong></li>
        Maximum amount of ECLIs to retrieve
        <br>Default: 100
        <li><strong>sd: date, optional, default '2022-08-01'</strong></li>
        The start publication date (yyyy-mm-dd)
        <li><strong>ed: date, optional, default current date</strong></li>
        The end publication date (yyyy-mm-dd)
        <li><strong>save_file: ['y', 'n'], default 'y'</strong></li>
        y - Save data as a CSV file in data folder
        <br>n - Save data as a dataframe in-memory
    </ul>
    <li><code>get_rechtspraak_metadata</code></li>
    <ul>
        <li><strong>save_file: ['y', 'n'], default 'y'</strong></li>
        y - Save data as a CSV file in data folder
        <br>n - Save data as a dataframe in-memory
        <li><strong>dataframe: dataframe, optional</strong></li>
        Dataframe containing ECLIs to retrieve metadata. Cannot be combined with filename
        <li><strong>filename: string, optional</strong></li>
        CSV file containing ECLIs to retrieve metadata. Cannot be combined with dataframe
    </ul>
</ol>


## 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](https://img.shields.io/github/license/maastrichtlawtech/extraction_libraries)](https://opensource.org/licenses/Apache-2.0)

Previously under the [MIT License](https://opensource.org/licenses/MIT), as of 28/10/2022 this work is licensed under a [Apache License, Version 2.0](https://opensource.org/licenses/Apache-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.
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "rechtspraak-extractor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rechtspraak,extractor,rechtspraak extractor",
    "author": "LawTech Lab",
    "author_email": "pranav.bapat@student.maastrichtuniversity.nl",
    "download_url": "https://files.pythonhosted.org/packages/0d/57/4acc76a0e33309f4b368542c7a77c841e11a57eb11b37e62ca47651667de/rechtspraak_extractor-1.1.21.tar.gz",
    "platform": null,
    "description": "## Rechtspraak extractor\r\nThis library contains two functions to get rechtspraak data and metadata from the API.\r\n\r\n## Version\r\nPython 3.9\r\n\r\n## Contributors\r\n\r\n<!-- readme: contributors,gijsvd -start -->\r\n<table>\r\n<tr>\r\n    <td align=\"center\">\r\n        <a href=\"https://github.com/pranavnbapat\">\r\n            <img src=\"https://avatars.githubusercontent.com/u/7271334?v=4\" width=\"100;\" alt=\"pranavnbapat\"/>\r\n            <br />\r\n            <sub><b>Pranav Bapat</b></sub>\r\n        </a>\r\n    </td>\r\n    <td align=\"center\">\r\n        <a href=\"https://github.com/running-machin\">\r\n            <img src=\"https://avatars.githubusercontent.com/u/60750154?v=4\" width=\"100;\" alt=\"running-machin\"/>\r\n            <br />\r\n            <sub><b>running-machin</b></sub>\r\n        </a>\r\n    </td>\r\n    <td align=\"center\">\r\n        <a href=\"https://github.com/Cloud956\">\r\n            <img src=\"https://avatars.githubusercontent.com/u/24865274?v=4\" width=\"100;\" alt=\"Cloud956\"/>\r\n            <br />\r\n            <sub><b>Piotr Lewandowski</b></sub>\r\n        </a>\r\n    </td>\r\n    <td align=\"center\">\r\n        <a href=\"https://github.com/shashankmc\">\r\n            <img src=\"https://avatars.githubusercontent.com/u/3445114?v=4\" width=\"100;\" alt=\"shashankmc\"/>\r\n            <br />\r\n            <sub><b>shashankmc</b></sub>\r\n        </a>\r\n    </td>\r\n    <td align=\"center\">\r\n        <a href=\"https://github.com/gijsvd\">\r\n            <img src=\"https://avatars.githubusercontent.com/u/31765316?v=4\" width=\"100;\" alt=\"gijsvd\"/>\r\n            <br />\r\n            <sub><b>gijsvd</b></sub>\r\n        </a>\r\n    </td>\r\n</tr>\r\n</table>\r\n<!-- readme: contributors,gijsvd -end -->\r\n\r\n## How to install?\r\n<code>pip install rechtspraak_extractor</code>\r\n\r\n## What are the functions?\r\n<li><b>Rechtspraak Extractor</b>\r\n<ol>\r\n    <li><code>get_rechtspraak</code></li>\r\n    Gets all the ECLIs and saves them in the CSV file or in-memory.\r\n    <br>It gets, ECLI, title, summary, updated date, link.\r\n    <li><code>get_rechtspraak_metadata</code></li>\r\n    Gets the metadata of the ECLIs created by above function and saves them in the new CSV file or in-memory.\r\n    <br>Link attribute that we get from the above function contains the links of ECLI metadata.\r\n    <br>It gets instantie, datum uitspraak, datum publicatie, zaaknummer, rechtsgebieden, bijzondere kenmerken, \r\n    inhoudsindicatie, and vindplaatsen\r\n</ol> </li>\r\n\r\n## What are the parameters?\r\n<ol>\r\n    <li><strong>get_rechtspraak(max_ecli=100, sd='2022-05-01', ed='2022-10-01', save_file='y')</strong></li>\r\n    <strong>Parameters:</strong>\r\n    <ul>\r\n        <li><strong>max_ecli: int, optional</strong></li>\r\n        Maximum amount of ECLIs to retrieve\r\n        <br>Default: 100\r\n        <li><strong>sd: date, optional, default '2022-08-01'</strong></li>\r\n        The start publication date (yyyy-mm-dd)\r\n        <li><strong>ed: date, optional, default current date</strong></li>\r\n        The end publication date (yyyy-mm-dd)\r\n        <li><strong>save_file: ['y', 'n'], default 'y'</strong></li>\r\n        y - Save data as a CSV file in data folder\r\n        <br>n - Save data as a dataframe in-memory\r\n    </ul>\r\n    <li><code>get_rechtspraak_metadata</code></li>\r\n    <ul>\r\n        <li><strong>save_file: ['y', 'n'], default 'y'</strong></li>\r\n        y - Save data as a CSV file in data folder\r\n        <br>n - Save data as a dataframe in-memory\r\n        <li><strong>dataframe: dataframe, optional</strong></li>\r\n        Dataframe containing ECLIs to retrieve metadata. Cannot be combined with filename\r\n        <li><strong>filename: string, optional</strong></li>\r\n        CSV file containing ECLIs to retrieve metadata. Cannot be combined with dataframe\r\n    </ul>\r\n</ol>\r\n\r\n\r\n## Examples\r\n```\r\nimport rechtspraak_extractor as rex\r\n\r\n-----------------------------------------------------------------------------------------------------------------------\r\n\r\n# For rechtspraak\r\n\r\n# To get the rechtspraak data in a dataframe:\r\ndf = rex.get_rechtspraak(max_ecli=100, sd='2022-08-01', save_file='n')  # Gets 100 ECLIs from 1st August 2022\r\n\r\n# To save rechtspraak data as a CSV file:\r\nrex.get_rechtspraak(max_ecli=100, sd='2022-08-01', save_file='y') \r\n\r\n-----------------------------------------------------------------------------------------------------------------------\r\n\r\n# For rechtspraak metadata\r\n\r\n# To get metadata as a dataframe from rechtspraak data (as a dataframe):\r\ndf_metadata = rex.get_rechtspraak_metadata(save_file='n', dataframe=df)\r\n\r\n# To get metadata as a dataframe from rechtspraak file (as a dataframe):\r\ndf_metadata = rex.get_rechtspraak_metadata(save_file='n', filename='rechtspraak.csv')\r\n\r\n# To get metadata as a dataframe from rechtspraak data (saved as CSV file):\r\nrex.get_rechtspraak_metadata(save_file='y', dataframe=df)\r\n\r\n# To get metadata and save as a CSV file:\r\nrex.get_rechtspraak_metadata(save_file='y', filename='rechtspraak.csv')\r\n\r\n-----------------------------------------------------------------------------------------------------------------------\r\n\r\n# filename='rechtspraak.csv' - filename.csv is a file from the data folder created by get_rechtspraak method\r\n# dataframe=df - df is a dataframe created by get_rechtspraak method\r\n\r\n# Will not get any metadata\r\ndf = rex.get_rechtspraak_metadata(save_file='n')\r\n\r\n# Will get the metadata of all the files in the data folder\r\nrex.get_rechtspraak_metadata(save_file='y')\r\n```\r\n\r\n\r\n## License\r\n[![License: Apache 2.0](https://img.shields.io/github/license/maastrichtlawtech/extraction_libraries)](https://opensource.org/licenses/Apache-2.0)\r\n\r\nPreviously under the [MIT License](https://opensource.org/licenses/MIT), as of 28/10/2022 this work is licensed under a [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0).\r\n```\r\nApache License, Version 2.0\r\n\r\nCopyright (c) 2022 Maastricht Law & Tech Lab\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n    \r\n    http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for extracting rechtspraak data",
    "version": "1.1.21",
    "project_urls": {
        "Bug Tracker": "https://github.com/maastrichtlawtech/extraction_libraries",
        "Build Source": "https://github.com/maastrichtlawtech/extraction_libraries"
    },
    "split_keywords": [
        "rechtspraak",
        "extractor",
        "rechtspraak extractor"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d574acc76a0e33309f4b368542c7a77c841e11a57eb11b37e62ca47651667de",
                "md5": "3735ac9ebe3d34c866da00558089cd7d",
                "sha256": "858de7c992a1001e780a086667aa00173fb6c52a9ec17b788a52a4defd9e003f"
            },
            "downloads": -1,
            "filename": "rechtspraak_extractor-1.1.21.tar.gz",
            "has_sig": false,
            "md5_digest": "3735ac9ebe3d34c866da00558089cd7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10618,
            "upload_time": "2023-10-03T08:47:26",
            "upload_time_iso_8601": "2023-10-03T08:47:26.396063Z",
            "url": "https://files.pythonhosted.org/packages/0d/57/4acc76a0e33309f4b368542c7a77c841e11a57eb11b37e62ca47651667de/rechtspraak_extractor-1.1.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 08:47:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maastrichtlawtech",
    "github_project": "extraction_libraries",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "rechtspraak-extractor"
}
        
Elapsed time: 0.27040s