Thinking with Data: Introduction to Data Analysis and R Programming

DATA 121 | Bard College

Jordan Ayala

~133,000 eviction court cases

  • Each one is a household summoned to eviction court, 2010–2019, in one U.S. metro area

  • Each one generates a record: an address, a date, a plaintiff (landlord or property manager), an outcome

  • About 133,000 were filed, about 1 in 20 records have accurate spatial information for placing on a map.

Who gets taken to court?

The ownership story

Who owns homes?

By neighborhood across the city

A little about my research using R


Questions:

  • Where does eviction concentrate, and what drives that concentration?

  • How does ownership of land and housing influence neighborhood life?

  • How can community knowledge inform investments and community organizing?

Data:

  • Millions of rows of court records, large Census data sets, decades of property records,

  • Administrative data from the city.

  • Thousands of survey responses

The data of everyday life.

A little about my research using R


Outcomes

  • Eviction moratorium reinforced

  • Change how we view quantifying “gentrification”

  • Change how we spend millions on community development initiatives

    • Resident-led minor home repair to prevent code enforcement fines and jail

    • City-wide Community Land Trust

Tools: everything in this course. R, tables, charts, maps, and a lot of careful checking.

Welcome to DATA 121

Who am I?


Jordan Ayala

Assistant Professor of Data Analytics and Geography

I study social, economic, and environmental processes that shape the uneven distribution of resources required for a dignified life; lately, a lot about formal eviction and neighborhood change.

Before Bard: civic data work in Kansas City (city government, nonprofits, foundations, neighborhood organizations), Economic Democracy Initiative (OSUN/Levy), community organizing, and a former life as a professional musician…

How to contact and communicate with me


Email: jayala@bard.edu

Office: Gahagan House 101 (down the hill from RKC, behind the shuttle stop)

Office hours: Wednesdays 4:30–6:00 PM in RKC 107 (starting week 2) + Fridays 12:00–1:00 PM (Gahagan House 101)

Time conflicts with both, or just want to meet one-on-one? Sign up for a one-on-one meeting, or email me!

I’ll ask for feedback and check-ins at the end of class from time to time.

What can you do in office hours?? A whole lot!

  • You can ask questions!

    • Those questions don’t need to be fully formed.

    • They don’t even need to be about class content. You can come chat.

  • You can come use the extra desk (and monitors!) and work on your own stuff.

  • You can eat snacks!

  • You can talk to your peers that may be there and treat it as a co-working space with me also there.

  • It is beneficial to you and your education, according to my lived experience, to come to office hours.

A word about frustration


“…the experience of frustration, self-doubt, loneliness, and anxiety. Experiences that most of us (realistically, all of us) flee from, especially when we’re by ourselves. Our goal shouldn’t be to eliminate this discomfort. We need to teach students that it’s part of the process, and develop strategies for coping with it. But for students to really get that — to believe it, to feel it — they have to do the work.”

“The End of the Take-Home Essay?”, The Chronicle of Higher Education (edited for brevity)

Data in our everyday lives

Data in our everyday lives


Discuss + brief in-class writing

List and briefly describe three datasets that you engaged with in your life this week.

  • Which datasets did you access or read about?

  • What data about you was generated in the last 24 hours?

Data in our everyday lives


Choose one dataset you’ve interacted with. Answer:

  • What is being measured?

  • How is it measured? (e.g., surveys, web scraping, experiments?)

  • Who collects it and why? (e.g., which people or organizations?)

  • What is one thing this data is good at measuring?

  • What is missing? (e.g., how well does it measure the thing?)

Please hand in your writing

How this course works

Learning outcomes


Through analysis, coding, reading, writing, and presentation, by the end of the course you will be able to:

  1. Understand and engage with a full data science workflow, from inputting data to generating meaningful inferences from that data.

  2. Write your own code and use open-source tools (primarily the RStudio environment) to generate insights from diverse data sources.

  3. Synthesize the results of data analyses for public consumption through visual representations, narrative descriptions, and verbal presentations.

  4. Apply critical thinking skills to evaluate existing data analyses and visualizations.

  5. Explore the ethical, political, and social issues in the practice of data science.

Course structure


Tuesday: introduce/extend material, activities and some lecture

Thursday: brief paper quiz on established material + extension and application using real-world data

Friday: applied lab/workshop, and occasionally “data days”

