Skip to main content

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.

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

tkdocs-0.0.5.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

tkdocs-0.0.5-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

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