Skip to content
Luz y TaquígrafosThe Diarios de Sesiones of the Congress of Deputies, 1931–1945

CSV · 107,551 rows · 14 columns · 158.1 MB

How do I open it, what does each column mean, how do I join it and how do I cite it?

Everything you need to work with the dataset: opening it, reading each column, deciding before counting, joining it with Afinidades Elegidas and citing it.

Each step comes with its line of code.

Harvard Dataverse asks for no registration or form before you download.

Download from Dataverse 

Where to start

Choose by what you already know how to do.

  1. Without programming

    Every figure on this site carries its data in its «Data» tab: CSV and Excel, with its README and its citation. They weigh a few KB.

    No form: these are aggregate data.

  2. Without programming, with the text

    Open the explorer: it comes with the Diarios de Sesiones, the official printed record of the Cortes' proceedings, already loaded. Search, read each session as in the Diario and export what you find, with its citation.

    The first time, it downloads about 112 MB compressed, with no form.

    It runs in a computer's web browser. It opens in your browser; what you search for and save stays on your device.

    Open the explorer 

  3. With R or Python

    The deposited CSV: 107,551 rows and 14 columns. The two snippets on this page load it, count it and join it.

    A single file of 158.1 MB.

    Harvard Dataverse asks for no registration or form before you download.

    Download from Dataverse 

  4. With network methods

    Afinidades Elegidas: who signed each motion, amendment, request or interpellation with whom. It is a derived dataset with its own deposit, joined to this one by deputy and legislature.

    See Afinidades Elegidas

  5. With an AI assistant

    Ask Claude or another assistant in your own words. An open connector searches and counts in both datasets for you, without programming.

    See how to ask with AI

Two people with the same dataset can reach different results without either being wrong. The analytical decisions are yours, and this page shows them.

Back to contents

The route to the file

Three steps: the DOI page, a single file and a reading with the right parameters.

Go to the DOI page. The buttons on this site take you there, not to a loose file.

Download only the CSV. It is called 2REP_Diaries.csv and weighs 158.1 MB. The other files in the version are documentation.

Read it with these parameters. Semicolon as the separator, UTF-8 without a byte order mark and every field in double quotes.

Quotes inside a field are doubled. Each record ends in CRLF, and the text keeps its line breaks inside the quotes.

An empty field is a missing value. Python reads it as NaN; R reads it as NA in numeric columns and as an empty string in the rest.

Check your copy. If you have read it correctly, it should give you the numbers in this table, legislature by legislature. They are the ones the two snippets on this page print.

LegislatureSessionsRowsWords (nwords)
1931-193340561,35512,966,290
1933-193527640,3429,476,120
1936-1939745,8541,893,486
All three755107,55124,335,896

What the file does not contain. Not the pages of the Diario, nor who was in the Chair at each session, nor the Government. These are project metadata, not deposited, and the explorer does not show them either.

Download from Dataverse 

The files in the deposit
FileBytesWhat it isMD5
2REP_Diaries.csv165,785,782The data: one row per printed turn.360332a0ff1327671530f15eed46ac0c
changelog_es_09_2026.txt704The change log, in Spanish.096580562ab5c7fac1c602e99086174e
changelog_en_09_2026.txt680The same, in English.235b312ad40d98067ca5c885e513ce16
Luz_y_Taquigrafos_README.txt8,340The documentation, in English.f2638800977f78a7d8273440c9c806b3

To check that your copy is the deposited one, compare its MD5 with the one in the table.

Do not open it in a spreadsheet. 289 rows exceed the maximum number of characters in an Excel cell. The longest has 170,413.

Back to contents

The 14 columns

Each column, with its definition and its value in two real rows.

The two example rows come one after the other in the session of 1 October 1931. In the first, the Chair calls for silence; in the second, Clara Campoamor begins to speak.

What each column holds

What does each column mean?

  1. idinteger · none empty

    The row number, from one to 107,551, with no gaps. It follows reading order: date, session and place in the session.

    The Chair
    5423
    Clara Campoamor
    5424
  2. num_sessioninteger · none empty

    The number of the session within its legislature, as the Diario prints it. It starts again in each legislature: a session is identified by its date and number together.

    The Chair
    48
    Clara Campoamor
    48
  3. orderinteger · none empty

    The place of the row in its session, counted from zero.

    The Chair
    25
    Clara Campoamor
    26
  4. datedate · none empty

    The date of the session, in YYYY-MM-DD format. Some days had two sessions.

    The Chair
    1931-10-01
    Clara Campoamor
    1931-10-01
  5. speakertext · none empty

    The printed speaker heading, as optical character recognition read it: «El Sr. PRESIDENTE:», «La Srta. CAMPOAMOR:». It is the only column that gives the office.

    The Chair
    El Sr. PRESIDENTE:
    Clara Campoamor
    La Srta. CAMPOAMOR:
  6. speechtext · none empty

    The text of the row, neither summarised nor corrected by hand, with the shorthand writer's bracketed notes.

    The Chair
    Ruego a la Cámara que guarde silencio.
    Clara Campoamor
    Yo ruego a la Cámara que me escuche en silencio; no es con agresiones y no es con ironias como vais a vencer mi fortaleza; la única cosa que yo tengo […] 8,297 characters in total
  7. rep_idinteger · 147 empty

    The deputy, according to the project's table of deputies. It is a person, not a seat; in the Chair's rows, the deputy who was presiding.

    The Chair
    133
    Clara Campoamor
    175
  8. rep_nametext · 147 empty

    The deputy's full name, without accents and with each word capitalised.

    The Chair
    Julian Besteiro Fernandez
    Clara Campoamor
    Clara Campoamor Y Rodriguez
  9. districttext · 147 empty

    The constituency for which the deputy was elected.

    The Chair
    Madrid
    Clara Campoamor
    Madrid
  10. partytext · 147 empty

    The initials of the deputy's party in that legislature.

    The Chair
    PSOE
    Clara Campoamor
    PRR
  11. party_familytext · 151 empty

    The deputy's party family.

    The Chair
    Socialista
    Clara Campoamor
    Republicanos
  12. ideologytext · 147 empty

    The position of the deputy's party, from EI, far left, to ED, far right.

    The Chair
    I
    Clara Campoamor
    C
  13. nwordsinteger · none empty

    The words in the text, split on the space character.

    The Chair
    7
    Clara Campoamor
    1460
  14. legislaturetext · none empty

    Legislature: 1931-1933, 1933-1935 or 1936-1939. The third includes the wartime sessions and those in Mexico.

    The Chair
    1931-1933
    Clara Campoamor
    1931-1933
What each column holds
ColumnTypeEmptyDistinctThe ChairClara Campoamor
idinteger0107,55154235424
num_sessioninteger04054848
orderinteger05862526
datedate07521931-10-011931-10-01
speakertext02,370El Sr. PRESIDENTE:La Srta. CAMPOAMOR:
speechtext068,760Ruego a la Cámara que guarde silencio.Yo ruego a la Cámara que me escuche en silencio; no es con agresiones y no es con ironias como vais a vencer mi fortaleza; la única cosa que yo tengo […]
rep_idinteger147773133175
rep_nametext147773Julian Besteiro FernandezClara Campoamor Y Rodriguez
districttext14754MadridMadrid
partytext14739PSOEPRR
party_familytext15133SocialistaRepublicanos
ideologytext1478IC
nwordsinteger03,80571460
legislaturetext031931-19331931-1933

The same data as the chart, in rows.

Download the figure data

CSV and Excel, with a README in Spanish and in English.

No form: these are aggregate data.

Source
Luz y Taquígrafos
Checksum: 360332a0ff13
Numbers exported on
How to cite
Rodrigues-Silveira, Rodrigo; García-Díez, Fátima; Llamazares, Iván; Martínez-Barahona, Elena; Barreto Martín, Eduardo. ‘What each column holds’. Figure from Luz y Taquígrafos. https://luz.parlaibero.es/en/datos/#columnas. Source: Luz y Taquígrafos · 360332a0ff13. Exported on .

Before you read it Definitions from the deposited README.

Inside the text. The Diario's paragraphs are separated by a blank line. The shorthand writer's bracketed notes stay in parentheses, as on paper: «(Muy bien.—Aplausos.)».

