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). 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.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkdocs-0.0.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file tkdocs-0.0.4.tar.gz.

File metadata

  • Download URL: tkdocs-0.0.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for tkdocs-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f33ebc8a7aa9954d0cb19f71f3f9278f3ed9187b91f60d105005c1865d29c124
MD5 89723ed1a14daa4313ef32f9cb015b2a
BLAKE2b-256 bff0e99ef5f03c7ab2230b0557a523a97592fc64b6b29c6ddcaceff1c7a389b7

See more details on using hashes here.

File details

Details for the file tkdocs-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: tkdocs-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for tkdocs-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1bd11d034d22a3a0a687e916f6356dd1dbee369ac97c7fe09dfdd6822e151d
MD5 012816fdd106fdaac1363581a4efa5ed
BLAKE2b-256 8b69b87dd73a1e9aca84a65e7a9b12431b48e308722dcacf2ddd89fce0fbb354

See more details on using hashes here.

Supported by

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