Introduction
What we will cover
Can / Should you use LLMs?
Some ways to use LLMs in this course
More Resources
R
ggplot
1
Getting Started
1.1
Why use R?
1.1.1
Reproducibility
1.1.2
Scalability
1.1.3
Collaboration
1.2
R vs Python
1.2.1
Python advantages
1.2.2
R advantages:
1.3
Installation
1.3.1
Installing R & RStudio
1.3.2
Setting up RStudio
1.4
Setting up a Project
1.5
R Basics
1.5.1
The world’s most over-engineered calculator.
1.5.2
Actually writing code
1.5.3
Installing Packages
1.5.4
Installing the Tidyverse
1.6
Practice & Homework
1.6.1
Practice 1: Typing
1.6.2
Practice 2: Getting familiar with R.
2
Tidyverse 1: Basic data wrangling
2.1
Making a new file
2.2
Loading the Tidyverse package
2.3
Gathering data
2.3.1
Finding data
2.3.2
Importing data
2.4
Data pipelines
2.4.1
Head
2.4.2
Count
2.4.3
Filter
2.4.4
Select
2.4.5
Rename
2.4.6
Mutate
2.4.7
Rbind
2.5
Classwork: Cleaning a dataset
2.6
Graphics with GGplot.
2.6.1
Aesthetics
2.6.2
Geometry
2.6.3
Fill and color
2.7
Labels
2.8
Saving our plots
2.9
Practice & Homework
2.9.1
Homework 1: Practice
2.9.2
Homework 2: Theory
3
Tidyverse 2: Importing Data
3.1
Downloading data
3.2
CSV
3.3
Pivoting data
Before
After
3.4
Renaming columns.
3.5
Math on columns.
3.6
Sorting
3.7
Class Work: Getting data from a data frame
3.8
JSON
3.9
Group_by and Summarize
3.10
RDS and friends
3.11
Class work: Grouping and summarizing
3.12
XLSX
3.13
Practice & Homework
3.13.1
Homework 1: Memorization
3.13.2
Homework 2: Practice
4
Tidyverse 3: Review and practice
4.1
Presentation: Country Facts
4.2
Review together: loading data, head(), tail()
4.3
Classwork: filter()
4.4
Classwork: select(), rename(), mutate()
4.5
Something new: joining data
4.6
Review together: group_by(), summarize()
4.7
Classwork: Answering questions with group_by() and summarize()
4.8
Bonus questions
4.9
Practice & Homework
5
GGplot 1
5.1
Scatterplots
5.2
Boxplots
5.2.1
Factors vs continuous variables
5.3
Density plots
5.4
Classwork: Explore your data set
5.5
Multiple geometries
5.6
Parametric vs fixed variables
5.7
Labels and titles
5.8
Saving plots
5.9
Classwork: Finalizing plots
5.10
Processing data into a plot
5.11
The best geoms, and some tricks for each.
5.11.1
geom_line()
5.11.2
geom_col()
5.11.3
geom_smooth()
5.12
Homework and Practice
6
GGplot 2: Making things pretty
6.1
Something new: R Notebooks and Quarto
6.2
Classwork: Making your own
6.3
Modifying existing plots
6.4
Themes
6.5
Modifying themes
6.6
Color schemes
6.7
Classwork: Making stuff look good
6.8
Discrete vs continuous values
6.9
Faceting
6.10
Homework and practice
7
Midterm Project
7.1
Requirements
7.2
Grading
8
Short Lesson: Colors on Computers
9
Assignment: Show and tell
9.1
Schedule
10
Computer Colors
10.1
Show and tell
10.1.1
Polar coordinate charts
10.2
Color theory
10.2.1
Classwork: Color blindness and accessibility.
10.2.2
Printability
10.2.3
Significance & cultural context
10.2.4
Personal style
10.3
Classwork: Coloring a chart
10.4
A history of computer colors
10.4.1
Old-school graphics
10.5
Classwork: Counting in binary
10.5.1
Four-bit color
10.6
Color channels
10.6.1
Web colors
10.7
Classwork: Color matching
10.8
Homework and practice
11
Maps!
11.1
Show and tell: Sophie and Zoë
11.2
Getting country data the easy way
11.3
Classwork: Make a map
11.4
Getting country data the more complicated way
11.5
Cartography can get you in a lot of trouble
11.6
Map projections
11.7
Classwork: Make a map
11.8
Adding data to maps
11.9
Classwork: Joining Data review
11.10
Layering data on maps
11.11
Classwork:
11.12
Practice and Homework
12
Interactive Graphics
12.1
Plotly
12.2
Classwork: Make this plot.
12.3
Classwork: Immitate this plot
12.4
Animation
12.4.1
Log scaling
12.5
Classwork: An Interactive map
12.6
Beyond ggplotly
12.7
3D Stuff
12.8
Generating a whole web page
12.8.1
Rendering the document
12.8.2
Formatting your page
12.8.3
Hiding code
12.9
Classwork: A simple CV
Final Project
12.10
Grading
13
Tables and Statistics
13.1
Making nice tables
13.2
Exporting tables
13.3
Classwork: Export a table
13.4
Summary statistics
13.5
How to read a regression model
13.6
Classwork: Do a whole scientific study
14
Practice: For the rest of the class, feel free to work on your final project and ask me questions, or just head home early.
15
Short lesson: Regular Expressions
15.1
Tidyverse string expressions
15.2
Regular Expressions
15.3
Counting Counts
15.3.1
Choices
15.3.2
Wildcards
15.3.3
Repetition
15.4
A Warning
15.5
Resources
15.6
Practice
16
Homework and Classwork Answers
16.1
Week 2
16.2
Week 4 filtering
16.3
Week 4 Bonus Questions
Data Analysis and Visualization for Communication Science
14
Practice: For the rest of the class, feel free to work on your final project and ask me questions, or just head home early.