Words that the Diario split with a hyphen at the end of a line have been rejoined. Reading errors have not been corrected.

Back to contents

Before you count: four decisions that change the result

None has a right answer for everyone. Each comes with its number and the line that applies it.

  1. The Chair

    44.85% of the rows belong to the Chair. They take 10.24% of the words.

    To count speakers, remove it. Keep it if you study how the debate was run: who gave the floor, who called to order.

    The site identifies it with the explorer's heading parser, which also reads the reading errors.

    One line of pandas comes close: it flags 48,203 rows. The parser flags 48,241, because it also reads headings such as «PERSIDENTE».

    pres = d.speaker.str.contains("PRESIDENTE") & ~d.speaker.str.contains("CONSEJO|GOBIERNO|REPÚBLICA")
    oradores = d[~pres]
  2. Rows are not speeches

    66.53% of the rows have 50 words or fewer. There are 17,362 rows of more than 300 words.

    Those long rows hold 86.18% of all the words. If you study speeches, set a minimum and say so.

    If you study interruptions or procedure, the short rows are exactly your data.

    largas = d[d.nwords > 300]
  3. What a word is

    nwords splits the text on spaces; split() also splits on line breaks and gives more words. Say which one you use.

    d.speech.str.split().str.len().sum()   # compared with d.nwords.sum()
  4. Unequal legislatures

    The first legislature holds 53.28% of the words. Compare rates, not volumes: words per session, or each group's share within its legislature.

    A rate can reverse the order. Per session, the first legislature has 32,016 words.

    The second, with fewer words in total, has 34,334 per session.

    The third legislature, 1936-1939, brings together three very different stages. To separate them, cut by session number: up to session 60, the Cortes of 1936, until 10 July.

    Sessions 61 to 69 are the Cortes at war, from October 1936 to February 1939. Sessions 70 to 74 are those held in Mexico, in 1945.

    d.groupby("legislature").nwords.sum() / d.nwords.sum()
    etapa = pd.cut(d.num_session, [0, 60, 69, 74], labels=["1936", "guerra", "México"])
    d[d.legislature == "1936-1939"].groupby(etapa).nwords.sum()

Back to contents

Joining with Afinidades Elegidas

Afinidades Elegidas has one record per deputy and legislature. It is joined to this dataset by both, never by the deputy alone.

The key is the deputy, rep_id, called id_dip there, plus the legislature. Before joining, recode the second legislature as the census calls it: 1933-1935 becomes 1933-1936.

A few deputy–legislature pairs have no record in the Afinidades census: their rows are left without Afinidades attributes. The table below counts them, with the version they come from.

If you join by the deputy alone, each row is repeated once for every legislature of its deputy, and any sum comes out inflated.

The Afinidades table gives, for each deputy and legislature, the name, district, party, family and ideology, with the Afinidades codes.

They do not always match those of this dataset: sometimes the party is written differently, nearly always «Indep.» against «Independiente».

If you use those attributes, say which dataset they come from.

By deputy and legislature, never by the deputy alone

How do you join the dataset with Afinidades Elegidas without multiplying rows?

  1. The deposited CSV, before joining107,551
  2. Joined by deputy and legislature107,551Of these, with no record in Afinidades: 426
  3. Joined by the deputy alone247,327139,776 repeated rows