Course structure


  • Exams are written on paper; you can bring a 3×5 note card.

  • Grace periods and submission rules are in the syllabus.

  • No AI/LLMs on individual projects or writing unless the assignment says you can explicitly.

  • Quizzes are also written on paper (approx. 10-15 minutes at the beginning of class on some Thursdays)

How we will learn in the classroom / lab

  • Most sessions will include some:

    • Brief lecture component,

    • Discussion / small group activities, and

    • Open lab time.

  • We’ll use the following to learn the material in class:

    • Lab time working individually in R/RStudio.

    • Discussion and activities on data, data analysis, and programming concepts.

    • Writing in class and as homework to review readings/media (I’ll tell you in advance on Brightspace if you will need to submit in-class writing).

    • Lecture

  • When we meet: Tuesday + Thursday 11:50 AM–1:10 PM (RKC 100), Friday lab 1:30–3:30 PM (RKC 107)

  • Plan on 2–3 hours outside class for every hour in class, about 7–9 hours a week. Block it in your calendar now.

Community agreements

  • Our responsibility to one another is to create the conditions in which we can ask questions, make mistakes, reconsider assumptions, and disagree, while treating one another with dignity.

  • Data are produced. We will examine power and bias in data science as part of learning it, and the same norms apply to how we work together.

  • A few norms we will practice: make space and take space; listen before dismissing; value understanding over speed; critique ideas, methods, and institutions without demeaning people.

  • The full agreements are in the syllabus. Read them before Thursday.

Books and computers

  • Everything in this course is free and open access (much of it open source): R, RStudio, and all three course texts

    • Introduction to Data Science (IDS), R for Data Science (R4DS), and Introduction to Modern Statistics (IMS); links in the syllabus and workbook
  • Non-textbook readings will be posted on Brightspace

  • Working from a tablet or Chromebook? Email me or Rob Graff (rgraff@bard.edu) to borrow a laptop for the semester. We keep a stock for this course.

Lab hours and tutoring

  • Data Analytics open study sessions available 7:00–9:00 PM in RKC 107 (Monday, Tuesday and Wednesday), but I recommend you use this space anytime it is available as a place to work together or individually.

  • Open lab hours: RKC 107 Sunday through Thursday, 7:00–9:00 PM

  • Open study tables for Data Analytics and Computer Science students, 2nd floor RKC

  • One-on-one tutoring through Bard Quantitative Literacy: sign up here

The most important course resources

Course evaulation

Grading will be based on the following:

  • Attendance, participation, and community contributions (10%)

  • Practicing coding and data analysis (20%)

    • Labs: coding and writing

    • Homework: coding and writing

  • Applying and extending what you have learned (25%)

    • Applied data analysis projects (x2)

    • Data Day presentations (x3)

  • Assessing analysis, coding, and content knowledge (45%)

    • In-class written quizzes (x10, drop 2)

    • Exams (x2): midterm (with partial corrections) + completion week (no corrections)

Syllabus Q&A

  • No prior experience necessary

  • We use examples from many disciplines, and real-world applications.

  • You will have two opportunities to dive deep into data and methods in your areas of interest. Data Days. You can use SPROJ data.

  • Projects will primarily be independent work, but you will work shop your ideas in class collaboratively

Syllabus Q&A

  • You are encouraged to attend office hours and 7-9 PM tutoring even if you do not have a specific question.

  • DA tutor 7-9 PM Monday and Wednesday, but you are encouraged to use the space to study together or solo any time!

  • When the RKC 107 lab is available:

    • Monday 8:00 - 10:00 AM, after 3:30 PM

    • Tuesday 8:00 - 10:00 AM, after 5:30 PM 

    • Wednesday 8:00 - 10:00 AM, after 1:30 PM

    • Thursday 8:00 - 10:00 AM, after 5:30 PM

    • Friday 8:00 - 9:00 AM, after 5:30 PM

Syllabus Q&A

  • You will always have 5-7 days from assignment to submission on homework.

  • No make up quizzes or exams, but we drop the 2 lowest scores, and I do offer corrections on the first exam.

  • I share a guide for each exam with the topics + some example questions

What’s next

Before next class

  1. Install R and RStudio; guides on the course workbook: Mac | Windows

  2. Turn on Brightspace notifications

  3. Friday lab meets 1:30–3:30 PM in RKC 107

Stuck on the install? That’s normal. Bring your laptop to office hours or open lab (7-9 PM in RKC 107) and we’ll sort it out together. You will have some time to ask questions Friday too, but be ready to jump into Problem soliving and R basics.