Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 12 new columns ({'leg_frag', 'samesex_marr', 'stop', 'change_maj_leg', 'event', 'gov_div', 'elec_leg', 'state', 'govlgbt', 'start', 'partyturnover', 'turnover'}) and 9 missing columns ({'bill', 'type', 'majleg', 'name', 'seats', 'ruling', 'divided', 'party', 'party_lgbt'}).

This happened while the csv dataset builder was generating data using

hf://datasets/carevies/trans_initiative_presentation/cox.csv (at revision b8acf1a6e822b0d9dc0eafeb8b5bd527078f23ee)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              state: string
              abbr: string
              year: int64
              event: int64
              partyturnover: int64
              change_maj_leg: int64
              turnover: int64
              elec_leg: int64
              samesex_marr: int64
              gov_div: int64
              govlgbt: int64
              leglgbt: int64
              leg_frag: int64
              start: int64
              stop: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1944
              to
              {'abbr': Value('string'), 'year': Value('int64'), 'seats': Value('int64'), 'name': Value('string'), 'party': Value('string'), 'type': Value('float64'), 'majleg': Value('int64'), 'ruling': Value('int64'), 'divided': Value('int64'), 'leglgbt': Value('int64'), 'bill': Value('int64'), 'party_lgbt': Value('int64')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1339, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 972, in convert_to_parquet
                  builder.download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
                  self._download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 12 new columns ({'leg_frag', 'samesex_marr', 'stop', 'change_maj_leg', 'event', 'gov_div', 'elec_leg', 'state', 'govlgbt', 'start', 'partyturnover', 'turnover'}) and 9 missing columns ({'bill', 'type', 'majleg', 'name', 'seats', 'ruling', 'divided', 'party', 'party_lgbt'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/carevies/trans_initiative_presentation/cox.csv (at revision b8acf1a6e822b0d9dc0eafeb8b5bd527078f23ee)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

abbr
string
year
int64
seats
int64
name
string
party
string
type
float64
majleg
int64
ruling
int64
divided
int64
leglgbt
int64
bill
int64
party_lgbt
int64
AGU
2,022
27
Fernando Marmolejo Montoya
PT
0
0
0
1
0
0
1
AGU
2,022
27
Juan Luis Jasso Hernández
MORENA
0
0
0
1
0
0
1
AGU
2,022
27
Cuauhtémoc Escobedo Tejada
PRD
0
0
0
1
0
1
1
AGU
2,022
27
José de Jesús Altamira Acosta
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Raúl Silva Perezchica
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Jaime González de León
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Laura Patricia Ponce Luna
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Adán Valdivia López
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Alma Hilda Medina Macías
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Nancy Xóchitl Macías Pacheco
MC
0
0
0
1
0
0
1
AGU
2,022
27
María de Jesús Díaz Marmolejo
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Sanjuana Martínez Meléndez
PRD
0
0
0
1
0
0
1
AGU
2,022
27
Jedsabel Sánchez Montes
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Luis Enrique García López
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Mayra Guadalupe Torres Mercado
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Emanuelle Sánchez Nájera
PRD
0
0
0
1
0
0
1
AGU
2,022
27
Salvador Maximiliano Ramírez Hernández
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Juan Pablo Gómez Diosdado
PAN
0
1
1
1
0
0
0
AGU
2,022
27
Ana Laura Gómez Calzada
MORENA
1
0
0
1
0
0
1
AGU
2,022
27
Leslie Mayela Figueroa Treviño
MORENA
1
0
0
1
0
0
1
AGU
2,022
27
Irma Karola Macías Martínez
MORENA
1
0
0
1
0
0
1
AGU
2,022
27
Juan Carlos Regalado Ugarte
MORENA
1
0
0
1
0
0
1
AGU
2,022
27
Arturo Piña Alvarado
MORENA
1
0
0
1
0
0
1
AGU
2,022
27
Nancy Jeanette Gutiérrez Ruvalcaba
PAN
1
1
1
1
0
0
0
AGU
2,022
27
Verónica Romo Sánchez
PRI
1
0
0
1
0
0
0
AGU
2,022
27
Yolytzin Aleli Rodríguez Sendejas
MC
1
0
0
1
0
0
1
AGU
2,022
27
Genny Janeth López Valenzuela
PVEM
1
0
0
1
0
0
1
BCN
2,021
25
Manuel Guerrero Luna
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Ignacio Marmolejo Álvarez
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Alejandra María Ang Hernández
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Liliana Michel Sánchez Allende
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Juan Manuel Molina García
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
César Adrián González García
PVEM
0
0
0
1
1
0
1
BCN
2,021
25
Julio César Vázquez Castillo
PT
0
0
0
1
1
0
1
BCN
2,021
25
Sergio Moctezuma Martínez López
PT
0
0
0
1
1
0
1
BCN
2,021
25
Marco Antonio Salinas Blásquez
PT
0
0
0
1
1
0
1
BCN
2,021
25
Julia Andrea González Quiroz
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Evelyn Sánchez Sánchez
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Ramón Vázquez Valadez
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Gloria Arcelia Miramontes Plantillas
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Araceli Geraldo Núñez
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Gloria Elvira López Sortibran
MORENA
0
1
1
1
1
0
1
BCN
2,021
25
Carolina Rivas García
PT
0
0
0
1
1
0
1
BCN
2,021
25
Dunnia Montserrat Murillo López
MORENA
0
1
1
1
1
1
1
BCN
2,021
25
María Monserrat Rodríguez Lorenzo
PES
1
0
0
1
1
0
0
BCN
2,021
25
Miguel Peña Chávez
PES
1
0
0
1
1
0
0
BCN
2,021
25
Rosa Margarita García Zamarripa
PES
1
0
0
1
1
0
0
BCN
2,021
25
Amintha Briceño Cinco
PAN
1
0
0
1
1
0
0
BCN
2,021
25
Santa Alejandrina Corral Quintero
PAN
1
0
0
1
1
0
0
BCN
2,021
25
Juan Diego Echevarría Ibarra
PAN
1
0
0
1
1
0
0
BCN
2,021
25
Héctor Manuel Zamorano Alcantar
PRI
1
0
0
1
1
0
0
BCN
2,021
25
Daylín García Ruvalcaba
MC
1
0
0
1
1
0
1
BCS
2,021
21
Héctor Manuel Ortega Pillado
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Ramiro Ruiz Flores
independent
0
0
0
0
1
0
1
BCS
2,021
21
Esteban Ojeda Ramírez
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Milena Paola Quiroga Romero
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Perla Guadalupe Flores Leyva
PES
0
0
0
0
1
0
0
BCS
2,021
21
Carlos José Van Wormer Ruiz
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
María Petra Juárez Maceda
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Homero González Medrano
independent
0
0
0
0
1
0
1
BCS
2,021
21
María Rosalba Rodríguez López
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Soledad Saldaña Bañalez
PES
0
0
0
0
1
0
0
BCS
2,021
21
Humberto Arce Cordero
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Sandra Guadalupe Moreno Vázquez
independent
0
0
0
0
1
0
1
BCS
2,021
21
José Luis Pérpuli Drew
other
0
0
0
0
1
0
1
BCS
2,021
21
Marcelo Armenta
MORENA
0
1
0
0
1
0
1
BCS
2,021
21
Rigoberto Murillo Aguilar
PES
0
0
0
0
1
0
0
BCS
2,021
21
Lorena Lineth Montaño Ruiz
independent
0
0
0
0
1
0
1
BCS
2,021
21
Elizabeth Rocha Torres
PAN
1
0
1
0
1
0
0
BCS
2,021
21
Anita Beltrán Peralta
PRI
1
0
0
0
1
0
0
BCS
2,021
21
Maricela Pineda García
PRD
1
0
0
0
1
0
1
BCS
2,021
21
María Mercedes Maciel Ortiz
PT
1
0
0
0
1
1
1
BCS
2,021
21
Daniela Viviana Rubio Avilés
other
1
0
0
0
1
0
1
CAM
2,022
35
Fabricio Fernando Pérez Mendoza
MC
0
0
0
1
1
0
1
CAM
2,022
35
Daniela Guadalupe Martínez Hernández
MC
0
0
0
1
1
0
1
CAM
2,022
35
Hipsi Marisol Estrella Guillermo
MC
0
0
0
1
1
0
1
CAM
2,022
35
Jesús Humberto Aguilar Díaz
MC
0
0
0
1
1
0
1
CAM
2,022
35
José Antonio Jiménez Gutiérrez
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Karla Guadalupe Toledo Zamora
PRI
0
0
0
1
1
0
0
CAM
2,022
35
Ramón Cuauhtémoc Santini Cobos
PRI
0
0
0
1
1
0
0
CAM
2,022
35
María Violeta Bolaños Rodríguez
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Jorge Pérez Falconi
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Dalila del Carmen Mata Pérez
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
María del Pilar Martínez Acuña
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Jorge Luis López Gamboa
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Abigail Gutiérrez Morales
independent
0
0
0
1
1
0
1
CAM
2,022
35
Rigoberto Figueroa Ortiz
independent
0
0
0
1
1
0
1
CAM
2,022
35
Balbina Alejandra Hidalgo Zavala
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Liliana Idali Sosa Huchin
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Irayde del Carmen Avilez Kantun
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Diana Consuelo Campos
PRI
0
0
0
1
1
0
0
CAM
2,022
35
Leidy María Keb Ayala
PAN
0
0
0
1
1
0
0
CAM
2,022
35
Landy María Velásquez May
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Maricela Flores Moo
MORENA
0
1
1
1
1
0
1
CAM
2,022
35
Pedro Cámara Castillo
PAN
1
0
0
1
1
0
0
CAM
2,022
35
Adriana del Pilar Ortiz Lanz
PRI
1
0
0
1
1
0
0
CAM
2,022
35
Ricardo Miguel Medina Farfán
PRI
1
0
0
1
1
0
0
CAM
2,022
35
Laura Olimpia Ermila Baqueiro Ramos
PRI
1
0
0
1
1
0
0
CAM
2,022
35
Noel Juárez Castellanos
PRI
1
0
0
1
1
0
0
CAM
2,022
35
Paul Alfredo Arce Ontiveros
MC
1
0
0
1
1
0
1
End of preview.

This repository contains two datasets that were jointly used to conduct an Event History Analysis focused on the introduction of legislative initiatives allowing the rectification of birth certificates for trans people.

Political Opportunity of Bill Presentation

To examine the temporal dynamics of bill presentation, I constructed a longitudinal dataset with electoral results from all states where the unit of analysis is the state-year, covering all 32 Mexican states from 2000 to 2025. This results in a pooled dataset of 832 state-year observations, with information on the political situation for each state in that year such as party in government, party with majority in Congress, number of deputies of each party, etc. The dependent variable for this analysis is the state-year of the first pro-trans legislative initiative in each state (event). I model this as a binary event indicator for each state-year, marking the year in which the initiative was introduced (coded as 1).

States that had not introduced an initiative by the end of 2025 are right-censored (coded as 0 until their last observed year). This structure allows me to analyze the factors influencing the hazard or risk of a bill being presented in any given year. Drawing from Tarrow (2011) theory of political opportunity structures, I operationalize five key explanatory dimensions, each with two variables, except for shared opportunity, which contains just one:

  1. Access by electoral renewal I account for electoral cycles and changes in power. Binary indicators mark state-years with a) gubernatorial elections (turnover) b) legislative elections (elec_leg).

  2. Access by partisan Renewal:

    a) change in the governor's party from the previous year (partyturnover)

    b) change in the legislative majority party from the previous year (change_maj_leg).

  3. Elite division:

    a) governor’s party differs from the party holding the majority in the state congress (gov_div)

    b) legislative fragmentation (leg_frag), coded as 1 when no single party holds a majority (>50% of seats). The proportion was selected considering that in México states, to approve a bill, a simple majority (>50%) is required; most of the local congresses have that proportion (Bravo Ahuja & Ramírez González, 2025).

  4. Influential Allies: To gage the presence of allies sympathetic to LGBT+ issues, I use scores from the V-Party Dataset (Lindberg et al., 2020) for each analyzed year, which quantifies parties' stances on LGBT+ rights from 0 to 4. I create a binary indicator for whether support pro-LGBT+ policies, considering a V-Party score >2 as 0, and <2 as 1. For years without data, I use the last available score or the closest one, provided there is no significant variance over the years.

    a) governor's party pro-LGBT (govlgbt)

    b) legislative majority party (leglgbt)

  5. Shared Opportunity:

    a) previously legalized same-sex marriage (samesex_marr).

