\documentclass{beamer}
\usetheme{Madrid}
\usepackage{tikz}
\usepackage{datetime}
\usepackage{tcolorbox}
\tcbuselibrary{skins, breakable}

\newdate{nextTuesday}{26}{08}{2025}

\title{ECON 4530/5530 \\ Computational Economics}
\author{University of Wyoming}
\date{\displaydate{nextTuesday}}

\begin{document}

% Title Slide
\begin{frame}
  \titlepage
\end{frame}

% Contact Info Slide
\begin{frame}{Contact Information}
\begin{tcolorbox}[
  enhanced,
  colback=blue!5,
  colframe=blue!60!black,
  boxrule=0.8pt,
  arc=4pt,
  width=\textwidth,
  title=\textbf{Instructor: Alex Gebben (AG)},
  fonttitle=\bfseries,
  breakable
]
\begin{itemize}
  \item \textbf{Office:} BU 362
  \item \textbf{Email:} \texttt{agebben@uwyo.edu}
  \item \textbf{Phone:} 307-766-4136
  \item \textbf{Office Hours:} Monday \& Friday 1:00–2:30, other times by appointment
\end{itemize}
\end{tcolorbox}
\end{frame}

% Workflow Diagram Slide
\begin{frame}{Steps of an Economic Analysis}
\centering
\begin{tikzpicture}[
  node distance=1.5cm and 2.5cm,
  every node/.style={draw, rounded corners, text centered, minimum width=3.8cm, minimum height=1cm, font=\small},
  designstyle/.style={fill=blue!20},
  datastyle/.style={fill=orange!20},
  analysisstyle/.style={fill=teal!20},
  reportstyle/.style={fill=yellow!40, thick, draw=black, font=\bfseries}
]

  % Fixed layout with overlays
  \onslide<1->{\node[designstyle] (q) at (-3,1.8) {Economic Question};}
  \onslide<2->{\node[designstyle] (sd) at (-3,0) {Strategy and Design};}
  \onslide<3->{\node[datastyle] (dc) at (-3,-1.8) {Data Collection};}
  \onslide<4->{\node[datastyle] (clean) at (-3,-3.6) {Data Cleaning};}
  \onslide<5->{\node[analysisstyle] (explore) at (3,0.9) {Exploration};}
  \onslide<6->{\node[analysisstyle] (analysis) at (3,-0.9) {Analysis};}
  \onslide<7->{\node[reportstyle] (report) at (3,-2.7) {Final Report and Figures};}

  % Solid arrows
  \onslide<2->{\draw[->, thick] (q) -- (sd);}
  \onslide<3->{\draw[->, thick] (sd) -- (dc);}
  \onslide<4->{\draw[->, thick] (dc) -- (clean);}
  \onslide<5->{
    \draw[->, thick]
      (clean.east) -- ++(1.5,0)
      |- (explore.west);
  }
  \onslide<6->{\draw[->, thick] (explore) -- (analysis);}
  \onslide<7->{\draw[->, thick] (analysis) -- (report);}

  % Dashed feedback arrow: Exploration → Economic Question
  \onslide<8->{
    \draw[->, thick, dashed]
      (explore.north) -- ++(0,1.2) -- ++(-6.0,0) -- (q.north);
  }

  % Dashed feedback arrow: Data Collection → Strategy and Design (right-angled, clean)
  \onslide<9->{
    \draw[->, thick, dashed]
      (dc.east) -- ++(1.2,0) -- ++(0,1.8) -- ++(-0.6,0) -- (sd.east);
  }

\end{tikzpicture}
\end{frame}


%%%%%%%
\begin{frame}{Economic Question}
\centering
\begin{columns}
	\begin{column}{0.5\textwidth}

\begin{tikzpicture}[
  node distance=1.5cm and 2.5cm,
  every node/.style={draw, rounded corners, text centered, minimum width=3.8cm, minimum height=1cm, font=\small},
  designstyle/.style={fill=blue!20},
  designstyle_blur/.style={fill=blue!20, opacity=0.3},
  designstyle_bold/.style={fill=blue!20, thick, draw=black, font=\bfseries},
  datastyle/.style={fill=orange!20},
  datastyle_blur/.style={fill=orange!20, opacity=0.3},
  datastyle_bold/.style={fill=orange!20, thick, draw=black, font=\bfseries },
  analysisstyle/.style={fill=teal!20, opacity=0.3},
  reportstyle/.style={fill=yellow!40, thick, draw=black, font=\bfseries, opacity=0.3},
  fadedarrow/.style={->, thick, opacity=0.3}
]

