← Dataset · data dictionary

Schema

Every public table in the Tayyar dataset, with every column documented. The dataset is reproducible from the SQL migrations in the project repo; this page is the column-level reference for the dataset's tables (catalogued at /data).

tayyar_countries

MENA countries on the map. has_data distinguishes Tier-1 (parties seeded) from Tier-2 (politicians only / map-only).

ColumnTypeDescription
id text PK ISO 3166-1 alpha-2 country code (EG, IL, PS, …)
name_en text English name
name_ar text Arabic name
name_he text Hebrew name (nullable)
region text Always "MENA"
display_order int Sort key
has_data bool true = Tier-1 with party data; false = Tier-2
source_citations jsonb Per-field source URLs
verification_status enum unverified / tarek-verified / externally-verified
last_reviewed_at timestamptz When last touched in the verification pass
last_reviewed_by text Reviewer identity

tayyar_parties

Political parties, joint lists, and quasi-party entities. The main analytical unit.

ColumnTypeDescription
id uuid PK Stable UUID
slug text unique URL-safe slug (e.g. "likud", "fln-dz")
country_id text FK References tayyar_countries(id)
name_en text English name
name_ar text Arabic name
name_he text Hebrew name (nullable)
founded_year int Year founded
dissolved_year int Year dissolved (nullable)
family_tag text islamist-sunni-electoral / islamist-salafi / islamist-shia / islamist-militant / leftist-communist / leftist-socdem / nationalist-arab / nationalist-ethnic / religious-jewish / religious-christian / secular-liberal
short_description text One-paragraph editorial description
official_url text Party website (nullable)
founders_text text Free-text list of founders
current_leader_text text Current leader(s); free text to handle co-leadership / disputed cases
is_in_government bool Legacy boolean — superseded by government_role
is_in_opposition bool Legacy boolean — superseded by government_role
government_role enum lead-party / coalition-major / coalition-minor / confidence-supply / opposition-major / opposition-minor / extra-parliamentary / banned
is_alliance bool true = joint electoral list rather than single party
alliance_notes text Free text on coalition structure (nullable)
legal_status enum legal / restricted / outlawed / dissolved / merged-away
legal_status_note text Status note — e.g. designation date for outlawed entities
source_citations jsonb Array of {field, url, accessed_at, note} per-field citations
verification_status enum unverified / tarek-verified / externally-verified
last_reviewed_at timestamptz Verification timestamp
last_reviewed_by text Verifier identity

tayyar_politicians

Political figures: heads of state, heads of government, party leaders, ministers, MPs, activists, public intellectuals.

ColumnTypeDescription
id uuid PK Stable UUID
slug text unique URL-safe slug
country_id text FK Primary country
current_party_id uuid FK References tayyar_parties(id); nullable for independents
name_en text English name
name_ar text Arabic name
name_he text Hebrew name (nullable)
role enum head-of-state / head-of-government / party-leader / minister / speaker / mp / activist / other
active bool true = currently active; false = retired / deceased / inactive
is_in_government bool Currently in a governing role
is_in_opposition bool Currently in opposition
is_independent bool Independent / no formal party affiliation
short_description text One-paragraph editorial bio
official_url text Official website (nullable)
source_citations jsonb Per-field source URLs
verification_status enum unverified / tarek-verified / externally-verified
last_reviewed_at timestamptz Verification timestamp
last_reviewed_by text Verifier identity

tayyar_axes

The 16 scoring axes. Each axis runs from -10 to +10. Carries a scoring rubric and anchored exemplars at -10 / -7 / -3 / 0 / +3 / +7 / +10.

ColumnTypeDescription
id text PK Slug-style id (economic, social, state-religion, …)
name_en text English label
name_ar text Arabic label
axis_group enum compass (default 2D plot) / issue (spider chart)
pos_label_en/ar text Positive-pole label
neg_label_en/ar text Negative-pole label
description text Short description shown on the axis page
scoring_conventions text Paragraph-length guide for scorers
anchor_examples jsonb Array of {score, label, exemplar} anchoring points
display_order int Sort key on the issues catalog
is_active bool false = retired / deprecated

tayyar_aggregate_positions