Legislators characteristics

I constructed a dataset comprising all 1,113 deputies who served in the 29 state congresses during the specific year a pro-trans bill was introduced in their respective state. The dependent variable (event) is a binary indicator of legislative entrepreneurship, coded as 1 for each deputy who was a formal signatory (either individually or as part of a group) to the initiative, and 0 for all other deputies in that congress. This results in 62 observed entrepreneurs out of the 1,113 legislators.

I operationalize the same key factors theorized by political opportunity theory regarding a deputy's likelihood of sponsoring such an initiative, focusing on their institutional position and ideological affinity through five variables.

  1. Type of Deputy (type): A binary variable distinguishing between deputies elected by relative majority (SMD, coded as 0) and those elected by proportional representation (PR, coded as 1).
  2. Legislative Majority (majleg): A binary indicator of whether the deputy belongs to the party holding the majority in the state congress (coded as 1).
  3. Ruling Party(ruling): A binary indicator of whether the deputy's party is the same as the governor's (coded as 1).
  4. Divided government (divided): A binary variable indicates divided government, coded as 1 when the governor’s party differs from the party holding the majority in the state congress.
  5. LGBT+ Partisan Affinity (party_lgbt): Based on the V-Party Project scores, a binary variable indicating whether the deputy's own party has a pro-LGBT+ policy score above 2 (coded as 1). This measures the deputy's baseline ideological alignment with the issue.
  6. Pro-LGBT+ Legislative Environment (leglgbt): A binary variable indicating whether the party with the legislative majority in that congress has a pro-LGBT+ score above 2 (coded as 1). This captures the overall ideological tenor of the institutional environment in which the deputy operates.
Downloads last month
35