By deputy and legislature, never by the deputy alone
StepResult
Recode legislature 1933-1935 as 1933-1936Both datasets refer to the same legislature
Join by deputy and legislature107,551 rows, the same as before
Deputy–legislature pairs that match1,047 of 1,060
Pairs with no record in Afinidades13 pairs, 426 rows
Join by the deputy alone (wrong)247,327 rows
Pairs with a different party label31
The pairs with no record, one by one
DeputyLegislatureRows
Gerardo Abad Conde rep_id 11933-19359
Emilio Baeza Medina rep_id 971933-19351
José Estadella rep_id 2891933-193532
Salvador Madariaga rep_id 5131933-19354
Manuel Marraco rep_id 5381933-1935210
Ángel Menéndez Suárez rep_id 5901933-193512
Manuel Portela Valladares rep_id 7451933-193569
Manuel Rico Avello rep_id 7841933-193540
Juan Usabiaga rep_id 9651933-193522
Antonio de la Villa rep_id 10051933-19351
José Álvarez Buylla rep_id 481936-19398
Francisco Barnés rep_id 1071936-193916
José Morales Robles rep_id 6221936-19392
The pairs with a different party label, one by one
DeputyLegislatureParty in the datasetParty in Afinidades
Rafael Aizpún1931-1933Indep.Independiente
Santiago Alba1931-1933Indep.Independiente
Benito Blanco-Rajoy1931-1933Indep. de derechasIndependiente
Rufino Cano de Rueda1931-1933Indep.Independiente
Roberto Castrovido1931-1933Indep.Independiente
Luis Cornide1931-1933Indep.Independiente
Jerónimo García Gallego1931-1933Indep.Independiente
José Giral1931-1933ACRAR
Francisco Molleda1931-1933Indep.Independiente
Ángel Ossorio Gallardo1931-1933Indep.Independiente
Manuel Portela Valladares1931-1933Indep.Independiente
Amós Ruiz Lecina1931-1933ARPSOE
José Sánchez Guerra1931-1933Indep.Independiente
Felipe Sánchez Román1931-1933Indep.Independiente
Luis de Tapia1931-1933Indep.Independiente
Santiago Alba1933-1936Indep.PRR
Ángel Aperribay1933-1936Derecha Indep.Independiente
Álvaro Figueroa y Torres1933-1936Indep.Independiente
Raimundo García1933-1936Indep.Independiente
Ruperto González Negrín1933-1936Indep.Independiente
Vicente Iranzo1933-1936Indep.Independiente
Mariano Matesanz1933-1936Indep.Independiente
Eduardo O'Shea1933-1936Indep. de derechasIndependiente
Gumersindo Rico González1933-1936Indep.Independiente
Manuel Saco Rivera1933-1936Indep.Independiente
Agustín Virgili1933-1936Indep.Independiente
Álvaro de Albornoz1936-1939Indep.Independiente
José Antonio Canals1936-1939Indep.Independiente
Álvaro de Figueroa y Alonso Martínez1936-1939Indep.Independiente
Raimundo García1936-1939Indep.Independiente
Benito Pabón1936-1939Indep.Independiente
Download the figure data

CSV and Excel, with a README in Spanish and in English.

No form: these are aggregate data.

Source
Luz y Taquígrafos
Afinidades Elegidas (CGOCUS)
Checksum: 360332a0ff13
Numbers exported on
How to cite
Rodrigues-Silveira, Rodrigo; García-Díez, Fátima; Llamazares, Iván; Martínez-Barahona, Elena; Barreto Martín, Eduardo. ‘By deputy and legislature, never by the deputy alone’. Figure from Luz y Taquígrafos. https://luz.parlaibero.es/en/datos/#unir. Source: Luz y Taquígrafos · 360332a0ff13. Exported on .

Before you read it Numbers from the Afinidades Elegidas deposit (CGOCUS).

The Afinidades Elegidas table of deputies is downloaded as representative_metadata.tab, tab-separated, from the CGOCUS deposit.

Harvard Dataverse asks for no registration or form before you download.

Download from Dataverse 

Back to contents

Two snippets, in R and in Python

They load the CSV, check its rows, count each legislature and perform both joins with Afinidades, the right one and the wrong one. They give the same result in both languages.

They reproduce numbers from this site: the sessions, rows and words of each legislature, and the 64 months with a session.

They also reproduce February 1933, the month of Casas Viejas: 16 sessions. That month has 1,843 rows.

Its rows hold 574,317 words.

They need two files in the same folder: 2REP_Diaries.csv, from THQCMI, and representative_metadata.tab, from CGOCUS.

R, no packages

# The deposited CSV (THQCMI V2.0): ";" as separator, UTF-8, every field in quotes.
d <- read.csv2("2REP_Diaries.csv", fileEncoding = "UTF-8")
stopifnot(nrow(d) == 107551)