The position scores. One row per (entity_type, entity_id, axis, lens) tuple. lens is one of composite / declared / behavioral / perceived.

ColumnTypeDescription
id uuid PK Stable UUID
entity_type enum party / politician
entity_id uuid References tayyar_parties(id) or tayyar_politicians(id)
axis text FK References tayyar_axes(id)
lens enum composite (default) / declared / behavioral / perceived
score numeric Position score, -10 to +10, 2 decimal places
confidence numeric Confidence in the score, 0 to 1, 2 decimal places
sample_size int For LLM-coded scores: number of source documents the score was derived from. 0 for hand-coded.
source_analysis_ids jsonb For LLM-coded scores: array of tayyar_analyses.id. Empty for hand-coded.
computed_at timestamptz When the position was computed

tayyar_events

Political events — party formations, dissolutions, mergers, leadership changes, election results, designations. The Pulse feed at /tayyar/pulse.

ColumnTypeDescription
id uuid PK Stable UUID
event_type enum 15 categories: party-formed / dissolved / merged / split, leader-changed / killed, election-scheduled / held, coalition-formed / collapsed, legal-status-changed, designation-changed, figure-imprisoned / released, other
event_date date When it happened (nullable for in-flux events)
date_precision enum day / month / year — how precise the date is
confidence enum confirmed / reported / rumored / speculative — epistemic tier
country_id text FK Primary country (nullable for cross-country events)
party_ids uuid[] References tayyar_parties — parties involved in the event
politician_ids uuid[] References tayyar_politicians — figures involved in the event
title text Short headline of the event
description text Paragraph-length context (nullable)
source_citations jsonb Per-claim source URLs
verification_status enum unverified / tarek-verified / externally-verified
last_reviewed_at timestamptz Verification timestamp
last_reviewed_by text Verifier identity
created_at timestamptz Row creation timestamp

tayyar_party_alliances

Joint electoral list memberships. Tracks parties that joined a joint-list entity. Time-bound via start_year + end_year.

ColumnTypeDescription
alliance_id uuid FK The joint list (is_alliance=true)
member_id uuid FK The member party
start_year int When the membership began
end_year int When the membership ended (nullable for ongoing)
notes text Free text on the membership

tayyar_documents

Verbatim primary-source texts — manifestos, charters, platforms, parliamentary records, speeches, press releases, op-eds, communiqués, interviews, articles, bills. Seeded via the hunter pipeline; backs the document-grounded scoring layer.

ColumnTypeDescription
id uuid PK Stable UUID
source_type enum manifesto / platform / charter / speech / parliamentary-record / interview / press-release / op-ed / communique / article / bill / user-paste
party_id uuid FK Authoring party (nullable)
politician_id uuid FK Authoring politician (nullable)
country_id text FK Country of origin
title text Document title
source_url text Where the document came from
original_language enum ar / he / en / other
content_original text Full original-language text
content_translated_en text English translation if applicable
published_date date When the document was published

tayyar_analyses

Document-grounded scoring runs. One row per (document, axis, run). Populated as the pipeline scores entities.

ColumnTypeDescription
id uuid PK Stable UUID
document_id uuid FK The scored document
axis text FK The axis scored
prompt_version_id uuid FK Pinned prompt
rubric_version_id uuid FK Pinned rubric
model text Model identifier used for this run (e.g. model-vendor-version)
model_response jsonb Raw model output for replay
score numeric Extracted score, -10 to +10
confidence numeric Extracted confidence, 0 to 1
reasoning text Extracted reasoning paragraph
source_spans jsonb Array of {quote, char_start, char_end} citations into the document
created_at timestamptz When the analysis ran

Provenance fields (every entity)

Four fields appear across tayyar_parties, tayyar_politicians, tayyar_countries, tayyar_axes, and tayyar_events. They form the verification stack:

FieldTypeDescription
source_citationsjsonbArray of {field, url, accessed_at, note}. field names the entity column the citation supports.
verification_statusenumunverified / first-pass verified / externally verified. First-pass coding is largely complete; external verification is the next gate.
last_reviewed_attimestamptzVerification timestamp.
last_reviewed_bytextReviewer identity.