STAT 1010 / DSDA 1010: Data Science and Society using R

Course Information

Course Location Meeting Days Time
MCHU 110 Tuesday & Thursday 9:30 - 10:45am

Instructor Information

Instructor E-Mail Office Location Hours
Dr. Jason S. Byers jason.byers@uconn.edu SSH 433 12:30 - 1:30pm TuTH

Syllabus

Course Home
Everything you need for this class (announcements, resources, assignments and other activities) will be posted on HuskyCT or the course website. Please plan to check the pages regularly.

Course Description
The course aims to introduce students to the foundational concepts of data science and its impact on modern society. The course will develop students’ technical skills in data literacy, wrangling, analysis, and visualization, while fostering an understanding of how data science can be applied to real life issues.

Learning Outcomes
Together, we will strive for your individual and collective success in achieving the learning outcomes of this course. At the conclusion of this course, students will be able to:

  • Students will develop a foundational understanding of data science principles and their societal implications.

  • Gain proficiency in data wrangling, analysis, visualization, and basic programming. Cultivate data/computer/programming literacy to support further study in data science.

  • Analyze real-world issues through data-driven approaches.

  • Prepare for advanced studies and careers by understanding the skills and knowledge required in data science.

Prerequisites
There are no prerequisites for this course. In particular, I will assume no previous experience with R, computer programming, or statistics.

Course Materials
To maximize access to this class, we will use some textbooks, videos, and other resources, with a focus on the following:

  • Primary Text (R4DS): Wickham, Hadley, Mine Cetinkaya-Rundel, and Garrett Grolemund. 2023. R for Data Science: Import Tidy, Transform, Visualize, and Model Data. 2nd Edition. O’Reilly Media. This book is freely available online. It is also available in paperback, if you prefer a hard copy. Warning: some content and the numbering system differs between print and online versions; I will exclusively refer to the free online version.

  • Primary Text (GCR): Lovelace, Robin, Jakub Nowosad, and Jannes Muenchow. 2019. “Geocomputation with R.” CRC Press. This book is freely available online. It is also available in paperback, if you prefer a hard copy. Warning: some content and the numbering system differs between print and online versions; I will exclusively refer to the free online version.

  • Primary Text (USDR): Engel, Claudia A. 2019. “Using Spatial Data with R.” This book is freely available online.

  • Primary Text (MSR): Wickham, Hadley. 2021. “Mastering Shiny: Build Interactive Apps, Reports and Dashboards Powered by R.” O’Reilly Media. This book is freely available online.

Reference Texts

  • Reference Text (HOPR): Grolemund, Garrett. 2014. Hands-On Programming with R: Write Your Own Functions and Simulations. O’Reilly Media. This book is freely available online. It is also available in paperback, if you prefer a hard copy. Warning: some content and the numbering system differs between print and online versions; I will exclusively refer to the free online version.

  • Reference Text (DSB): Cetinkaya-Rundel, Mine. 2021. Data Science in a Box. This book is freely available online.

Computer Requirements
We will be conducting data analysis in class so that you can practice the skills that you’ve learned from the textbook and lectures. To conduct data analysis, we will be using the R statistical computing environment on your computer. Please bring your laptops with R installed to every class. You are responsible for having a reliable computer and internet connection throughout the course.

Reusing/Sharing Code. Many of the datasets we will discuss and analyze are publicly available, so they may have been extensively discussed and analyzed. Unless explicitly instructed otherwise, you may use available code and resources for course activities (e.g., Github repos, StackOverflow answers) but you must cite the source of the code/resource within your program files and/or document. Recycled code that is discovered that is not properly cited may be considered as plagiarism. When working in groups on class assignments you are welcome to discuss problems together and ask for general advice, but you may not share or use code from another group.

Use of AI
You may use AI tools in this course, and I expect that many of you will. What I ask is that you document it. When an AI tool contributed to your solution, note in your submission which tool you used and what you asked it. The reason for the requirement is practical rather than punitive. Being able to describe how you arrived at an answer is most of what it means to understand it, and you will need that ability when the tool gives you something wrong. For the final project, you present your own work and answer questions about it without assistance. Text generated by an AI tool and submitted as your own writing is plagiarism and will be handled as such.