# CAVEAT. A row is what the Diario prints between two speaker headings, not a speech.
# The Chair's rows go under the name of whoever is in the Chair. nwords counts pieces separated
# by the space character. A session is (date, num_session): num_session restarts at 1 in each legislature.
ses <- unique(d[, c("legislature", "date", "num_session")])
t <- data.frame(sesiones = c(table(ses$legislature)),
                filas    = c(table(d$legislature)),
                palabras = c(tapply(d$nwords, d$legislature, sum)))
print(t)

mes <- substr(d$date, 1, 7)
cat("meses con sesión:", length(unique(mes)), "\n")
feb <- d[mes == "1933-02", ]
cat("febrero de 1933:", nrow(unique(feb[, c("date", "num_session")])), "sesiones,",
    nrow(feb), "filas,", sum(feb$nwords), "palabras\n")

# Afinidades Elegidas (CGOCUS): one record per deputy AND legislature.
a <- read.delim("representative_metadata.tab", fileEncoding = "UTF-8")
names(a)[names(a) == "id_dip"] <- "rep_id"

# WRONG: by the deputy alone. Each row is repeated once for every legislature of its deputy.
mal <- merge(d, a, by = "rep_id", all.x = TRUE)
cat("unión solo por el id:", nrow(mal), "filas\n")

# RIGHT: by deputy and legislature. The CGOCUS census calls 1933-1936 what is 1933-1935 here.
d$legislatura <- ifelse(d$legislature == "1933-1935", "1933-1936", d$legislature)
bien <- merge(d, a, by = c("rep_id", "legislatura"), all.x = TRUE)
sin <- bien[!is.na(bien$rep_id) & is.na(bien$nombre_completo), ]
cat("unión por id y legislatura:", nrow(bien), "filas;", nrow(sin), "filas y",
    nrow(unique(sin[, c("rep_id", "legislatura")])), "pares sin ficha en CGOCUS\n")

Python, with pandas

import pandas as pd

# The deposited CSV (THQCMI V2.0): ";" as separator, UTF-8, every field in quotes.
d = pd.read_csv("2REP_Diaries.csv", sep=";", dtype={"rep_id": "Int64"})
assert len(d) == 107551

# CAVEAT. A row is what the Diario prints between two speaker headings, not a speech.
# The Chair's rows go under the name of whoever is in the Chair. nwords counts pieces separated
# by the space character. A session is (date, num_session): num_session restarts at 1 in each legislature.
ses = d[["legislature", "date", "num_session"]].drop_duplicates()
t = pd.DataFrame({"sesiones": ses.groupby("legislature").size(),
                  "filas": d.groupby("legislature").size(),
                  "palabras": d.groupby("legislature")["nwords"].sum()})
print(t)

mes = d["date"].str[:7]
print("meses con sesión:", mes.nunique())
feb = d[mes == "1933-02"]
print("febrero de 1933:", len(feb[["date", "num_session"]].drop_duplicates()), "sesiones,",
      len(feb), "filas,", feb["nwords"].sum(), "palabras")

# Afinidades Elegidas (CGOCUS): one record per deputy AND legislature.
a = pd.read_csv("representative_metadata.tab", sep="\t").rename(columns={"id_dip": "rep_id"})

# WRONG: by the deputy alone. Each row is repeated once for every legislature of its deputy.
mal = d.merge(a, on="rep_id", how="left")
print("unión solo por el id:", len(mal), "filas")

# RIGHT: by deputy and legislature. The CGOCUS census calls 1933-1936 what is 1933-1935 here.
d["legislatura"] = d["legislature"].replace({"1933-1935": "1933-1936"})
bien = d.merge(a, on=["rep_id", "legislatura"], how="left", validate="many_to_one")
sin = bien[bien["rep_id"].notna() & bien["nombre_completo"].isna()]
print("unión por id y legislatura:", len(bien), "filas;", len(sin), "filas y",
      len(sin[["rep_id", "legislatura"]].drop_duplicates()), "pares sin ficha en CGOCUS")

Output, the same for both, run on 23 September 2026

             sesiones  filas  palabras
legislature                           
1931-1933         405  61355  12966290
1933-1935         276  40342   9476120
1936-1939          74   5854   1893486
meses con sesión: 64
febrero de 1933: 16 sesiones, 1843 filas, 574317 palabras
unión solo por el id: 247327 filas
unión por id y legislatura: 107551 filas; 426 filas y 13 pares sin ficha en CGOCUS

