Skip to content

Data Dictionary

This page is the complete column-level reference for all 12 tables in the Popolo-Graph database. Every column, its type, nullability, constraints, and purpose is documented here. Use it as the authoritative source when querying the database or building downstream analyses.

Geographic areas used to map electoral districts, states, and constituencies.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix A01, A02, etc.
nombreTEXTNOName of the area (state, district, or constituency)
clasificacionTEXTNOCHECK IN (‘estado’,‘distrito’,‘circunscripcion’)Classification of the geographic area
parent_idTEXTYESFK → area(id)Parent area (e.g., district within a state)
geometryTEXTYESOptional GeoJSON geometry for map visualization

Political parties, parliamentary blocs, coalitions, government bodies, and other organizations.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix O01, O02, etc.
nombreTEXTNOUNIQUEOfficial name of the organization
abbrTEXTYESAbbreviation (MORENA, PAN, PRI, etc.)
clasificacionTEXTNOCHECK IN (‘partido’,‘bancada’,‘coalicion’,‘gobierno’,‘institucion’,‘otro’)Type of organization
fundacionTEXTYESFounding date in ISO 8601 format
disolucionTEXTYESDissolution date in ISO 8601 format

Legislators and other individuals tracked in the system.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix P01, P02, etc.
nombreTEXTNOFull name of the person
fecha_nacimientoTEXTYESDate of birth in ISO 8601 format
generoTEXTYESCHECK IN (‘M’,‘F’,‘NB’)Gender: M=male, F=female, NB=non-binary
curul_tipoTEXTYESCHECK IN (‘mayoria_relativa’,‘plurinominal’,‘suplente’)Seat type: MR, proportional representation, or substitute
circunscripcionINTEGERYESCHECK BETWEEN 1 AND 5Electoral constituency (1-5)
start_dateTEXTYESStart date of legislative term
end_dateTEXTYESEnd date of legislative term
corriente_internaTEXTYESCHECK IN (‘Monreal’,‘AMLO’,‘Sheinbaum’,‘institucionalista’,NULL)Internal party faction (for loyalty analysis)
vulnerabilidadTEXTYESCHECK IN (‘alta’,‘media’,‘baja’,NULL)Estimated vulnerability level (game theory)
observacionesTEXTYESFree-text notes about the legislator
identifiers_jsonTEXTYESJSON with external identifiers (e.g., {"sitl_id": 108})

Links a person to an organization with a specific role and time period.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix M01, M02, etc.
person_idTEXTNOFK → person(id) ON DELETE CASCADEReference to the person
org_idTEXTNOFK → organization(id) ON DELETE CASCADEReference to the organization
rolTEXTNORole within the organization (diputado, senador, suplente)
labelTEXTYESHuman-readable description (e.g., “Diputado plurinominal, Circ. 4”)
start_dateTEXTNOStart date of membership
end_dateTEXTYESEnd date (NULL = currently active)
on_behalf_ofTEXTYESFK → organization(id)Organization on whose behalf the role is exercised (e.g., coalition)

Formal positions within an organization (chamber), optionally tied to a geographic area.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix T01, T02, etc.
org_idTEXTNOFK → organization(id)Organization (chamber) this post belongs to
area_idTEXTYESFK → area(id)Geographic area associated with the post
labelTEXTNOHuman-readable description of the position
start_dateTEXTNOStart date of the position
end_dateTEXTYESEnd date of the position

Legislative initiatives: constitutional reforms, secondary laws, and ordinary bills.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix Y01, Y02, etc.
textoTEXTNOFull text or summary of the initiative
clasificacionTEXTNOCHECK IN (‘reforma_constitucional’,‘ley_secundaria’,‘ordinaria’,‘otra’)Type of legislative initiative
requirementTEXTNOCHECK IN (‘mayoria_simple’,‘mayoria_calificada’,‘unanime’)Majority type required for approval
resultTEXTYESCHECK IN (‘aprobada’,‘rechazada’,‘pendiente’,‘retirada’,NULL)Result of the vote (NULL if not yet voted)
dateTEXTYESDate of the vote
legislative_sessionTEXTYESLegislative session name (e.g., “LXVI Legislatura”)
fuente_urlTEXTYESURL of the official source

A specific voting event (roll call) on a motion, held by a chamber.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix VE01, VE02, etc.
motion_idTEXTNOFK → motion(id)Reference to the motion being voted
start_dateTEXTNODate/time when the vote event started
organization_idTEXTNOFK → organization(id)Chamber that held the vote
resultTEXTYESCHECK IN (‘aprobada’,‘rechazada’,‘empate’,NULL)Outcome of the vote
sitl_idINTEGERYESSITL system voting identifier (votaciont parameter)
voter_countINTEGERYESNumber of legislators who participated
legislaturaTEXTYESLegislature identifier (LX, LXI, …, LXVI)
requirementTEXTYESCHECK IN (‘mayoria_simple’,‘mayoria_calificada’,‘unanime’,NULL)Majority requirement (copied from motion)
source_idTEXTYESOriginal portal ID for deduplication across sources
identifiers_jsonTEXTYESJSON with Popolo external identifiers

Individual vote cast by a legislator in a vote event.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix V01, V02, etc.
vote_event_idTEXTNOFK → vote_event(id)Reference to the vote event
voter_idTEXTNOFK → person(id)Reference to the legislator who voted
optionTEXTNOCHECK IN (‘a_favor’,‘en_contra’,‘abstencion’,‘ausente’)Vote option: yes, no, abstain, absent
”group”TEXTYESParty/bloc the legislator belonged to at vote time