Software
You will use two freely available programs, R and RStudio, in order to complete the assignments for this course.

University Policies
The University of Connecticut is committed to protecting the rights of individuals with disabilities and assuring that the learning environment is accessible. If you anticipate or experience physical or academic barriers based on disability or pregnancy, please let me know immediately so that we can discuss options. Students who require accommodations should contact the Center for Students with Disabilities, Wilbur Cross Building Room 204, (860) 486- 2020 or http://csd.uconn.edu/.

Missed and/or Late Work Policy
Missed and/or late work will not be accepted.

Policy Against Discrimination, Harassment and Related Interpersonal Violence
The University is committed to maintaining an environment free of discrimination or discriminatory harassment directed toward any person or group within its community – students, employees, or visitors. Academic and professional excellence can flourish only when each member of our community is assured an atmosphere of mutual respect. All members of the University community are responsible for the maintenance of an academic and work environment in which people are free to learn and work without fear of discrimination or discriminatory harassment. In addition, inappropriate amorous relationships can undermine the University’s mission when those in positions of authority abuse or appear to abuse their authority. To that end, and in accordance with federal and state law, the University prohibits discrimination and discriminatory harassment, as well as inappropriate amorous relationships, and such behavior will be met with appropriate disciplinary action, up to and including dismissal from the University. Additionally, to protect the campus community, all non-confidential University employees (including faculty) are required to report sexual assaults, intimate partner violence, and/or stalking involving a student that they witness or are told about to the Office of Institutional Equity. The University takes all reports with the utmost seriousness. Please be aware that while the information you provide will remain private, it will not be confidential and will be shared with University officials who can help. More information is available at equity.uconn.edu and titleix.uconn.edu.

Absences from Class Due to Religious Observances and Extra-Curricular Activities
Faculty and instructors are expected to reasonably accommodate individual religious practices unless doing so would result in fundamental alteration of class objectives or undue hardship to the University’s legitimate business purposes. Such accommodations may include rescheduling an exam or giving a make-up exam, allowing a presentation to be made on a different date or assigning the student appropriate make-up work that is intrinsically no more difficult than the original assignment. Faculty and instructors are strongly encouraged to allow students to complete work missed due to participation in extra-curricular activities that enrich their experience, support their scholarly development, and benefit the university community. Examples include participation in scholarly presentations, performing arts, and intercollegiate sports, when the participation is at the request of, or coordinated by, a University official. Students should be encouraged to review the course syllabus at the beginning of the semester for potential conflicts and promptly notify their instructor of any anticipated accommodation needs. Students are responsible for making arrangements in advance to make up missed work. For conflicts with final examinations, students should contact the Dean of Students Office.

Office of Emergency Management on Emergency Preparedness
In case of inclement weather, a natural disaster, or a campus emergency, the University communicates through email and text message. Students are encouraged to sign up for alerts through http://alert.uconn.edu. Students should be aware of emergency procedures, and further information is available through the Office of Emergency Management at http://publicsafety.uconn.edu/emergency/.

Course Organization
Modes of learning in this class (whether assessed directly or indirectly) require a range of skills and abilities. Every student’s success is important to me, and I am happy to work with you to develop strategies for success in this class.

