Download and parse parliamentary documents from the Dutch Lower House website
Project description
Search for official documents of the Dutch Lower House (Tweede Kamer) and extract relevant data.
Note that this is work in progress. The package may not work properly. Currently only queries for motions (moties) and amendments (amendementen) are supported.
Installation
pip install tkdocs
Simple example
from tkdocs import query_tk
data = {
'query': 'referentiewaarden,minimumloon',
'fromdate': '2017-03-15',
'todate': '2023-01-01',
'operator': 'and',
'doc_type': 'motie',
'dir_results': '../data/wml',
'download_files': True
}
query_tk(**data)
This will search for motions with search query referentiewaarden AND minimumloon, between 15 March 2017 and 1 January 2023.
Results will be stored as an excel file containing data including date, title, who sponsored the motion, and how parties voted (../data/wml/results.xlsx; make sure dir_results points to a location where the results can be stored). Since download_files was set to True, the pdf’s containing the motion text will be downloaded as well, and stored in ../data/wml/files.
Als long as you don’t change dir_results, results will be merged if you do multiple queries.
Currently, a maximum of 5,000 results will be downloaded. If a query yields more than 5,000 results, use fromdate and todate to get all results in batches of max 5,000.
For all options, see help(query_tk).
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
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 tkdocs-0.0.6.tar.gz.
File metadata
- Download URL: tkdocs-0.0.6.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c54947a35508cd64d56229aca91accba86e9534c8c16548df18f51a0acfbd2a5
|
|
| MD5 |
0271c5965dc4f0d5b5854f1c8e480f78
|
|
| BLAKE2b-256 |
6da26dc14766089ea150688184e0aa7fba9e8fb4da3ce76e855f07f07ad353be
|
File details
Details for the file tkdocs-0.0.6-py3-none-any.whl.
File metadata
- Download URL: tkdocs-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
576814c89c2b34bd019999b26f4fe73eb6f04fd83f3f5bf57f06246230e52a04
|
|
| MD5 |
8d491c2751436e4b21a5fb87a7eb0614
|
|
| BLAKE2b-256 |
09f6a1fd07ec0d141b154de2cd8ae2e328c9b26012fce984cb0cdbc30f629725
|