UC San Diego
COGS 137 - Fall 2026
2026-09-28
Q: Nothing so far, maybe how the assignments will look but I will figure that out when I see one!
The labs will guide you through the content we discuss in class, so you’ll get to practice on your own. The homeworks will extend beyond that, giving you less on exactly what to do so that you can really master the concept, after having seen it in lecture and practiced on the labs.
Q: Im curious exactly why r program is preferred for stats if you can do the same with python.
This is a great question and the answer isn’t super straightforward. It’s somewhat historical. This is my personal retelling. Some may disagree with parts of it. Data science grew as a field out of both statistics and computer science (and other fields!). Those who came from CS tended to prefer “general” programming languages, like Python. Those who came from stats, preferred statistical programming languages, like R. Now I would argue that Python would not have become the lingua franca of data science (from the CS side) if Wes McKinney had not developed the pandas package (take COGS 108 if you want pandas experience!). Similarly, if Hadley Wickham hadn’t developed the tidyverse in R, it would not be the second most popular language. Now, there are two different places where you can do all the data science things, and often it comes down to who you’re working with, what their background is, and what your preference is. However, with GenAI (and its ability to “translate” between programming languages, we’ll see what the future holds!
Q: I am curious what a case study looks like for data science! I have done many design case studies but how does that differ from this class?
The term in a general sense is the same - a project deliverable that demonstrates your knowledge. But the core difference is that in design you’re often asking (and answering) whether the thing built is right for its users and questioning/designing around these choices. Data science case studies, however, typically ask a question (on any topic!) and then use data to answer that question and quantify uncertainty in that answer.
Q: When citing outside resources we used to complete something for this class, is that a separate form or will we just cite on the bottom of the datahub worksheet like COGS 108?
It will be the last section in the same document (same as in COGS 108) so you won’t forget/have to submit a separate thing.
Due Dates:
🔘 Student survey (#finaid) due Fri 10/2 (11:59 PM)
⌨️ Lab01 due Friday 10/2 (11:59 PM)
🔘 Lecture Participation survey “due” after class
📝 First round of COGS 137 Org Invites went out - accept these. If you didn’t receive:
- complete the pre-course survey OR
- Respond to the email for your GitHub username today (subject: "COGS 137 GH username? (please reply asap, ideally by EOD Monday)"), so your repos can be created OR
- email me your GitHub username from your UCSD email
Please take one green sticky and one pink sticky as they come around. If you’re able, try and save these. We’ll use them most classes. (But, I’ll always have extra!)
Datahub is a platform hosted by UCSD that gives students access to computational resources.
This means that while you’ll be typing on your keyboard, you’ll be using UCSD’s computers in this class.
Website: https://datahub.ucsd.edu/
Launch Environment
When working on “stuff” for this course, select the COGS 137 environment (if you see two, pick either one…just make sure it says COGS 137).

Q: Do I have to use datahub?
A: Nope. You could download and install all the packages we use and complete the course locally! However, many packages have already been installed for you on datahub, so it will be a tiny bit more work up front…but you won’t be dependent on the internet/datahub!
Scriptability \(\rightarrow\) R
Literate programming (code, narrative, output in one place) \(\rightarrow\) Quarto
Version control \(\rightarrow\) Git / GitHub
The Internet (Google/ChatGPT/etc.)
R & RStudio
Concepts introduced:
Your Turn
airquality dataframeairquality dataframePut a green sticky on the front of your computer when you’re done. Put a pink if you want help/have a question.

Keep the Quarto cheat sheet and Markdown Quick Reference (Help -> Markdown Quick Reference) handy, we’ll refer to it often as the course progresses
The workspace of your Quarto document is separate from the Console
Concepts introduced:
Lego versions
with human readable messages
Lego versions with commit messages
PhD Comics
You’ll set this up yourself in Lab 01 on Thursday
Concepts introduced:
There is a bit more of GitHub that we’ll use in this class, but for today this is enough.
Your repos will be created for you: no assignment links to click.
COGS137-FA26 organization (email, or github.com/orgs/COGS137-FA26/invitation)labXX-<username>, hwXX-<username>, csXX-<team>, final-<team>lab01-<your GitHub username> repoConsider ggplot2 (a package we’ll learn a lot)
Imagine: You’ve been asked to carry out a number of wrangling operations on a dataset and make a plot…
Can you answer these questions?
git Resourcesgit from the command line
git (Part 1), by COGS 108 TA Ganesh (youtube, 22min tutorial)git with GitHub Desktop, by COGS 108 TA Sidharth Suresh (youtube, 13min tutorial)