bolster.data_sources.niassembly.questions

NI Assembly Questions data module.

Fetches oral and written question data from the NI Assembly AIMS API. Questions are indexed by department (using the AIMS OrganisationId) or by the tabling MLA (PersonId).

The GetQuestionsByDepartment endpoint accepts a numeric departmentId which corresponds to the OrganisationId returned by organisations.asmx/GetDepartmentListCurrent_JSON.

Known department IDs (as of 2026):

76 DAERA, 78 Education, 79 Economy, 81 Finance, 82 Health, 84 Infrastructure, 85 Communities, 86 The Executive Office, 134 Justice

Update frequency: Real-time.

Example

>>> from bolster.data_sources.niassembly import questions
>>> df = questions.get_questions_by_department(82)
>>> len(df) > 100
True
>>> "QuestionText" in df.columns
True

Attributes

logger

DEPARTMENT_NAME_TO_ID

Functions

get_questions_by_department(department)

Return all questions directed to a department as a DataFrame.

get_questions_by_member(person_id)

Return all questions tabled by an MLA as a DataFrame.

Module Contents

bolster.data_sources.niassembly.questions.logger[source]
bolster.data_sources.niassembly.questions.DEPARTMENT_NAME_TO_ID: dict[str, int][source]
bolster.data_sources.niassembly.questions.get_questions_by_department(department)[source]

Return all questions directed to a department as a DataFrame.

Parameters:

department (str | int) – Department name (full or abbreviation) or integer AIMS OrganisationId. E.g. "Department of Health", "DoH", or 82.

Returns:

DataFrame with columns including DocumentId, Reference, TabledDate, QuestionText, TablerPersonId, TablerName, QOralAnswerRequested. Returns an empty DataFrame if no questions are found.

Raises:
Return type:

pandas.DataFrame

Example

>>> df = get_questions_by_department("Department of Health")
>>> len(df) > 100
True
>>> "QuestionText" in df.columns
True
bolster.data_sources.niassembly.questions.get_questions_by_member(person_id)[source]

Return all questions tabled by an MLA as a DataFrame.

Parameters:

person_id (int) – NI Assembly AIMS PersonId for the MLA.

Returns:

DataFrame with columns including DocumentId, Reference, TabledDate, QuestionText, DepartmentId, DepartmentName, QOralAnswerRequested. Returns an empty DataFrame if no questions are found.

Raises:

requests.HTTPError – If the API request fails.

Return type:

pandas.DataFrame

Example

>>> df = get_questions_by_member(5797)
>>> len(df) >= 0
True