Activity 02: Data Origins and the Scope of Research Questions
- Assigned: Thursday, 10th September 2026
- Due and Expiration: Monday, 14th September 2026 by class time.
Note: the expiration date is the last date you can submit your work for a grade.
Every dataset comes from somewhere - a sensor, a survey, a scraped webpage, a cash register - and where it comes from determines what questions it can honestly answer. In this 45-minute, in-class activity you will rotate through four short "data stations," each built around a different real-world data origin: an automated weather sensor, a hashtag search on social media, a voluntary course survey, and a complete retail transaction log.
At each station you will copy and paste ready-made R code into a script file using RStudio where you can run it, to examine the output.
Then, acting as a data detective, you will decide what the data's origin was and which research questions are in scope (answerable from the data alone) versus out of scope (tempting to ask, but unsupported by this data).
By the end of this activity, you will be able to look at any dataset and ask, before trusting a single conclusion from it: where did this come from, and what can it actually tell me?
By completing this activity, you will be able to:
- Trace a dataset's origin - identify who or what collected it, how, when, and why
- Recognize sampling method and bias - distinguish voluntary response, convenience samples, sensor logs, and complete records
- Distinguish in-scope from out-of-scope research questions - explain why a question may not be answerable from a given dataset
- Read and run basic R/tidyverse code -
read_csv(),summary()/str(),group_by()/summarize(), andggplot2 - Justify conclusions in writing - support claims about a dataset's scope with specific reasoning, not guesses
This activity guides you through one combined tutorial covering four data stations:
- Tutorial_01
- Station 1: Weather Sensor Data - an automated, single-location sensor log
- Station 2: Social Media Posts - a hashtag search, a self-selected sample of public posts
- Station 3: Course Survey - a voluntary, anonymous end-of-semester survey
- Station 4: Retail Sales Transactions - a complete point-of-sale record for two stores
Each station pairs a short R script with detective questions you will answer
in writing/reflection.md.
IMPORTANT: All four stations share the same package requirement. Set this up once before starting:
Open RStudio and run:
install.packages("tidyverse")OR, if you want to first check that the library exists before you automatically install the library on your machine, use the following code. The below code will save you time in the long-run since you do not have to jump over the line that installs and reinstalls the tidyverse library when you execute your programs.
# Load tidyverse, install if necessary
if (!require('tidyverse')) {
install.packages('tidyverse')
library('tidyverse')
}Note: No other project setup (no uv, no virtual environment) is required for R.
- Read the activity guide: Tutorial_01: Data Origins and the Scope of Research Questions
- Open each station's
.Rfile insrc/and replace eachTODOcomment with the matching code block from the tutorial - Run each line in RStudio (
Ctrl+Enter/Cmd+Return) and read the console output and plots - Discuss the backstory for that station with your group: who collected this data, and why?
- Answer that station's detective questions in
writing/reflection.mdbefore moving to the next station - Finish the General Reflection section once all four stations are complete
Each station's script can be run independently, for example:
source("src/station_01_weather_sensor/explore_weather.R")Or open the file directly in RStudio and run it line by line, which is recommended so you can pause and read each result.
You will submit:
- Completed R scripts with all
TODOitems resolved for each station:src/station_01_weather_sensor/explore_weather.Rsrc/station_02_social_media/explore_social_media.Rsrc/station_03_course_survey/explore_survey.Rsrc/station_04_retail_sales/explore_retail_sales.R
- Completed
writing/reflection.mdwith answers to all detective and reflection questions - All data files remain in their respective
data/folder
Note: You do NOT need to submit screenshots of your plots. We will verify functionality by running your code.
This is a check mark grade.
Please submit this assignment by pushing your work to your GitHub repository. Ensure that:
- All TODO items have been replaced with working code
- All scripts run without errors
- The reflection document is complete
- Your name has been added to all source files
Use meaningful commit messages that describe what you accomplished:
git add .
git commit -m "Complete Station 1: Weather sensor origin and scope"
git pushYou can check your work by running GatorGrade:
gatorgrade --config config/gatorgrade.ymlThis will verify that:
- All required files exist
- TODO items have been removed
- Reflection questions have been answered
If you encounter difficulties:
First, try adding code at the beginning of each program to remove all left-over variables and plots from previous runs. This will ensure that you are performing a "clean run" of your programs with each run.
# Clear environment and plots
rm(list = ls()) # clear all variables
graphics.off() # clear all plots
cat("\014") # clear the console
# Load tidyverse, install if necessary
if (!require('tidyverse')) {
install.packages('tidyverse')
library('tidyverse')
}- Read the error messages carefully - R and RStudio provide helpful error messages
- Check the tutorial document - it contains the exact code to copy and paste
- Consult the tidyverse documentation - https://www.tidyverse.org/
- Ask during class or office hours - bring specific questions about what you've tried
- Work with classmates - discuss the origin/scope reasoning together, but write your own answers
Issue: could not find function error
- Solution: Make sure you ran
library(tidyverse)at the top of the script before usingread_csv(),%>%, orggplot().
Issue: cannot open file 'data/...' error
- Solution: Make sure your RStudio working directory is the project root, not the
src/subfolder. Usegetwd()to check, andsetwd()if needed.
Issue: Plot window doesn't show anything
- Solution: Run the
ggplot(...)code as one full block (don't run just the first line), and check the Plots pane in RStudio.
Issue: Not sure what "scope" means for a dataset
- Solution: Re-read the backstory for that station in the tutorial - it describes exactly who collected the data and how.
- tidyverse Documentation: https://www.tidyverse.org/
- ggplot2 Documentation: https://ggplot2.tidyverse.org/
- R for Data Science (free book): https://r4ds.hadley.nz/
- dplyr Cheat Sheet: https://posit.co/resources/cheatsheets/
Looking for an extra challenge?! After completing the required stations, challenge yourself:
- Find your own dataset - locate a public dataset online and write its origin story
- Design a fifth station - propose a new data origin (e.g., a lab experiment, a government census) and list in-scope/out-of-scope questions for it
- Investigate a real headline - find a news article that cites data, and evaluate whether its conclusions match the data's actual scope
- Combine datasets - discuss what new questions become answerable (or stay out of scope) if you joined two of the four station datasets together
Remember: The goal is not just to run the R code, but to build the habit of asking "where did this data come from, and what can it actually tell me?" before trusting any conclusion drawn from it.
Now, go get 'em!

