Skip to content

Instantly share code, notes, and snippets.

@conjugateprior
Created January 14, 2019 21:43
Show Gist options
  • Save conjugateprior/d355f803bddda257b09ffa4015f98264 to your computer and use it in GitHub Desktop.
Save conjugateprior/d355f803bddda257b09ffa4015f98264 to your computer and use it in GitHub Desktop.
The pol245 syllabus
% Syllabus example by Will Lowe, ([email protected]) 2018
% for the course POL 245 'Visualizing Data' (Part of the Freshman Scholars Institute)
%
% Compile it with xelatex (after you've inserted your own fonts)
\documentclass[11pt,letterpaper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{marginnote}
\usepackage[dvipsnames]{xcolor}
\usepackage{booktabs}
\usepackage{tabularx}
\newcommand{\mksep}{\makebox[\linewidth]{\textcolor{gray}{\rule{\textwidth}{0.5pt}}}}
\newcommand{\mkbar}{\makebox[1cm]{\rule{\textwidth}{0.5pt}}}
%% subject line in mailto link in pdf
%% from http://tex.stackexchange.com/questions/128424/how-to-create-email-hyperlink-with-predefined-subject-in-latex
\usepackage{etoolbox}
\makeatletter
\newcommand\myemail[3]{%
\edef\@tempa{mailto:#1?subject=#2 }%
\edef\@tempb{\expandafter\html@spaces\@tempa\@empty}%
\href{\@tempb}{#3}}
\catcode\%=11
\def\html@spaces#1 #2{#1%20\ifx#2\@empty\else\expandafter\html@spaces\fi#2}
\catcode\%=14
\makeatother
\usepackage{marginnote}
\usepackage{keyval}
\makeatletter
\define@key{fam}{title}{\def\fam@title{#1}}
\define@key{fam}{date}{\def\fam@date{#1}}
\define@key{fam}{time}{\def\fam@time{#1}}
\define@key{fam}{type}{\def\fam@type{#1}}
\setkeys{fam}{type=Lecture,date=,time=}%
\newenvironment{event}[1]{
\setkeys{fam}{#1}
\ifdefined\fam@title
\def\lead{\fam@type: \fam@title}
\else
\def\lead{\fam@type}
\fi
\textsc{\lead} \marginnote{\textcolor{gray}{\textsf{\textbf{\fam@date}\hfill \fam@time}}} \par}{}
\makeatother
\newcommand{\lectureroom}{Redacted Lecture Hall}
\newcommand{\preceptrooms}{Redacted Rooms}
\newcommand{\quantlabrooms}{Redacted Rooms}
\newcommand{\speakera}{Redacted, Organization Name}
\newcommand{\speakerb}{Redacted, Organization Name}
\newcommand{\speakerc}{Redacted, Organization Name}
\newcommand{\speakerd}{Redacted, Organization Name}
\usepackage{rotating}
\usepackage{lscape}
\usepackage{hyperref}
\hypersetup{colorlinks,urlcolor=RawSienna}
% Fonts: rm: Minion Pro, sf: Myriad Pro, tt: Inconsolata
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Minion Pro}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Myriad Pro}
\setmonofont[Scale=MatchLowercase]{Inconsolata}
\usepackage[parfill]{parskip}
\title{\bf POL 245: Visualizing Data}
\author{\bf \Large Summer 2018}
\date{}
\newcommand\R{\textsf{{R}}}
\newcommand\Rst{\textsf{{RStudio}}}
\newcommand{\sitem}[1]{\item[\textit{#1}]}
\begin{document}
\maketitle
\begin{center}
\setlength\tabcolsep{.2cm}
\begin{tabular}{rl}
Instructor: & {Will Lowe}\\
& \myemail{[email protected]}{POL 245}{[email protected]} \\[0.8ex]
Preceptors: & Redacted \\
& \myemail{[email protected]}{POL 245}{{[email protected]}}\\[0.3ex]
& Redacted\\
& \myemail{[email protected]}{POL 245}{{[email protected]}}\\[0.8ex]
\end{tabular}
\end{center}
~\\
In this course, we consider ways to illustrate compelling stories hidden in a
blizzard of data. Data
visualization -- equal parts art, programming, and statistical reasoning --
is a critical tool for anyone doing analysis. In recent years,
data analysis skills have become essential for those pursuing careers in policy
advocacy and evaluation, business consulting and management, or academic
research in the fields of education, health, medicine, and social science. This
course introduces students to the powerful \R\ programming language and the
basics of creating data-analytic graphics in \R. From there, we use real
datasets to explore topics ranging from network data (like social interactions
on Facebook or trade between counties) to geographical data (like county-level
election returns in the US or the spatial distribution of insurgent attacks in
Afghanistan). No prior background in statistics or programming is required or
expected.
\section*{Logistics}
\textit{The schedule during the first week deviates from this, details
are below in the detailed course outline at the end of the syllabus.}
Google calendar for the course: \textit{Redacted}. If you use
a calendar program, ask the instructor for a iCal link.
\paragraph{Lectures.} Monday and Wednesday, 1:30pm--2:30pm, \lectureroom.
Lecture slides will appear
on Blackboard immediately {\it after} the lecture. Students
are advised to take notes during the lecture.
\paragraph{Precepts.} Tuesday and Thursday, 1:30pm--2:50pm, \preceptrooms.
Bring your personal laptop to precepts.
\paragraph{QuantLabs.} Monday (2:30-4:30pm) in
the same room as your precepts, Tuesday (7-8:30pm) in
the Simpson rooms. You will be working with tutors on
review questions, practice exercises, and problem sets. Bring your
laptop to the QuantLabs.
\paragraph{Problem Set Help Sessions.} Sunday (7-9pm) and Thursday (7-8:30pm) in
\quantlabrooms.
\paragraph{Guest Lectures.} Friday, 10:30--11:50am, \lectureroom.
These sessions occur during the second through
final week of the course. They involve
guest speakers from various industries where data visualization is
used. Students should sign up for
lunch with a specific speaker at the beginning of the course.
\paragraph{Lunch with Guest Speaker.} Friday, 12:00--1:30pm.
The Library Room, Prospect House
Students sign up to have lunch with one of the four guest speakers at the beginning
of the course. During the selected week, students and the course team
will meet with the guest speaker during a casual, catered lunch.
\section*{Course Requirements}
\begin{itemize}
\item {\bf Class participation (15\%):} Students should actively
participate in all aspects of the course. Class participation will
be judged based on questions asked/answered during the lectures and the
precepts. Each portion is equally weighted.
\item {\bf Review Questions (15\%):} During the QuantLab, students
will work on the assigned portion of the textbook and electronically
submit a small set of questions, using \texttt{Swirl}. Details on these
assignments are announced at the QuantLab. \textit{This is an
individual assessment with limited collaboration.}
\item {\bf Problem sets (50\%):} Each week will end with the posting
of a problem set. These assignments can be retrieved by name
using the \texttt{get\_pset} function on the server.
Electronic submission of your work must be uploaded to Blackboard
by the beginning on Tuesday's precept. There is a short video
on Blackboard showing the process.
\textit{This is an individual assessment with no
collaboration.}
\item {\bf Final Project (20\%)}: This is a group data analysis
project. Students will be assigned to groups. Analyzing a data set
of their choice, students will write a report of no more than 1,000
words summarizing a compelling relationship or story they identified
in the data. No more than 3 figures/tables can be used. Details
regarding the final project will be announced later in the
course. \textit{This is a group assessment with collaboration
allowed only within the assigned groups.}
Final projects will be presented to the class at the end of the course.
\end{itemize}
\section*{Collaboration Policy}
The assignments in this course are designated as individual or group
assessments. The degree of permissible collaboration depends on the kind of
assignment:
\begin{itemize}
\item {\bf Review Questions.} Students are encouraged to interact with
each other, the instruction team, and QuantLab tutors in discussing
their approaches and solutions. This includes conceptual discussion
and actual computer code. \textit{However, for all other
assignments, this degree of collaboration is not appropriate!}
\item {\bf Problem Sets.} No collaboration is allowed. Students may
ask clarifying questions regarding problem sets
to the instruction team in person. This allows all students to
benefit from clarifications equally. Clarifying questions about the
problem sets may not be asked of QuantLab tutors, however.
\item {\bf Final Project.} Students may fully collaborate within their
assigned groups, and may discuss their group's work with other
students, the instruction team, and QuantLab tutors.
\end{itemize}
\section*{Plagiarism Policy}
Violations of the above collaboration policy will be treated as instances of
plagiarism. This course will follow a modified version of the guidelines used
for computer science classes here at Princeton. {\it Please take this guideline
seriously}. In the past, plagiarism cases typically result in one-year
suspension from Princeton.
Programming necessitates that you reach your own understanding of the
problem and discover a path to its solution. {\sc Do not, under any
circumstances, copy another person's code}. Incorporating someone
else's code into your program in any form is a violation of academic
regulations. Abetting plagiarism or unauthorized collaboration by
sharing your code is also prohibited. Sharing code in digital form is
an especially egregious violation: do not e-mail your code to anyone.
Novices often have the misconception that copying and mechanically transforming
a program (by rearranging independent code, renaming variables, or similar
operations) makes it something different. Actually, identifying plagiarized
source code is easier than you might think. For example, there exists computer
software that can detect plagiarism.
This policy supplements the University's academic regulations, making explicit
what constitutes a violation for this course. Princeton Rights, Rules,
Responsibilities handbook asserts:
\begin{quote}
The only adequate defense for a student accused of an academic
violation is that the work in question does not, in fact, constitute
a violation. Neither the defense that the student was ignorant of
the regulations concerning academic violations nor the defense that
the student was under pressure at the time the violation was
committed is considered an adequate defense.
\end{quote}
If you have any questions about these matters, please consult a member of the
instruction team.
\section*{Textbook}
The course texbook is
\begin{quote}
Imai, Kosuke (2017). {\it Quantitative Social Science: An Introduction}. Princeton University Press.
\end{quote}
\section*{Statistical Software}
In this course, we use the open-source statistical software \R{}. \R{} can be more powerful than
other statistical software such as SPSS, STATA and SAS, but it can
also be more difficult to learn. A variety of resources will be made
available for POL 245 students in order to learn \R{} as efficiently
as possible. To help make using \R{} easier, we'll be using \Rst{}
--- a user-interface that simplifies
many common operations. You can find it here:
\centerline{\url{https://redacted.princeton.edu}}
Note: If you are outside the campus network you will need a VPN to access.
\section*{Get Help}
Many students will find the materials in this course to be
challenging. As such, students must seek immediate help when
struggling with the course. There are several ways in which students
can get in-person and online help.
\subsection*{In-Person Help}
\begin{itemize}
\item Office Hours: The preceptors will hold office hours. These
take place at Monday 4:30-6pm, Wednesday 3-4:30pm, and Thursday 3-4:30pm in Redacted Room.
You will be able to ask any questions you might
have about the course materials. You may also e-mail to set up an
appointment outside of the office hours.
\item Problem Set Help Sessions: Thursdays 7:00pm to 8:30pm and
7:00pm to 9:00pm on Sundays and in QuantLab, 2:30-4:30pm Monday and
7-8:30pm Tuesday.
Tutors will not
give you direct guidance on the actual problem set questions but
will help you understand the concepts required for solving them.
\end{itemize}
\newgeometry{left=2in,right=1in,top=1in,bottom=1in,marginparwidth=1.2in} % open up a left margin
\reversemarginpar % put marginal notes on the left
%\raggedleftmarginnote
\newpage
\subsection*{Introduction}
During the first days of the course, you will be introduced to
\R{} statistical programming environment through the use of \Rst.
% Tuesday
\begin{event}{type=Lecture,
title=Introduction,
date=T Jul 10,
time=1:30-2:30}
Overview of the course.
\end{event}
\begin{event}{type=Quantlab,
time=2:30-3:50}
Checking laptop setup and Swirl exercises.
Reading: ch. 1. Swirl: \texttt{INTRO1}, \texttt{INTRO2}
\end{event}
\subsection*{Causality}
We will learn how to infer causality from data. We learn the
distinction between randomized experiments and observational studies.
Our applications include the evaluation of strategies for increasing
voter turnout and the effect of class size on educational achievement.
% Wednesday
\begin{event}{type=Precept,
time=1:30-2:50,
date=W Jul 11}
Bias in turnout: \texttt{bias-in-turnout}
\end{event}
% Thursday
\begin{event}{type=Lecture,
title=Causality,
date=R Jul 12,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading: sec. 2.1–2.4. Swirl: \texttt{CAUSALITY1}
\end{event}
% Friday, no guest lecture: precept
\begin{event}{type={Precept},
date=F Jul 13,
time=10-11:20}
Efficacy of small-class size in primary education: \texttt{small-class-size}
Problem set 1: Changing minds on gay marriage. \texttt{gay-marriage}
\end{event}
% Sunday
\begin{event}{type=Quantlab,
date=S Jul 15,
time=7:00-9:00}
Problem set help session.
\end{event}
\mksep
%\subsection*{Observational data}
% Monday
\begin{event}{type=Lecture,
title=Observational Studies,
date=M Jul 16,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=2:30-4:30}
Reading: sec. 2.5–2.7. Swirl: \texttt{CAUSALITY2}
\end{event}
% tuesday
\begin{event}{type=Precept,
date=T Jul 17,
time=1:30-2:50}
Success of leader assassination as a natural experiment: \texttt{leader-assassination}
Problem Set 1 due.
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading sec. 3.1–3.4. Swirl: \texttt{MEASUREMENT1}
\end{event}
\subsection*{Measurement}
We consider how to measure public opinion using sample surveys. We
also learn about a measurement strategy regarding latent concepts like
ideology. Our applications include surveys in Afghanistan and
political polarization in US Congress.
% wednesday
\begin{event}{type=Lecture,
title=Survey Sampling,
date=W Jul 18,
time=1:30-2:30}
Surveys and sampling schemes.
\end{event}
% thursday
\begin{event}{type=Precept,
date=R Jul 19,
time=1:30-2:50}
Political efficacy in China and Mexico: \texttt{political-efficacy}
Problem set 2: Indiscriminate violence and insurgency: \texttt{indiscriminate-violence}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
\end{event}
% friday
\begin{event}{type={Guest Lecture},
date=F Jul 20,
time=10:30-11:50}
\speakera
\end{event}
% sunday
\begin{event}{type=Quantlab,
date=S Jul 22,
time=7:00-9:00}
Problem set help session.
\end{event}
\mksep
% monday
\begin{event}{type=Lecture,
title=Measurement and Clustering,
date=M Jul 23,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=2:30-4:30}
Reading: sec. 3.5–3.8. Swirl: \texttt{MEASUREMENT2}
\end{event}
% tuesday
\begin{event}{type=Precept,
date=T Jul 24,
time=1:30-2:50}
Voting in the United Nations General Assembly: \texttt{un-voting}
Due: Problem Set 2
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading: sec. 4.1. Swirl: \texttt{PREDICTION1}
\end{event}
% wednesday
\begin{event}{type=Lecture,
title=Prediction (and loops),
date=W Jul 25,
time=1:30-2:30}
\end{event}
% thursday
\begin{event}{type=Precept,
date=R Jul 26,
time=1:30-2:50}
Prediction based on betting markets: \texttt{betting-markets}
Problem set 3: Oil, democracy, and development: \texttt{oil-democracy}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
\end{event}
% friday
\begin{event}{type=Guest Lecture,
date=F Jul 27,
time=10:30-11:50}
\speakerb
\end{event}
% sunday
\begin{event}{type=Quantlab,
date=S Jul 29,
time=7:00-9:00}
Problem set help session.
\end{event}
\mksep
\subsection*{Prediction}
We learn about prediction starting with the application of US
presidential election forecasting. Students will be introduced to
linear regression and how it is related to causality.
% monday
\begin{event}{type=Lecture,
title={Regression and causation},
date=M Jul 30,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=2:30-4:30}
Reading: sec. 4.2. Swirl: \texttt{PREDICTION2}
\end{event}
% tuesday
\begin{event}{type=Precept,
date=T Jul 31,
time=1:30-2:50}
Prediction based on betting markets and linear models: \texttt{betting-markets-with-lm}
Due: Problem Set 3
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading: sec. 4.3.1–4.3.3. Swirl \texttt{PREDICTION3}
\end{event}
% wednesday
\begin{event}{type=Lecture,
title=Regression and randomized experiments
date=W Aug 1,
time=1:30-2:30}
\end{event}
% thursday
\begin{event}{type=Precept,
date=R Aug 2,
time=1:30-2:50}
Elections and conditional cash transfer in Mexico: \texttt{conditional-cash-transfers}
Problem Set 4: Ideology of US Supreme Court justices: \texttt{ideologies-of-justices}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
\end{event}
% friday
\begin{event}{type=Guest Lecture,
date=F Aug 3,
time=10:30-11:50}
\speakerc
\end{event}
% sunday
\begin{event}{type=Quantlab,
date=S Aug 5,
time=7:00-9:00}
Problem set help session.
\end{event}
\mksep
%%% WEEK 5 8-12
% monday
\begin{event}{type=Lecture,
title=Regression and Observational Studies,
date=M Aug 6,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=2:30-4:30}
Reading sec. 4.3.4
\end{event}
% tuesday
\begin{event}{type=Precept,
date=T Aug 7,
time=1:30-2:50}
Government transfer and poverty reduction in Brazil: \texttt{gov-transfer-brazil}
Due: Problem Set 4
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading sec. 5.1. Swirl: \texttt{DISCOVERY1}
\end{event}
\subsection*{Discovery}
We cover how to analyze three different types of data; textual data,
network data, and spatial data. Our applications include the
prediction of disputed authorship of The Federalist Papers, the
marriage network in Renaissance Florence, and the expansion of
Wal-mart.
% wednesday
\begin{event}{type=Lecture,
title=Textual data,
date=W Aug 8,
time=1:30-2:30}
\end{event}
% thursday
\begin{event}{type=Precept,
date=R Aug 9,
time=1:30-2:50}
Analyzing the preambles of constitutions: \texttt{constitutions}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
\end{event}
% friday
\begin{event}{type=Guest Lecture,
date=F Aug 10,
time=10:30-11:50}
\speakerd
\end{event}
% sunday
\begin{event}{type=Quantlab,
date=S Aug 12,
time=7:00-8:30}
Problem set help session.
\end{event}
\mksep
% monday
\begin{event}{type=Lecture,
title=Network Data,
date=M Aug 13,
time=1:30-2:30}
\end{event}
\begin{event}{type=Quantlab,
time=2:30-4:30}
Reading sec. 5.2. Swirl: \texttt{DISCOVERY2}
\end{event}
% tuesday
\begin{event}{type=Precept,
date=T Aug 14,
time=1:30-2:50}
The international trade network: \texttt{trade-networks}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
Reading sec. 5.3. Swirl: \texttt{DISCOVERY3}
\end{event}
% wednesday
\begin{event}{type=Lecture,
title=Spatial Data,
date=W Aug 15,
time=1:30-2:30}
\end{event}
% thursday
\begin{event}{type=Precept,
date=R Aug 16,
time=1:30-2:50}
Spatial mapping of US election results over time: \texttt{mapping-elections}
\end{event}
\begin{event}{type=Quantlab,
time=7:00-8:30}
\end{event}
% friday
\begin{event}{type=Lecture,
date=F Aug 17,
time=10:30-11:50}
Wrapping up.
\end{event}
% sunday
\begin{event}{type=Quantlab,
date=S Aug 18,
time=7:00-9:00}
\end{event}
\mksep
\begin{event}{type=Final Project Presentations,
date=T Aug 21,
time=3:00-4:00}
\end{event}
\newgeometry{margin=1in,marginparwidth=0pt} % and back
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment