\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{animate}
\usepackage{setspace}
\usepackage{graphicx}
\newcommand{\ffbox}[1]{%
  {% open a group for a local setting
   \setlength{\fboxsep}{-2\fboxrule}% the rule will be inside the box boundary
   \fbox{\hspace{1.2pt}\strut#1\hspace{1.2pt}}% print the box, with some padding at the left and right
  }% close the group
}

\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows, matrix}

% \title{Gerrymandering xx}
\title{Applications of Ensemble Analysis to \\ Gerrymandering in Minnesota and Texas}
\author{Eva Airoldi, Oliver Calder, Tom Patterson, Antonia Ritter, Bekka Stein}
\date{Carleton College}

\usetheme{lucid}

% set the space between paragraphs/bullet points 
\setlength{\parskip}{1em}

\begin{document}
\frame{
 \titlepage
}


\begin{frame}{What is Gerrymandering?}  %Tom

Every 10 years, every state's congressional district map is re-drawn based on the updated population count from the census. 

\begin{definition}
\textbf{Gerrymandering} is the practice of drawing electoral districts to benefit one group (political party or racial/ethnic group). 
%\textbf{Political or Partisan Gerrymandering} is drawing boundaries that benefit one party, while \textbf{Racial Gerrymandering} involves diluting the voting power of members of ethnic or linguistic minority groups. 
\end{definition}

