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.
Where to start
Choose by what you already know how to do.
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.
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.
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.
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.
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.
Two people with the same dataset can reach different results without either being wrong. The analytical decisions are yours, and this page shows them.
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.
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.
| File | Bytes | What it is | MD5 |
|---|---|---|---|
2REP_Diaries.csv | 165,785,782 | The data: one row per printed turn. | 360332a0ff1327671530f15eed46ac0c |
changelog_es_09_2026.txt | 704 | The change log, in Spanish. | 096580562ab5c7fac1c602e99086174e |
changelog_en_09_2026.txt | 680 | The same, in English. | 235b312ad40d98067ca5c885e513ce16 |
Luz_y_Taquigrafos_README.txt | 8,340 | The 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.
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 does each column mean?
idinteger · none emptyThe 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
num_sessioninteger · none emptyThe 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
orderinteger · none emptyThe place of the row in its session, counted from zero.
- The Chair
25- Clara Campoamor
26
datedate · none emptyThe date of the session, in YYYY-MM-DD format. Some days had two sessions.
- The Chair
1931-10-01- Clara Campoamor
1931-10-01
speakertext · none emptyThe 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:
speechtext · none emptyThe 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
rep_idinteger · 147 emptyThe 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
rep_nametext · 147 emptyThe deputy's full name, without accents and with each word capitalised.
- The Chair
Julian Besteiro Fernandez- Clara Campoamor
Clara Campoamor Y Rodriguez
districttext · 147 emptyThe constituency for which the deputy was elected.
- The Chair
Madrid- Clara Campoamor
Madrid
partytext · 147 emptyThe initials of the deputy's party in that legislature.
- The Chair
PSOE- Clara Campoamor
PRR
party_familytext · 151 emptyThe deputy's party family.
- The Chair
Socialista- Clara Campoamor
Republicanos
ideologytext · 147 emptyThe position of the deputy's party, from EI, far left, to ED, far right.
- The Chair
I- Clara Campoamor
C
nwordsinteger · none emptyThe words in the text, split on the space character.
- The Chair
7- Clara Campoamor
1460
legislaturetext · none emptyLegislature: 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
| Column | Type | Empty | Distinct | The Chair | Clara Campoamor |
|---|---|---|---|---|---|
id | integer | 0 | 107,551 | 5423 | 5424 |
num_session | integer | 0 | 405 | 48 | 48 |
order | integer | 0 | 586 | 25 | 26 |
date | date | 0 | 752 | 1931-10-01 | 1931-10-01 |
speaker | text | 0 | 2,370 | El Sr. PRESIDENTE: | La Srta. CAMPOAMOR: |
speech | text | 0 | 68,760 | Ruego 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_id | integer | 147 | 773 | 133 | 175 |
rep_name | text | 147 | 773 | Julian Besteiro Fernandez | Clara Campoamor Y Rodriguez |
district | text | 147 | 54 | Madrid | Madrid |
party | text | 147 | 39 | PSOE | PRR |
party_family | text | 151 | 33 | Socialista | Republicanos |
ideology | text | 147 | 8 | I | C |
nwords | integer | 0 | 3,805 | 7 | 1460 |
legislature | text | 0 | 3 | 1931-1933 | 1931-1933 |
The same data as the chart, in rows.
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.
With the keyboard: Tab moves to the figure; ← and → step through its marks; Home and End go to the first and the last; Esc closes the note.
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.
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.
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]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]What a word is
nwordssplits 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()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()
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.
How do you join the dataset with Afinidades Elegidas without multiplying rows?
| Step | Result |
|---|---|
| Recode legislature 1933-1935 as 1933-1936 | Both datasets refer to the same legislature |
| Join by deputy and legislature | 107,551 rows, the same as before |
| Deputy–legislature pairs that match | 1,047 of 1,060 |
| Pairs with no record in Afinidades | 13 pairs, 426 rows |
| Join by the deputy alone (wrong) | 247,327 rows |
| Pairs with a different party label | 31 |
The pairs with no record, one by one
| Deputy | Legislature | Rows |
|---|---|---|
| Gerardo Abad Conde rep_id 1 | 1933-1935 | 9 |
| Emilio Baeza Medina rep_id 97 | 1933-1935 | 1 |
| José Estadella rep_id 289 | 1933-1935 | 32 |
| Salvador Madariaga rep_id 513 | 1933-1935 | 4 |
| Manuel Marraco rep_id 538 | 1933-1935 | 210 |
| Ángel Menéndez Suárez rep_id 590 | 1933-1935 | 12 |
| Manuel Portela Valladares rep_id 745 | 1933-1935 | 69 |
| Manuel Rico Avello rep_id 784 | 1933-1935 | 40 |
| Juan Usabiaga rep_id 965 | 1933-1935 | 22 |
| Antonio de la Villa rep_id 1005 | 1933-1935 | 1 |
| José Álvarez Buylla rep_id 48 | 1936-1939 | 8 |
| Francisco Barnés rep_id 107 | 1936-1939 | 16 |
| José Morales Robles rep_id 622 | 1936-1939 | 2 |
The pairs with a different party label, one by one
| Deputy | Legislature | Party in the dataset | Party in Afinidades |
|---|---|---|---|
| Rafael Aizpún | 1931-1933 | Indep. | Independiente |
| Santiago Alba | 1931-1933 | Indep. | Independiente |
| Benito Blanco-Rajoy | 1931-1933 | Indep. de derechas | Independiente |
| Rufino Cano de Rueda | 1931-1933 | Indep. | Independiente |
| Roberto Castrovido | 1931-1933 | Indep. | Independiente |
| Luis Cornide | 1931-1933 | Indep. | Independiente |
| Jerónimo García Gallego | 1931-1933 | Indep. | Independiente |
| José Giral | 1931-1933 | ACR | AR |
| Francisco Molleda | 1931-1933 | Indep. | Independiente |
| Ángel Ossorio Gallardo | 1931-1933 | Indep. | Independiente |
| Manuel Portela Valladares | 1931-1933 | Indep. | Independiente |
| Amós Ruiz Lecina | 1931-1933 | AR | PSOE |
| José Sánchez Guerra | 1931-1933 | Indep. | Independiente |
| Felipe Sánchez Román | 1931-1933 | Indep. | Independiente |
| Luis de Tapia | 1931-1933 | Indep. | Independiente |
| Santiago Alba | 1933-1936 | Indep. | PRR |
| Ángel Aperribay | 1933-1936 | Derecha Indep. | Independiente |
| Álvaro Figueroa y Torres | 1933-1936 | Indep. | Independiente |
| Raimundo García | 1933-1936 | Indep. | Independiente |
| Ruperto González Negrín | 1933-1936 | Indep. | Independiente |
| Vicente Iranzo | 1933-1936 | Indep. | Independiente |
| Mariano Matesanz | 1933-1936 | Indep. | Independiente |
| Eduardo O'Shea | 1933-1936 | Indep. de derechas | Independiente |
| Gumersindo Rico González | 1933-1936 | Indep. | Independiente |
| Manuel Saco Rivera | 1933-1936 | Indep. | Independiente |
| Agustín Virgili | 1933-1936 | Indep. | Independiente |
| Álvaro de Albornoz | 1936-1939 | Indep. | Independiente |
| José Antonio Canals | 1936-1939 | Indep. | Independiente |
| Álvaro de Figueroa y Alonso Martínez | 1936-1939 | Indep. | Independiente |
| Raimundo García | 1936-1939 | Indep. | Independiente |
| Benito Pabón | 1936-1939 | Indep. | Independiente |
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.
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
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.
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.