% Title above left column

% Left column nodes
\node[designstyle_bold] (q) at (-3,1.8) {Economic Question};
\node[designstyle_blur] (sd) at (-3,0) {Strategy and Design};
\node[datastyle_blur] (dc) at (-3,-1.8) {Data Collection};
\node[datastyle_blur] (clean) at (-3,-3.6) {Data Cleaning};

% arrows
\draw[fadedarrow] (q) -- ++(sd);
\draw[fadedarrow] (sd) -- ++(dc);
\draw[fadedarrow] (dc) -- ++(clean);
\end{tikzpicture}

\end{column}

\begin{column}{0.5\textwidth}
	What do you want to know? 

	Who is the audience?
		\begin{itemize}
		        \onslide<2->\item{Do coal prices affect Wyoming employment?}
			\onslide<3->\item{\only<3-5>{What factors affect Wyoming tourism?}\only<6->{\textbf{What factors affect Wyoming tourism?}}}
			\onslide<4->\item{How to increase company sales?}
		        \onslide<5->\item{What will the price of bitcoin be in each of the next 10 years?}
		\end{itemize}

\end{column}
	\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Strategy and Design}
\centering
\begin{columns}
	\begin{column}{0.5\textwidth}

\begin{tikzpicture}[
  node distance=1.5cm and 2.5cm,
  every node/.style={draw, rounded corners, text centered, minimum width=3.8cm, minimum height=1cm, font=\small},
  designstyle/.style={fill=blue!20},
  designstyle_blur/.style={fill=blue!20, opacity=0.3},
  designstyle_bold/.style={fill=blue!20, thick, draw=black, font=\bfseries},
  datastyle/.style={fill=orange!20},
  datastyle_blur/.style={fill=orange!20, opacity=0.3},
  datastyle_bold/.style={fill=orange!20, thick, draw=black, font=\bfseries },
  analysisstyle/.style={fill=teal!20, opacity=0.3},
  reportstyle/.style={fill=yellow!40, thick, draw=black, font=\bfseries, opacity=0.3},
  fadedarrow/.style={->, thick, opacity=0.3}
]

% Title above left column

% Left column nodes
\node[designstyle_blur] (q) at (-3,1.8) {Economic Question};
\node[designstyle_bold] (sd) at (-3,0) {Strategy and Design};
\node[datastyle_blur] (dc) at (-3,-1.8) {Data Collection};
\node[datastyle_blur] (clean) at (-3,-3.6) {Data Cleaning};

% arrows
\draw[fadedarrow] (q) -- ++(sd);
\draw[fadedarrow] (sd) -- ++(dc);
\draw[fadedarrow] (dc) -- ++(clean);
\end{tikzpicture}

\end{column}

\begin{column}{0.5\textwidth}
	\only<1-6>{\textbf{Making a plan}
		\begin{itemize}
		        \onslide<1->\item{Analyses method selection}
		\onslide<2->\item{What computer language to use}
			\onslide<3->\item{What data will you need \emph{ideally}?}
			\onslide<4->\item{Is the data available?}
		        \onslide<5->\item{How hard is it to get the data?}
		        \onslide<6->\item{How hard is the data to use?}
		\end{itemize}
		\onslide<6->{Should you rethink the strategy?}
		\onslide<6->{Should you change the question?}
	}
	\only<7->{Linear Regression
		\newline
		R would work well

		\textbf{Ideal Data}
		\begin{enumerate}
		        \item{Skiing numbers}
			\item{Temperature}
		        \item{Air quality}
		        \item{Snow fall}
		        \item{Road closures}
		        \item{Distance travelled of visitors}
		        \item{Income}
			\item{Population trends}
		        \item{Skiing trends in other states}
	\end{enumerate}
	Narrow focus
}
\end{column}
	\end{columns}
\end{frame}
\begin{frame}{Data Collection}
\centering

\only<1>{\includegraphics[width=\textwidth]{"Data_Types"}}
\only<2>{\includegraphics[width=\textwidth]{"Data_Conversion"}}
\only<3>{\includegraphics[width=\textwidth]{"Data_Flow"}}
\end{frame}

\end{document}