Note: The group column name is a SQLite reserved keyword and must be quoted in queries.


Aggregated vote counts per option per party within a vote event.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix C01, C02, etc.
vote_event_idTEXTNOFK → vote_event(id)Reference to the vote event
optionTEXTNOCHECK IN (‘a_favor’,‘en_contra’,‘abstencion’,‘ausente’)Vote option being counted
valueINTEGERNOCHECK >= 0Number of votes in this count
group_idTEXTYESFK → organization(id)Party contributing these votes

These three tables extend the Popolo schema to support power network analysis. They model external political actors, relationships between entities, and political events that shape legislative behavior.

Political actors outside the legislature: governors, mayors, former presidents, party leaders, judges, and others who influence legislative outcomes.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix AE01, AE02, etc.
nombreTEXTNOFull name of the external actor
tipoTEXTNOCHECK IN (‘gobernador’,‘alcalde’,‘ex_presidente’,‘dirigente’,‘juez’,‘otro’)Type of external actor
area_idTEXTYESFK → area(id)Geographic area of influence
start_dateTEXTYESStart date of their relevance/term
end_dateTEXTYESEnd date of their relevance/term
observacionesTEXTYESFree-text notes about the actor

Power relationships between any two entities (persons, organizations, or external actors). Used for loyalty analysis, pressure mapping, and coalition tracking.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix RP01, RP02, etc.
source_typeTEXTNOCHECK IN (‘person’,‘organization’,‘actor_externo’)Type of the source entity
source_idTEXTNOID of the source entity
target_typeTEXTNOCHECK IN (‘person’,‘organization’,‘actor_externo’)Type of the target entity
target_idTEXTNOID of the target entity
tipoTEXTNOCHECK IN (‘lealtad’,‘presion’,‘influencia’,‘familiar’,‘clientelismo’,‘conflicto’,‘alianza’)Type of power relationship
pesoINTEGERNOCHECK BETWEEN 1 AND 5Relationship strength (1=very weak, 5=very strong)
start_dateTEXTYESStart date of the relationship
end_dateTEXTYESEnd date of the relationship
fuenteTEXTYESSource of the information (URL or reference)
notaTEXTYESAdditional notes about the relationship

Political events (reforms, crises, agreements) that may or may not be tied to a legislative motion.

ColumnTypeNullableConstraintsDescription
idTEXTNOPRIMARY KEYUnique ID with prefix EP01, EP02, etc.
fechaTEXTNODate of the event
tipoTEXTNOType of event (free text: reforma, votacion, crisis, acuerdo, etc.)
descripcionTEXTNODetailed description of the event
consecuenciaTEXTYESConsequence or impact of the event
fuente_urlTEXTYESURL of the source
motion_idTEXTYESFK → motion(id)Related legislative motion (if applicable)

-- Membership lookups
CREATE INDEX idx_membership_person ON membership(person_id);
CREATE INDEX idx_membership_org ON membership(org_id);
-- Vote event lookups
CREATE INDEX idx_vote_event_motion ON vote_event(motion_id);
CREATE INDEX idx_vote_event_source ON vote_event(source_id);
-- Individual vote lookups
CREATE INDEX idx_vote_voter ON vote(voter_id);
CREATE INDEX idx_vote_event ON vote(vote_event_id);
-- Count aggregations
CREATE INDEX idx_count_event ON count(vote_event_id);
CREATE INDEX idx_count_group ON count(group_id);
-- Power relationship traversals
CREATE INDEX idx_relacion_source ON relacion_poder(source_type, source_id);
CREATE INDEX idx_relacion_target ON relacion_poder(target_type, target_id);
CREATE INDEX idx_relacion_tipo ON relacion_poder(tipo);
-- Loyalty analysis
CREATE INDEX idx_person_corriente ON person(corriente_interna);
-- External actor filtering
CREATE INDEX idx_actor_tipo ON actor_externo(tipo);

Four triggers enforce the constraint end_date >= start_date on the person and membership tables, for both INSERT and UPDATE operations.

-- Person: validate dates on INSERT
CREATE TRIGGER trg_person_dates_insert
BEFORE INSERT ON person
BEGIN
SELECT RAISE(ABORT, 'end_date must be >= start_date')
WHERE NEW.end_date IS NOT NULL
AND NEW.start_date IS NOT NULL
AND NEW.end_date < NEW.start_date;
END;
-- Person: validate dates on UPDATE
CREATE TRIGGER trg_person_dates_update
BEFORE UPDATE ON person
BEGIN
SELECT RAISE(ABORT, 'end_date must be >= start_date')
WHERE NEW.end_date IS NOT NULL
AND NEW.start_date IS NOT NULL
AND NEW.end_date < NEW.start_date;
END;
-- Membership: validate dates on INSERT
CREATE TRIGGER trg_membership_dates_insert
BEFORE INSERT ON membership
BEGIN
SELECT RAISE(ABORT, 'end_date must be >= start_date')
WHERE NEW.end_date IS NOT NULL
AND NEW.start_date IS NOT NULL
AND NEW.end_date < NEW.start_date;
END;
-- Membership: validate dates on UPDATE
CREATE TRIGGER trg_membership_dates_update
BEFORE UPDATE ON membership
BEGIN
SELECT RAISE(ABORT, 'end_date must be >= start_date')
WHERE NEW.end_date IS NOT NULL
AND NEW.start_date IS NOT NULL
AND NEW.end_date < NEW.start_date;
END;