Knesset Committees

View on GitHub

Extracts parliament member names from Knesset committee protocol documents (DOCX) and exports the data to CSV.

What It Does

Parses downloaded Knesset committee session protocol files to identify which parliament members attended each session. The script:

  1. Reads a list of protocol file paths from urls.txt
  2. Opens each DOCX file and locates member name sections (committee members, Knesset members)
  3. Extracts the names listed under each section header
  4. Exports two CSV files:
    • PM_protocol.csv — protocol-level data with member name lists
    • P_to_p.csv — one row per member per protocol, for easier analysis

Data Source

Protocol documents are available from the Knesset OData API.

Usage

pip install python-docx

# Prepare urls.txt with local file paths to downloaded protocol DOCX files
python "Knesset Committees final.py"

Output

  • PM_protocol.csv — each row contains a file name, section title, and list of member names
  • P_to_p.csv — flattened version with one row per member per protocol

Requirements

  • Python 3
  • python-docx