\begin{center}
\includegraphics[width=4cm]{gerrymander.png}
% \caption{``The Gerry-mander" by Elkanah Tisdale}
\includegraphics[width=4cm]{Gerrymander_real.png}
% \caption{Actual map of the Gerry-mander}
% \caption{Massachusetts State senate district drawn in 1812}
\end{center}

\end{frame}


\begin{frame}{Cracking and Packing} %Eva
\begin{center}
\includegraphics[width=10cm]{packing_cracking.jpg}
% https://bcourses.berkeley.edu/courses/1041584/pages/political-capture
\end{center}
% \cite{lwv}
\end{frame}


\begin{frame}{Redistricting Today} %Tom
Legal Requirements for Districts: 
% \vspace{-.37cm}

\begin{itemize}
\setlength\itemsep{1.5em}
    \item Equal population 
    \item As compact as possible - that is, close to a circle or convex polygon
    \item Does not split existing political boundaries (typically counties) 
    \item Complies with the Voting Rights Act (VRA) 
\end{itemize}
\end{frame}



\begin{frame}{Motivation for Ensemble Analysis} %Bekka

\begin{spacing}{1.5}
{\Large “Gerrymandering is a fundamentally multidimensional problem, so it is manifestly impossible to convert that into a single number without a loss of information that is bound to produce many false positives or false negatives for gerrymandering.”} 
\end{spacing}

\hspace{7cm}---Moon Duchin 
\end{frame}


\begin{frame}{The Big Picture} %Antonia

\begin{itemize}
    \setlength\itemsep{1.5em}
    \item How can we detect gerrymandering?
    \item Think about the space of all possible, legal districting maps (it's big) 
    \item We sample from that space -- and call the sample our \textbf{ensemble}
    \item If the real map is an outlier in that sample, that's an indication that someone worked to make the map abnormal 
\end{itemize} 

\textit{Through gerrymandering is an issue in local redistricting, we only examine U.S. Congressional districting maps today}
    
\end{frame}




\begin{frame}{Ensemble Analysis} %Oliver

\vspace{0.15cm}
\begin{definition}
An \textbf{ensemble} for a given state is a set of random, legal maps which is representative of the set of all possible legal maps in this state. 
\end{definition}

\vspace{0.4cm}

\hspace{5.5cm} Once an ensemble exists, we can \\ 
\hspace{5.5cm} compare characteristics (such as \\
\hspace{5.5cm} efficiency gap, partisan bias, \\
\hspace{5.5cm} responsiveness, etc.) of a proposed \\
\hspace{5.5cm} map to the distribution of values for \\
\hspace{5.5cm} maps in the ensemble.
% Talk about how MCMC converges to give a representative sample of the space of all legal maps

\vspace{-3.6cm}
\begin{right}
    \includegraphics[width = 5cm]{generic_histogram_2.png}
\end{right} 
\end{frame}



\begin{frame}{Markov Chain Monte Carlo Summary} %Eva 
\begin{columns}
    \begin{column}{0.45\textwidth}
        \begin{center}
            Seed map = map$_1$ \\
            $\downarrow$ \\
            map$_2$ \\
            $\downarrow$ \\
            map$_3$ \\
            $\downarrow$ \\
            $\vdots$ \\
            $\downarrow$ \\
            map$_{150,000}$
        \end{center}
    \end{column}
    \begin{column}{0.45\textwidth}
        \vspace{-10pt}
        \begin{figure}
            \centering
            \resizebox{0.9\linewidth}{1.4\linewidth}{
            \begin{tikzpicture}
                \node[state, initial] at (0, 0) (mapi) {map$_i$};
                \node[state] at (0, -2.5) (prop) {prop$_{i+1}$};
                \node[state] at (0, -5) (jscore) {$J_{\text{score}}$};
                \node[state] at(0, -7.5) (accept) {$A(J_{\text{score}})$};
                \node[state] at (0, -10) (mapii) {map$_{i + 1}$};
                \draw[->]
                (mapi) edge[left] node{recombination} (prop)
                (prop) edge[left] node{how legal is it?} (jscore)
                (jscore) edge[left] node{do we accept?} (accept)
                (accept) edge[left] node{accepted} (mapii)
                (accept) edge[bend right=90, right] node{rejected} (mapi)
                ;
            \end{tikzpicture}
            }
            %\caption{Process to get from step $i$ to step $i + 1$ of the Markov chain.}
            \label{fig:markov_chain_summary}
        \end{figure}
    \end{column}
\end{columns}

\end{frame}




\begin{frame}{The Ensemble} %Eva
\vspace{0.5cm}
\begin{itemize}
    \setlength\itemsep{1em}
    \item For each state we ran 5 chains, each 150,000 accepted maps long
    \item The first 10,000 maps of each chain are 
    \\excluded from the analysis since the \\ acceptance probability was very high, 
    \\ to explore the space of maps 
    \item Our final ensemble consists of 700,000 
    \\ maps each for Minnesota and Texas
    \item Now we can analyze the real maps in
    \\ the context of the ensemble
\end{itemize}

\vspace{-5cm} 
\raggedleft
\includegraphics[width=4cm]{results_MN_1_100000_cropped.png}\hspace{0.2cm}

\vspace{-0.8cm}
map$_{100,000}$ \hspace{1.4cm}

\end{frame}



\begin{frame}{MN Seats Distribution - Senate 2018 Election} %Tom
    \begin{center}
    \includegraphics[scale = 0.43]{mn_sen18_histograms_ds_big.pdf}
    %\includegraphics[scale = 0.33]{mn_sen18_histograms_rs.pdf}
    \end{center}
\end{frame}


\begin{frame}{MN Seats Distribution \hspace{2.5cm} {\small Mean = 5.052, SD = 0.303}} %Tom
    \begin{center}
    \includegraphics[scale = 0.44]{mn_final_histograms_ds_big.pdf}
    %\includegraphics[scale = 0.33]{mn_final_histograms_rs_big.pdf}
    \end{center}
There are $8$ total seats in our Minnesota Ensemble.
\end{frame}


\begin{frame}{TX Seats Distribution} %Bekka
    \begin{center}
    \includegraphics[scale = 0.44]{TX_final_histograms_2ds_big.pdf}
    %\includegraphics[scale = 0.09]{TX_final_histograms_rs_big.pdf}
    \end{center}
There are $36$ total seats in our Texas Ensemble. The 2020 map will have $38$ seats.

\end{frame}

\begin{frame}{MN Democratic Vote Share Distribution} %Eva
    \begin{center}
    \includegraphics[scale = 0.15]{mn_sen18_dem_boxplot_big.png}
    \end{center}
\end{frame}


\begin{frame}{TX Black Vote Share Distribution} %Antonia 
    \begin{center}
    \includegraphics[scale = 0.15]{tx_bvap_box_big.png}
    \end{center}
\end{frame}

\begin{frame}{TX Hispanic Vote Share Distribution} %Bekka
    \begin{center}
    \includegraphics[scale = 0.15]{tx_hvap_box_big.png}
    \end{center}
\end{frame}


\begin{frame}{Efficiency Gap} %Antonia

%When one party is packed/cracked as defined above, they end up having more ``wasted votes," defined as follows.  

\begin{definition}
A vote is considered to be a \textbf{wasted vote} if it is cast for the winning party in a winning district and beyond the 50\% threshold required to win a district or if it is cast for the losing party in a losing district. 
\end{definition}

\begin{definition}
 The \textbf{Efficiency Gap} is a measure which describes the difference in quantity of wasted votes between parties (in this case the Democratic and Republican parties) using the following formula:
\begin{align*}
    \text{EG} &= \frac{\text{Wasted Republican Votes}-\text{Wasted Democratic Votes}}{\text{Total Votes Cast}}
\end{align*}
\end{definition}
    
\end{frame}


\begin{frame}{Efficiency Gap in MN \hspace{3cm} {\small Mean = 0.042, SD = 0.039}} 
%Oliver
    \begin{center}
    \includegraphics[scale = 0.44]{mn_final_histograms_eg_big.pdf}
    \end{center}
\end{frame}


\begin{frame}{Efficiency Gap in Texas \hspace{3cm} {\small Mean = -0.047, SD = 0.024}}
%Oliver
    \begin{center}
    \includegraphics[scale = 0.44]{TX_final_histograms_eg_big.pdf}
    \end{center}
\end{frame}


\begin{frame}{Conclusions} %Bekka
\begin{itemize}
\setlength\itemsep{1em}
    \item The mean value for many partisan metrics in our ensemble was different in Minnesota and Texas
    \item Ensemble analysis is necessary to understand how unusual a map is for a given state 
    \item Evidence of political and racial gerrymandering in Texas 
\end{itemize}
\end{frame}


\begin{frame}{Thanks to...}
\begin{center}
Deanna Haunsperger

Rob Thompson 
\end{center}
\end{frame}



\begin{frame} 

\vspace{2cm}

\begin{center}
{\Huge Q \& A}
\end{center}

\vspace{1.4cm}

\begin{figure}[h]
    \centering
\begin{subfigure}
    \includegraphics[width=\linewidth]{gerrymander.png}
    \label{fig:mander}
\end{subfigure}
\end{figure}

\end{frame}


\begin{frame}{References}

\begin{itemize}
\setlength\itemsep{1em}
    \item Michigan's New Independent Citizens Redistricting Commission
    \item \textit{Quantifying Gerrymandering in North Carolina} by Gregory Hershlag, et al.
    \item MN and TX data from Metric Geometry and Gerrymandering Group (MGGG) Redistricting Lab at Tisch College of Tufts University
\end{itemize}
\end{frame}


\end{document}