Learning R requires regular and repeated practice. This course will be an active learning environment, which consists of a mix of lectures, discussions, short demonstrations, presentations, and in-class activities.

  • In-Class Activities Each class day will involve a significant amount of hands-on work with R and data. In order to learn from these activities, you must do the assigned readings and videos before you come to class, and be prepared to ask (and answer) questions before diving into a small group discussion or activity.

  • Problem Sets Ten assignments (due approximately every Thursday at 9:30 am Eastern) will provide you with regular practice using quantitative methods in R, and applying these methods to real world issues. These assignments will build on the material presented in class, and require you to apply the basic concepts in new ways. Collaboration is encouraged on the problem sets. All code must be your own work. You may get help on problem sets from me and by searching for existing advice on the internet. You may not ask any other person, whether at the University of Connecticut or elsewhere (including the internet) to help you solve a problem.

  • Final Group Project. The goal of the final project is for you to apply the data science skills learned in this course to real data to answer a question that helps illuminate and analyze real world issues. You will work in teams of four to build an interactive R Shiny dashboard with graphics, maps, text explanations and interpretations.

    • Proposal (5 points). At least two publicly available data sources. Two initial questions from each group member, non-trivial and answerable with the data in hand. Roles delegated. A 10-minute meeting with you during a scheduled time, brought by the Project Lead, with data sources ready to show and the variables and types identified.

    • Exploratory Analysis (5 points). Two of the group’s questions explored in depth. At least two primary data sources, not counting geometry. A map with at least one working UI control. At least three different plot types responding to one or more controls. A written summary of at least a page, proofread, covering the questions, the data, the plots, and any conclusions.

    • Presentation (20 Points). Ten to fifteen minutes presenting the interactive Shiny dashboard. Every group member speaks. Explain the data, show the visuals, discuss methods, summarize the report.

    • Final Report (10 points). Written walk through of the full analysis, from starting questions to what the data showed. Each member writes a named section.

      • Roles: Project Lead, Lead Interpreter, Lead Storyteller, Technical Lead.

      • Grading split: Proposal and exploratory analysis are graded as a team. Presentation and report are partly individual, via the speaking segment and the named report section.

Grading

Category Points
Problem Sets 60 Points
Final Project 40 Points

Your grade will be determined according to the following system:

Grade Points
A 94 or above
A- 90 - 93
B+ 87 - 89
B 84 - 86
B- 80 - 83
C+ 77 - 79
C 74 - 76
C- 70 - 73
D+ 67 - 69
D 64 - 66
D- 60 - 63
F 0 - 59

Schedule

A tentative class schedule of topics, readings and due dates is available below. Minor adjustments will be made as needed, on the course web page. Please double check the web page before doing each reading assignment.

Week 1

Topics

  • Introduction and Course Overview

Date \(~~~~\) Readings

9/1 \(~~~~~~\) Introduction
\(~~~~~~~~~~~\) HOPR Appendix A

9/3 \(~~~~~~\) NO CLASS (APSA Conference)

Assignments

  • Download and install R and RStudio on your personal machines. Walk through the posted installation guide before Tuesday of Week 2. Bring your laptop to every subsequent class.

Week 2

Topics

  • R and RStudio, Objects, and Functions
  • Vectors, Data Types, and Subsetting

Date \(~~~~\) Readings

9/8 \(~~~~~~\) HOPR Appendix B
\(~~~~~~~~~~~\) R4DS Chapter 4
\(~~~~~~~~~~~\) R4DS Chapter 6

9/10 \(~~~~\) HOPR Chapter 2
\(~~~~~~~~~~~\) HOPR Chapter 3
\(~~~~~~~~~~~\) R4DS Chapter 8

Week 3

Topics

  • Packages, Getting and Loading Data
  • Variable Types and Messy Data

Date \(~~~~\) Readings

9/15 \(~~~~\) HOPR Appendix D
\(~~~~~~~~~~~\) R4DS Chapter 7
\(~~~~~~~~~~~\) R4DS Import

9/17 \(~~~~\) R4DS Chapter 5

Assignments

  • Problem Set 1 Assigned

Week 4

Topics

  • Why We Visualize, and How Visualizations Mislead
  • The Grammar of Graphics and ggplot2

Date \(~~~~\) Readings

9/22 \(~~~~\) R4DS Chapter 1
\(~~~~~~~~~~~\) Data Visualization in R

9/24 \(~~~~\) R4DS Chapter 9
\(~~~~~~~~~~~\) R4DS Chapter 11

Assignments

  • Problem Set 1 DUE
  • Problem Set 2 Assigned

Week 5

Topics

  • Transforming Data with dplyr
  • mutate(), summarise(), and Pipes

Date \(~~~~\) Readings

9/29 \(~~~~~\) R4DS Chapter 3

10/1 \(~~~~~\) R4DS Chapter 3

