Library for extracting ECHR data
Project description
echr extractor
This library contains functions to get ECHR data.
Version
Python 3.9
Contributors
Benjamin Rodrigues de Miranda |
Chloe Crombach |
Piotr Lewandowski |
Pranav Bapat |
running-machin |
shashankmc |
gijsvd |
How to install?
pip install echr-extractor
What are the functions?
get_echr
Gets all of the available metadata for echr cases from the HUDOC database.
Can be saved in a file or returned in-memory.
get_echr_extra
Gets all of the available metadata for echr cases from the HUDOC database.
On top of that downloads the full text for each case downloaded. Can be saved in a file or returned in-memory.
What are the parameters?
get_echr
Parameters:
- start_id: int, optional, default: 0 The id of the first case to be downloaded.
- end_id: int, optional, default: The maximum number of cases available The id of the last case to be downloaded.
- count: int, optional, default: None The number of cases to be downloaded, starting from the start_id.
- save_file: ['y', 'n'],optional, default 'y' Save metadata as a csv file in the data folder, or return as a Pandas DataFrame object in-memory.
get_echr_extra
- start_id: int, optional, default: 0 The id of the first case to be downloaded.
- end_id: int, optional, default: The maximum number of cases available The id of the last case to be downloaded.
- count: int, optional, default: None The number of cases to be downloaded, starting from the start_id.
- save_file: ['y', 'n'],optional, default 'y' Save metadata as a csv file in the data folder and the full_text as a json file, or return a Pandas DataFrame object and a list of dictionaries in-memory.
- threads: int, optional, default: 10 The full text download is a parallelizable process. This parameter determines the number of threads to be used in the download.
WARNING
If count is provided, the end_id will be set to start_id+count, overwriting any given end_id value.
WARNING
If count is provided, the end_id will be set to start_id+count, overwriting any given end_id value.
import echr_extractor as echr
Below are examples for in-file saving:
df, json = get_echr_extra(count=100,save_file='y',threads=10)
df = get_echr(start_id=1,save_file='y')
Below are examples for in-memory saving:
df, json = echr.get_echr_extra(start_id=20,end_id=3000,save_file='n')
df = echr.get_echr(start_id=1000,count=2000,save_file='n')
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
echr_extractor-1.0.2.tar.gz
(6.9 kB
view hashes)