Knesset Committees
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:
- Reads a list of protocol file paths from
urls.txt - Opens each DOCX file and locates member name sections (committee members, Knesset members)
- Extracts the names listed under each section header
- Exports two CSV files:
PM_protocol.csv— protocol-level data with member name listsP_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 namesP_to_p.csv— flattened version with one row per member per protocol
Requirements
- Python 3
- python-docx