Assignments

  • Problem Set 2 DUE
  • Problem Set 3 Assigned

Week 6

Topics

  • Exploratory Data Analysis and Variation
  • Covariation

Date \(~~~~\) Readings

10/6 \(~~~~\) R4DS Chapter 10
\(~~~~~~~~~~~\) R4DS Chapter 12

10/8 \(~~~~\) R4DS Chapter 10
\(~~~~~~~~~~~\) R4DS Chapter 13

Assignments

  • Problem Set 3 DUE
  • Problem Set 4 Assigned

Week 7

Topics

  • Tibbles, Tidy Data, and Pivoting
  • Separating, Uniting, and Relational Data

Date \(~~~~\) Readings

10/13 \(~~~~\) R4DS Chapter 5

10/15 \(~~~~\) R4DS Chapter 19.1 - 19.2

Assignments

  • Problem Set 4 DUE
  • Problem Set 5 Assigned

Week 8

Topics

  • Filtering Joins, Strings, Factors, Dates
  • Group Project Overview

Date \(~~~~\) Readings

10/20 \(~~~\) R4DS Chapter 19.3 - 19.6
\(~~~~~~~~~~~~\) R4DS Chapter 14
\(~~~~~~~~~~~~\) R4DS Chapter 16
\(~~~~~~~~~~~~\) R4DS Chapter 17

10/22 \(~~~~\) Project Guidelines

Assignments

  • Problem Set 5 DUE
  • Problem Set 6 Assigned

Week 9

Topics

  • Geospatial Data I. What Geographic Data is, and How R Handles it
  • Geospatial Data II. Mapping with sf, ggplot2, tmap, and leaflet

Date \(~~~~\) Readings

10/27 \(~~~\) USDR Chapter 1
\(~~~~~~~~~~~~\) GCR Chapter 1

10/29 \(~~~\) USDR Chapter 3.1-3.4
\(~~~~~~~~~~~~\) GCR Chapter 8.1-8.2

Assignments

  • Problem Set 6 DUE
  • Problem Set 7 Assigned

Week 10

Topics

  • Geospatial Data III. Faceted, Animated, and Interactive Maps; Raster Data
  • Project consultations. Ten minutes per team.

Date \(~~~~\) Readings

11/3 \(~~~~\) USDR Chapter 3.5-3.6
\(~~~~~~~~~~~\) GCR Chapter 8.3-8.6

11/5 \(~~~~~\) Project Consultations

Assignments

  • Problem Set 7 DUE
  • Problem Set 8 Assigned
  • Project Part 1: Proposal DUE 11/5 (5 points)

Week 11

Topics

  • Shiny I. App Structure, Basic UI, Reactivity
  • Shiny II. Workflow, Debugging, Layout and Themes

Date \(~~~~\) Readings

11/10 \(~~~\) MSR Chapter 1-4
\(~~~~~~~~~~~~\) MSR Chapter 12

11/12 \(~~~\) MSR Chapter 5
\(~~~~~~~~~~~~\) MSR Chapter 6

Assignments

  • Problem Set 8 DUE
  • Problem Set 9 Assigned

Week 12

Topics

  • Dashboard Lab. Building Your App in Class
  • Proof of Concept Check-Ins

Date \(~~~~\) Readings

11/17 \(~~~~\) MSR Chapter 6

Assignments

  • Problem Set 9 DUE
  • Problem Set 10 Assigned
  • Project Part 2: Exploratory Analysis DUE 11/19 (5 points)

Week 13

Topics

  • Thanksgiving Break

Date \(~~~~\) Readings

11/24 \(~~~~~\) NO CLASS

11/26 \(~~~~~\) NO CLASS

Week 14

Topics

  • Topics in Data Science
  • Project Work Session

Date \(~~~~\) Readings

12/1 \(~~~~~\) TBD

12/3 \(~~~~~\) Final Project Work Session

Assignments

  • Problem Set 10 DUE

Week 15

Topics

  • Presentations
  • Presentations

Assignments

  • Project Part 3: Presentations, 12/8 and 12/10 (20 points)
  • Project Part 4: Final Report DUE 12/14 (10 points)