Due: Oct 25 by 11:59pm
Weight: This assignment is worth 9% of your final grade.
Purpose: An agent can generate a chart or a summary statistic in seconds. What it won’t do on its own is ask a good question, or doubt the first pattern it finds. In this assignment you’ll direct Claude Code to clean, count, and join two real data sources, but the questions you ask (and whether you trust what comes back) are on you.
Assessment: Your submission will be assessed using the rubric at the bottom of this page.
Your mission is to explore who actually “wins” the Olympics, and to find out whether that answer holds up once you look more carefully.
You’ll work with two real data sources:
- Athlete-level results from the 2016 Rio Summer Olympics (
olympics_2016.csv)
- Country population figures from Our World in Data (
population_2016.csv).
Neither file is analysis-ready. The Olympics data is one row per athlete per event, which is not the same thing as one row per medal. The two files don’t necessarily use the same country names either. And some entries in the Olympics data (like athletes competing as “Individual Olympic Athletes”) don’t correspond to any country at all. Getting past all of that and being able to still ask a good question and find a correct answer is the point of this assignment.
1. Get organized
Open your course repo (eda-f26/eda-netID) in Positron using File › Open Folder and open it to the mini2 folder.
Everything for this assignment lives in the mini2 folder. Inside it you’ll find report.qmd and a data folder. Click on report.qmd. That is the primary file you will edit to conduct your analysis.
Paths inside report.qmd are relative to the mini2 folder, so refer to the data as file.path('data', 'olympics_2016.csv').
2. Document the data
Inside the data folder, there is a README.md file with some missing information. Click on that file and edit it to fill in the missing information for both data files:
3. Preview the data
Preview both files (e.g. using head() and glimpse()). A few things worth noticing before you plan anything:
- The Olympics data has one row per athlete per event – look at a team sport like “Basketball” or a doubles event and see how many rows a single medal produces.
- Some
team values have a -1, -2, etc. suffix (e.g. "Czech Republic-1"). Figure out what that suffix means before you decide whether to keep or strip it.
- Some
team values don’t match typical country names at all (e.g. "Individual Olympic Athletes") – these athletes aren’t competing for a specific country.
- Compare how country names are spelled in each file. They don’t all match.
4. Load the data
Have Claude Code read in both olympics_2016.csv and population_2016.csv. Pause here and think about your strategy before moving on – don’t let the agent start cleaning or joining yet.
5. Develop Your Strategy
Before you prompt the agent to write any code, you need a plan. None of the following are things an agent will reliably get right unless you tell it what to check:
Write out your strategy as a numbered list. It should address:
- Counting medals correctly. A country’s medal count is not the number of rows it has in the data. What does one row actually represent, and how will you collapse rows into one count per medal?
- Handling the team-number suffixes and non-country teams. Which rows need a name fix, and which rows (if any) can’t be joined to a country at all?
- Joining to population. The two files don’t use identical country names. How will you find the mismatches, and how will you decide what to do with each one?
- What you’ll check afterward. You won’t know your join or your counts are right just because the code ran – decide now what evidence would convince you.
Deliverable: A written strategy with numbered steps, in your report.qmd file, written before any cleaning or joining code. Be specific – this is what you’ll hand to the agent, and what you’ll check its output against later.
6. Direct the Agent
Now prompt Claude Code to implement your strategy. Review what it produces as it goes – read the code, read the diffs, and check intermediate output rather than accepting the final result all at once.
If the agent’s first attempt gets something wrong – counts rows instead of medals, joins on country name without checking for mismatches, silently drops “Individual Olympic Athletes” without telling you – that’s expected. Catching it is the point of the next step.
Deliverable: Clean, well-organized code in your report that produces (a) a correct medal count per country and (b) a joined data frame with population added.
Note: Claude Code should directly edit your report.qmd file.
7. Interrogate
Getting a data frame that looks right is not the same as verifying it is right. This is the step that’s graded most heavily in this assignment. Do not just ask Claude Code “is this correct?” – it will generally say yes whether or not it actually checked anything. You need to design and interpret the checks yourself, even if the agent helps write the code that runs them.
Run and document at least these checks:
- Medal count check: look up the real, official 2016 Rio medal table on Wikipedia for at least 3-5 countries and compare it to what your code computed. If they don’t match, figure out why before moving on.
- Join check: did every country with medals actually find a population match? List any that didn’t, and say what you decided to do about each one and why.
- The headline comparison: for every country, compute its rank by total medal count, and separately its rank by medals per capita (medals divided by population). Show both rankings side by side (a table, a chart, or both) and write about which countries move the most between them – and why that makes sense once you think about what “per capita” is actually measuring.
Deliverable: An Interrogate section in your report showing the checks you ran, their output, and what you concluded – including anywhere you found and corrected a mistake in the agent’s first attempt.
8. Explore Your Own Questions
Once your joined data frame is verified, ask at least 2 more research questions of your own, using either the Olympics data, the population-joined data, or both.
Your 2 questions must use genuinely different chart types. For example, “which country won the most medals” and “which sport awarded the most medals” are both ranking questions – that doesn’t count as 2 different types. Pick from (at least) these categories, and use no more than one question per category:
- Ranking – which categories are highest/lowest (ordered bar chart)
- Comparison – how specific groups compare to each other on a measure (grouped/dodged bars)
- Distribution – how a numeric variable is spread across observations (histogram, boxplot, density)
- Relationship – how two numeric variables relate to each other (scatterplot)
- Composition – how a total breaks down into parts (stacked bar, waffle chart, pie chart)
For each question: state it, make the chart, and write at least one paragraph interpreting what you found.
Deliverable: At least 2 research questions, each with a chart of a different type from the list above and a written interpretation.
Note: this dataset is a single year, so a trend-over-time chart isn’t available here – see the bonus if you want to explore that.)
9. Document Your Process
Save your joined, cleaned data as my_clean_data.csv in your mini2 folder, next to report.qmd.
Write a brief reflection addressing:
- What were the 2-3 biggest challenges in cleaning and joining this data?
- Where, if anywhere, did Claude Code’s output need to be corrected, and how did you catch it?
- What specifically did you check to be confident your medal counts and join are correct?
- What would you do differently if you encountered similar data again?
Deliverable: Saved my_clean_data.csv file in your mini2 folder, and written reflection (4-6 sentences).
10. Render and submit
To submit your assignment, follow these instructions:
- Render your
report.qmd file by either clicking the “Preview” button in Positron or running quarto render in the terminal.
- Open the rendered
report.html file and proofread it – make sure there are no errors and all the formatting looks as you expected.
- Run
/export in Claude Code and save the result as transcript.md in your mini2 folder. This is a required part of your submission – it’s how your verification is checked.
- Check that your
mini2 folder contains exactly four files – report.qmd, report.html, transcript.md, and my_clean_data.csv – plus the data folder.
- Commit and push your work using GitHub Desktop: look at the diff, write a short commit message, click Commit, then Push.
Your work isn’t submitted until you’ve pushed it. Committing only saves the change on your own computer – go look at your repo on GitHub.com and confirm your work is actually there before you call this done.
Bonus: Chase the trend (+5%)
The 2016-only data can’t answer a trend-over-time question. For bonus credit, go get the full historical Olympics dataset (1896-2016) and explore how a country’s per-capita medal count has changed over time.
Fair warning: the historical data includes teams that no longer exist (the Soviet Union, East and West Germany, and others), and population data for defunct countries is much harder to track down cleanly than for 2016. You’ll need to make and justify a real judgment call about how to handle this – there isn’t a clean, universally “correct” answer.
Grading Rubric
40 Total Points
| Organization & Formatting |
5
All formatting guidelines are followed; YAML is correctly filled out. |
4
Most formatting guidelines are followed; YAML is correctly filled out. |
3
Several or all formatting guidelines not followed; YAML contains elements that aren't updated from the provided starter file; the provided report.qmd wasn't used. |
| Data Documentation |
5
Both data sources (Olympics results and population data) are clearly and accurately described, including where each was downloaded from. |
4
Both data sources are described but one description is incomplete or slightly inaccurate. |
3
One or both data sources are missing, undocumented, or inaccurately described. |
| Strategy |
5
A specific, numbered strategy is written before implementation; it correctly identifies how medals should be counted (not simply counting rows), how the two data sources will be joined, and how mismatched or ambiguous country names will be handled. |
4
A strategy is present and numbered, but is vague in places or misses one of the key judgment calls (medal counting, join approach, or name mismatches). |
3
Strategy is missing, generic/copied from the assignment prompt, or clearly written after the code rather than guiding it. |
| Explore |
9 - 10
At least 2 clearly stated research questions are addressed, each using a genuinely different chart type (e.g. not two ranking charts); each is supported by an appropriately chosen chart and a written interpretation. |
6 - 8
Research questions are addressed, but two or more use the same chart type, or a chart/interpretation is weak or missing for one question. |
0 - 5
Fewer than 2 research questions are addressed, chart types are not meaningfully different, or charts/interpretations are missing. |
| Interrogate |
9 - 10
Medal counts are verified against the real, official Rio 2016 medal table for multiple countries; the join is checked for silently dropped or unmatched countries; the raw vs. per-capita medal ranking comparison is completed and clearly interpreted, including how and why the story changes. |
6 - 8
Some verification is present (e.g. medal counts or join check) but incomplete, or the raw vs. per-capita comparison is present but the interpretation is thin or doesn't explain why the rankings differ. |
0 - 5
No real verification beyond visual inspection; medal counts are not checked against an external source; the raw vs. per-capita comparison is missing or superficial. |
| Technical & Process |
5
All code runs without errors; the mini2 folder pushed to GitHub contains exactly report.qmd, report.html, transcript.md, and my_clean_data.csv. |
4
Code has only one or two errors, otherwise runs; the pushed mini2 folder is missing one of the four required files or includes extra clutter. |
3
Code has multiple errors; html file cannot be rendered without significant changes; work was never pushed to GitHub; or the pushed mini2 folder is missing report.qmd, report.html, transcript.md, or my_clean_data.csv. |