-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathcodebook-flier.tex
More file actions
180 lines (178 loc) · 12.7 KB
/
codebook-flier.tex
File metadata and controls
180 lines (178 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
% Created 2025-12-11 Thu 13:33
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\documentclass[letter,12pt]{article}
\usepackage[letterpaper,right=.7in,left=.7in,top=.7in,bottom=.7in]{geometry}
\usepackage{mathptmx} % set font type to Times
\usepackage[scaled=.90]{helvet} % set font type to Times (Helvetica for some special characters)
\usepackage{courier} % set font type to Times (Courier for other special characters)
\usepackage{sectsty} % manipulates section header style
\sectionfont{\centering} % centers section headers
\subsectionfont{\centering} % centers subsection headers
\usepackage{fancyhdr} % adds page header
\pagestyle{fancy} % adds page header
\lhead{Codebook} % adds page header
\rhead{\thepage} % adds page header
\cfoot{~~\small{\url{https://github.com/emagar/elecRetrns}}}
\author{\url{https://github.com/emagar/elecRetrns}}
\date{\today}
\title{Codebook for datafiles\\\medskip
\large Recent Mexican election vote returns repository}
\hypersetup{
pdfauthor={\url{https://github.com/emagar/elecRetrns}},
pdftitle={Codebook for datafiles},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 27.1 (Org mode 9.3)},
pdflang={English}}
\begin{document}
\maketitle
\section{Variables grouped by type}
\label{sec:org14b5dd1}
\subsection{Unit IDs}
\label{sec:org2104d42}
\begin{description}
\item[edon] = state numeral 1:32.
\item[edo] = state abbreviation (may differ from commonly used abbreviations, so that sorting them alphabetically preserves the order set by edon, eg. Chiapas is cps, not chis).
\item[disn] = district identifier = edon * 100 + district numeral.
\item[cab] = cabecera, district's administrative center.
\item[inegi, ife] = municipal identifier codes used by the INEGI and the IFE/INE, respectively.
\item[mun] = municipality's name.
\item[emm] = unit's identifying code. It concatenates the state's /edo/ abbreviation (then a hyphen) two sequential digits for the election cycle (then a period) and, depending on the level of observation, the /inegi/ or district identifier. Using /emm/ as sort criterion returns a state-time-unit ordering.
\item[demar] = demarcación identifier = inegi + 1/100 demarcación numeral (used for Nayarit municipal elections only).
\item[seccion] = voting precinct identifier = /edon/ * 10000 + sección electoral numeral (as set by IFE/INE).
\item[casilla] = polling station identifier (as set by IFE/INE). There are four types of stations, coded B for /Básica/, C for /Contigua/, E for /Extraordinaria/, and S for /Especial/.
# \item[circ] = secondary, proportional representation district (circunscripción plurinominal) the primary district belongs to.
\item[latitude, longitude] = coordinates indicating a polling booths's north--south and east--west position in a map. Available for federal deputy and presidential casilla-level returns in the 2006, 2009, 2015, and 2018 elections.
\end{description}
\subsection{Temporal IDs}
\label{sec:orge508ef4}
\begin{description}
\item[yr, mo, dy] = year, month, day of the election.
\item[date.el, date.in] = date of the election and start of term, respectively.
\item[dextra] = dummy equal 1 for special elections (elección extraordinaria), 0 otherwise.
\item[danul] = dummy equal 1 for voided elections, 0 otherwise.
\item[dconcgo] = indicates concurrence of the unit's election with a gubernatorial election in the state.
\item[dconcdl] = indicates concurrence of the unit's election with a state assembly election.
\item[dconcpr] = indicates concurrence of the unit's election with a presidential election.
\item[dconcdf] = indicates concurrence of the unit's election with a congressional election.
\end{description}
\subsection{Voting}
\label{sec:org1d4f070}
\begin{description}
\item[v01, v02, ...] = raw vote for candidate 1, 2, etc.
\item[l01, l02, ...] = label of candidate 1's, 2's, ... party or coalition.
\item[c01, c02, ...] = candidate 1's, 2's, ... name.
\item[efec] = effective vote total, equal the sum of raw votes minus votes for write-in candidates minus invalid ballots. This is the denominator to compute vote shares.
\item[lisnom] = unit's total eligible voters (lista nominal).
\item[nr] = votes for write-in candidates (candidatos no registrados, void in Mexican election law).
\item[nul, nulos] = invalid ballots (votos nulos).
\item[tot] = total raw votes.
\item[win] = winner's party or coalition.
\item[ncand] = number of candidates running.
# \item[dcoal] = dummy equal 1 if at least one candidate ran on a multi-party pre-electoral coalition, 0 otherwise.
\item[ncoal] = number of candidates who ran on multi-party pre-electoral coalitions.
# \item[coalpan, coalpri, coalprd] = members of major-party coalitions ('no' indidates no coalition).
\item[dfake] = indicates an attempt to complete missing hegemonic era races (mostly in the 1960s and 70s) for the purpose of computing vote lags, made up of press reports and best guesses about what happened in the state's race.
\end{description}
\subsection{Historical performance}
\label{sec:org23f1348}
\begin{description}
\item[d.pan, d.pri, d.left] = first difference in the party's federal deputy vote share from last to present election.
\item[vhat.pan, vhat.pri, vhat.left] = predicted federal deputy vote share in the unit for the current election, a linear projection of the last five races.
\item[bhat.pan, bhat.left] = slope estimate of the party's autoregressive linear model for the unit. The PRI used as reference vote and has no slope estimate.
\item[alphahat.pan, alphahat.pri, alphahat.left] = party's alpha estimated for the unit.
\item[betahat.pan, betahat.left] = party's beta estimate for the unit. The PRI used as reference vote and has no beta estimate.
\item[dbackward] = dummy equal 1 if prediction with autoregressive model performed backwards, 0 otherwise.
\end{description}
\subsection{Candidates and incumbents}
\label{sec:orge1bb4aa}
\begin{description}
\item[incumbent, runnerup] = winning and runner-up candidates' names.
\item[propietario, suplente] = primary and substitute candidate's name, respectively.
\item[part] = incumbent/candidate's party or coalition.
\item[part.2nd] = runner-up party or coalition.
\item[mg] = winner's margin = winner's vote share minus runner-up's vote share.
\item[dmujer] = dummy equal 1 if candidate/incumbent is a woman, 0 otherwise.
\item[race.after] = incumbent's status in the next consecutive race. The repository's README file describes categories and coding procedure.
\item[dreran] = dummy equal 1 if incumbent ran again in the next consecutive race for the same office.
\item[dreelected] = dummy equal 1 if incumbent won the next consecutive race for the same office.
\item[dcarta] = dummy equal 1 if member of Congress filed a letter of intent with the chamber's Junta to run for office again; 0 otherwise. Inapplicable before 2018.
\item[lista] = candidate's rank in senate two-member party lists. Top member of runner-up vote-getting list wins the state's third senate seat.
\item[drp] = dummy equal 1 if candidate ran for a PR seat, 0 otherwise.
\item[ddied] = dummy equal 1 if incumbent died in office, 0 otherwise.
\end{description}
\newpage
\section{Variables in alphabetical order}
\label{sec:org27c0f49}
\begin{description}
\item[alphahat.pan, alphahat.pri, alphahat.left] = party's alpha estimated for the unit.
\item[betahat.pan, betahat.left] = party's beta estimate for the unit. The PRI used as reference vote and has no beta estimate.
\item[bhat.pan, bhat.left] = slope estimate of the party's autoregressive linear model for the unit. The PRI used as reference vote and has no slope estimate.
\item[c01, c02, ...] = candidate 1's, 2's, ... name.
\item[cab] = cabecera, district's administrative center.
\item[casilla] = polling station identifier (as set by IFE/INE). There are four types of stations, coded B for /Básica/, C for /Contigua/, E for /Extraordinaria/, and S for /Especial/.
\item[d.pan, d.pri, d.left] = first difference in the party's federal deputy vote share from last to present election.
\item[danul] = dummy equal 1 for voided elections, 0 otherwise.
\item[date.el] = election date.
\item[date.in] = start of term date.
\item[dbackward] = dummy equal 1 if prediction with autoregressive model performed backwards, 0 otherwise.
\item[dcarta] = dummy equal 1 if member of Congress filed a letter of intent with the chamber's Junta to run for office again; 0 otherwise. Inapplicable before 2018.
\item[dconcdf] = indicates concurrence of the unit's election with a congressional election.
\item[dconcdl] = indicates concurrence of the unit's election with a state assembly election.
\item[dconcgo] = indicates concurrence of the unit's election with a gubernatorial election in the state.
\item[dconcpr] = indicates concurrence of the unit's election with a presidential election.
\item[ddied] = dummy equal 1 if incumbent died in office, 0 otherwise.
\item[demar] = demarcación identifier = inegi + 1/100 demarcación numeral (used for Nayarit municipal elections only).
\item[dextra] = dummy equal 1 for special elections (elección extraordinaria), 0 otherwise.
\item[dfake] = indicates an attempt to complete missing hegemonic era races (mostly in the 1960s and 70s) for the purpose of computing vote lags, made up of press reports and best guesses about what happened in the state's race.
\item[disn] = district identifier = edon * 100 + district numeral.
\item[dmujer] = dummy equal 1 if candidate/incumbent is a woman, 0 otherwise.
\item[dreelected] = dummy equal 1 if incumbent won the next consecutive race for the same office.
\item[dreran] = dummy equal 1 if incumbent ran again in the next consecutive race for the same office.
\item[drp] = dummy equal 1 if candidate ran for a PR seat, 0 otherwise.
\item[dy] = day of the election.
\item[edo] = state abbreviation (may differ from commonly used abbreviations, so that sorting them alphabetically preserves the order set by edon, eg. Chiapas is cps, not chis).
\item[edon] = state numeral 1:32.
\item[efec] = effective vote total, equal the sum of raw votes minus votes for write-in candidates minus invalid ballots. This is the denominator to compute vote shares.
\item[emm] = unit's identifying code. It concatenates the state's /edo/ abbreviation (then a hyphen) two sequential digits for the election cycle (then a period) and, depending on the level of observation, the /inegi/ or district identifier. Using /emm/ as sort criterion returns a state-time-unit ordering.
\item[ife] = municipal identifier codes used by the IFE/INE.
\item[incumbent, runnerup] = winning and runner-up candidates' names.
\item[inegi] = municipal identifier codes used by the INEGI.
\item[l01, l02, ...] = label of candidate 1's, 2's, ... party or coalition.
\item[latitude] = coordinates indicating a polling booths's north--south position in a map. Available for federal deputy and presidential casilla-level returns in the 2006, 2009, 2015, and 2018 elections.
\item[lisnom] = unit's total eligible voters (lista nominal).
\item[lista] = candidate's rank in senate two-member party lists. Top member of runner-up vote-getting list wins the state's third senate seat.
\item[longitude] = coordinates indicating a polling booths's east--west position in a map. Available for federal deputy and presidential casilla-level returns in the 2006, 2009, 2015, and 2018 elections.
\item[mg] = winner's margin = winner's vote share minus runner-up's vote share.
\item[mo] = month of the election.
\item[mun] = municipality's name.
\item[ncand] = number of candidates running.
\item[ncoal] = number of candidates who ran on multi-party pre-electoral coalitions.
\item[nr] = votes for write-in candidates (candidatos no registrados, void in Mexican election law).
\item[nul, nulos] = invalid ballots (votos nulos).
\item[part.2nd] = runner-up party or coalition.
\item[part] = incumbent/candidate's party or coalition.
\item[propietario, suplente] = primary and substitute candidate's name, respectively.
\item[race.after] = incumbent's status in the next consecutive race. The repository's README file describes categories and coding procedure.
\item[seccion] = voting precinct identifier = /edon/ * 10000 + sección electoral numeral (as set by IFE/INE).
\item[tot] = total raw votes.
\item[v01, v02, ...] = raw vote for candidate 1, 2, etc.
\item[vhat.pan, vhat.pri, vhat.left] = predicted federal deputy vote share in the unit for the current election, a linear projection of the last five races.
\item[win] = winner's party or coalition.
\item[yr] = year of the election.
\end{description}
\end{document}