Python 3.12.7 · pandas 3.0.3 · R 4.5.2

Download the output of both snippets

Back to contents

How to cite

Cite what you used. The citation of a figure also gives its date.

The dataset. The official Harvard Dataverse citation, as text, BibTeX or RIS.

Rodrigues-Silveira, Rodrigo; García-Díez, Fátima; Llamazares, Iván; Martínez-Barahona, Elena; Barreto Martín, Eduardo, 2026, "Luz y Taquígrafos: Parliamentary Debates in the Second Spanish Republic, 1931–1945", https://doi.org/10.7910/DVN/THQCMI, Harvard Dataverse, V2

@dataset{thqcmi_2026,
  title = {Luz y Taquígrafos: Parliamentary Debates in the Second Spanish Republic, 1931–1945},
  author = {Rodrigues-Silveira, Rodrigo and García-Díez, Fátima and Llamazares, Iván and Martínez-Barahona, Elena and Barreto Martín, Eduardo},
  year = {2026},
  publisher = {Harvard Dataverse},
  version = {2.0},
  doi = {10.7910/DVN/THQCMI},
  url = {https://doi.org/10.7910/DVN/THQCMI}
}

TY  - DATA
TI  - Luz y Taquígrafos: Parliamentary Debates in the Second Spanish Republic, 1931–1945
AU  - Rodrigues-Silveira, Rodrigo
AU  - García-Díez, Fátima
AU  - Llamazares, Iván
AU  - Martínez-Barahona, Elena
AU  - Barreto Martín, Eduardo
PY  - 2026
PB  - Harvard Dataverse
ET  - 2.0
DO  - 10.7910/DVN/THQCMI
UR  - https://doi.org/10.7910/DVN/THQCMI
ER  - 

As given by Harvard Dataverse.

Afinidades Elegidas. Copy it as Dataverse gives it, with its UNF.

Rodrigues-Silveira, Rodrigo; García-Díez, Fátima; Llamazares, Iván; Martínez-Barahona, Elena; Barreto Martín, Eduardo, 2026, "Afinidades Elegidas: Parliamentary Cosponsorship Networks of the Spanish Second Republic (1931-1939)", https://doi.org/10.7910/DVN/CGOCUS, Harvard Dataverse, V1, UNF:6:CMFrKjuOq5l9fBChyzsMsQ== [fileUNF]

@dataset{cgocus_2026,
  title = {Afinidades Elegidas: Parliamentary Cosponsorship Networks of the Spanish Second Republic (1931-1939)},
  author = {Rodrigues-Silveira, Rodrigo and García-Díez, Fátima and Llamazares, Iván and Martínez-Barahona, Elena and Barreto Martín, Eduardo},
  year = {2026},
  publisher = {Harvard Dataverse},
  version = {1.1},
  doi = {10.7910/DVN/CGOCUS},
  url = {https://doi.org/10.7910/DVN/CGOCUS}
}

TY  - DATA
TI  - Afinidades Elegidas: Parliamentary Cosponsorship Networks of the Spanish Second Republic (1931-1939)
AU  - Rodrigues-Silveira, Rodrigo
AU  - García-Díez, Fátima
AU  - Llamazares, Iván
AU  - Martínez-Barahona, Elena
AU  - Barreto Martín, Eduardo
PY  - 2026
PB  - Harvard Dataverse
ET  - 1.1
DO  - 10.7910/DVN/CGOCUS
UR  - https://doi.org/10.7910/DVN/CGOCUS
ER  - 

Cite it as Harvard Dataverse gives it.

A figure. Its title, the address of its anchor and the date of calculation. Each figure gives its own in the Data tab.

A passage. The date and number of the session, and the row id. For example: Diario de Sesiones, 1 October 1931, session 48; Luz y Taquígrafos, row 5424.

Both datasets are licensed under CC BY 4.0: you may use, adapt and redistribute the data if you cite the source.

Back to contents

Errors and contact

If you find an error, tell us the date, the session number, the row id and what the printed Diario says. If you are not sure where to start, write to us as well.

Report an errorContact us

Back to contents