Elements of Data Science
SDS 322E

H. Sherry Zhang
Department of Statistics and Data Sciences
The University of Texas at Austin

Fall 2025

SDS 322E: Elements of Data Science

  • Lecture: Monday / Wednesday / Friday 9-10am
  • Lab: Monday 3-4pm (62525)/ 4-5pm (62530)
Monday Tuesday Wednesday Thursday Friday
Lecture 9-10am Lecture 9-10am Lecture 9-10am
Lab 3pm or 4pm
Lab due 11:59pm HW due 11:59pm

Assessement

  • Labs (30%) - Mostly coding assignments written using R Markdown. Best 10 out of 11, due Monday 11:59 pm week 3-13.
  • Homework (30%) - Coding practice, done in groups. Best 5 out of 6, due Thursday 11:59 pm week 3-5, 10-12.
  • Projects (40%) - Integrate skills on a topic of your choice, done in groups of your choice. 2 out of 2, due Thursday 11:59 pm week 8 and 14.
  • Exams (0%) - There are no exams.

About me

  • I’m a Postdoc Fellow at UT Austin

  • I did my PhD in Monash University in Australia

  • I work on visualization, statistical computing, and thinking about “what’s the best way to do data analysis”.

  • I climb 🧗‍♂️

Meet your Grad TA - Arka Sinha

Meet your UGCAs

Luke:

  • I am a Government and Humanities Senior.
  • I am from Arlington, Texas.
  • My favorite hobby is cooking.

Daniel:

  • I’m from San Antonio
  • I also work at the Sanger Learning Center as a Peer Tutor
  • I like to run with the Texas Running Club

Learning objectives

End goal: Become comfortable coding in R for both exploratory (week 1-8) and confirmatory analysis (week 9-14), and develop enough breadth of knowledge to know where to find the tools and information you need.

Specifically, you will learn:

  • Program for data analysis in R using RStudio
  • Wrangle and visualize data with the tidyverse
  • Apply prediction and classification techniques

Interaction & Communication

  • Announcements in Canvas

  • Ask questions after lecture (I usually reserve some time)

  • Office hours: Ask questions / Listen to others/ Review feedback on assignments

Interaction & Communication

  • Email

    • Subject: include course code (SDS 322E), reason for emailing
    • Plan ahead: I will get back to you within 1-2 business days
    • Don’t expect answers during the weekend or after 5pm

Questions?

Tricks and tips to make you slightly more comfortable in R and RStudio

Install R and RStudio

Even if you installed R/RStudio previously, it’s important to have the latest version

  • R version 4.5.1
    • Check your current version with R.version
  • RStudio version 2025.05.1-513

RStudio IDE

Change the appearance of your RStudio IDE

  • Go to Tools > Global Options (or Press Command + ,) to pull out the options panel
  • Select the Appearance tab and find your favorite Editor font and theme

Git and GitHub

General speaking, you can navigate the course without knowing anything about Git and GitHub, but you will be able to see and know many things you would otherwise won’t if you do know a little bit.

  • If you know how to browse GitHub, you can see the source code of the packages we use in the course, and you can also see the source code of the lecture slides.

  • Happy Git with R: https://happygitwithr.com/

Find the pkgdown site of a package

Go to https://github.com/tidyverse/dplyr and click the package link:

The pkgdown site contains the exact same information as ?PKG::FUN() but the HTML version is much better formatted.

From the pkgdown site:

From ?dplyr::summarise:

The pkgdown sites also have more detailed vignettes (aka articles) about the package:

Coding is never memorization!

Ask anyone you know who works with data or software to write down their code on paper in one go…



It is almost guaranteed to fail.



Let’s see this through an emoji example 🍌 🐒 👀 💻 ▶️

Example: search and install from GitHub

I want to add emoji in the lecture slides and I know there is the emo package. The syntax is emo::ji("emoji_name"). Type in the console:

emo::ji("evil")

Error in loadNamespace(x) : there is no package called ‘emo’

Okay… I don’t have the package in my lastest R installation, let’s install it…

install.packages("emo")

Warning in install.packages : package ‘emo’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Example: search and install from GitHub

Aha - it’s GitHub package (I know it is written by Hadley Wickham), let me find it:

Google: emo ji Hadley github

and find this:

Example: search and install from GitHub

Example: search and install from GitHub

Scroll down to find this line, and run it in your console:

# install.packages("devtools")
devtools::install_github("hadley/emo")

Now I can use the package:

emo::ji("devil")
👿 
emo::ji("heart")
❤️ 
emo::ji("computer")
💻 
emo::ji("climber")
🧗‍♀️ 

Example: search and install from GitHub

If I want to use functions from a pacakge multiple times, it is easier to load the package first: library(pkg)

library(emo)
ji("climber")
🧗 
ji("aeroplane")
🛬 
ji("computer")
💻 

What happen if you don’t?

ji("climber")

Error in ji(“climber”) : could not find function “ji”

Lesson learnt

  • No one can write the code in one go, there are lots of trials and errors. Along the way, we use a lot of helps, including Google!

  • Btw you just happen to know how to

    • install a package from CRAN: install.packages() and from GitHub: devtools::install_github()

    • load a package: library()

Your time (1/2)

  • Install R and RStudio if you have not yet

  • Change the appearance of your RStudio IDE:

    • Go to Tools > Global Options (or Press Command + ,) to pull out the options panel

    • Select the Pane Layout tab to move around the panes

    • Select the Appearance tab and find your favorite Editor font and theme

Your time (2/2)

  • Install and load the tidyverse package from CRAN

    • Install: install.packages("tidyverse")
    • Load: library(tidyverse)
  • (advance) Install and load the emo package from GitHub

    • Install the CRAN package devtools first: install.packages("devtools")
    • Install the emo package from GitHub: devtools::install_github("hadley/emo")
    • Load the library: library(emo)
    • Print your favorite emoji, e.g. emo::ji("heart")