Data Analysis Basics
Novice · Data & Analysis track · ~35 min hands-on + readings and quiz
← Back to the Data & Analysis track
Ask clear questions of a dataset and get a first, checkable answer with AI.
What you’ll be able to do
- Ask clear questions of a dataset and get a first answer with AI help
- Have AI generate and explain simple summaries and a chart (R or Python)
- Spot when an AI answer needs checking against the data
Overview
AI can read a dataset’s description and draft the steps or code to answer a question — loading it, summarizing it, making a quick chart. You stay in charge of whether the question is sensible and whether the answer is right.
Start small and verifiable: one dataset, one question, one chart. Confirm a number or two against what you already know before you trust anything.
Practice activities
Activity 1 · Novice — Interview a dataset (Philadelphia crashes)
Time ~20 min · Tools ChatGPT Edu + a web browser
Goal. Get oriented to a real public dataset and pull a first answer you can check.
Setup. Open the Philadelphia Crashes data page and download the Crash Data 2020–2024 (CSV) — PennDOT crash records inside Philadelphia (~50k rows). Open it in Excel/Sheets, or paste the header row + first 5 data rows into ChatGPT Edu. This is public data, so it’s fine to use.
Steps.
Copy the column names and first 5 rows into ChatGPT Edu:
Here are the columns and first rows of a Philadelphia crash dataset (PennDOT). In a short table, tell me what each column likely means and its data type. Flag any columns you’re unsure about.
Ask for question ideas:
Based on these columns, list five questions this data can answer about pedestrian safety, from simple to harder. For each, name the columns you’d use.
Pick one (e.g., “How many crashes involved a pedestrian each year?”) and ask for code + steps:
Using the pedestrian-count and crash-year fields, write R (tidyverse) or Python (pandas) code to count crashes involving at least one pedestrian, by year. Show the code and explain each line. First confirm the exact field names from my column list.
Run the code.
Expected result. A small table of pedestrian-involved crashes per year (roughly a few thousand per year).
Check your work. Spot-check one year yourself — in Excel, count rows where the pedestrian field is greater than 0. It should match the AI’s number.
Common pitfalls. Field names in the file often differ from what AI guesses — always confirm against the real columns. Missing values may be blank or coded as 0; decide how to treat them before counting.
Stretch (optional). Ask for the same count broken out by hour of day, and note when pedestrian crashes peak.
Activity 2 · Novice — From question to chart
Time ~15 min · Tools ChatGPT Edu + R or Python
Goal. Turn one question into a clear, defensible chart.
Setup. Same crashes CSV from Activity 1.
Steps.
Ask for a chart:
Write R (ggplot2) or Python (matplotlib) code to make a bar chart of pedestrian-involved crashes by year, with axis labels and a title, using this dataset.
Run it, then ask it to explain each line in plain language.
Change one thing:
Now show counts by hour of day instead of year, and shade the three highest hours darker.
Expected result. A labeled bar chart; the hour version typically shows an afternoon/evening peak.
Check your work. The chart’s yearly totals should match your Activity 1 table exactly.
Common pitfalls. Don’t let AI invent a year that isn’t in the data — confirm the year range. Reject any chart with an unlabeled axis.
Stretch (optional). Ask AI to add a one-sentence, plain-language caption summarizing the takeaway for a community audience.
Activity 3 · Novice — Same question, but the AI runs the code itself
Time ~20 min · Tools Claude Code
Goal. Answer the same question as Activity 1 — pedestrian-involved crashes per year — but let a coding agent read the actual file, write the code, run it, and fix its own errors, so you can compare the two workflows.
Setup. Claude Code is a coding agent from Anthropic that runs in a terminal — the plain text window where you type commands instead of clicking (Terminal on Mac, PowerShell on Windows). Unlike a chat window, it can open files on your computer, run code, and see the results itself. Install it per Anthropic’s instructions (it requires a paid Claude account or API key — this is a personal tool, not a Drexel one). Download the same Crash Data 2020–2024 CSV from Activity 1 and save it in a new empty folder (e.g., crash-practice/crashes.csv).
Steps.
Open your terminal, move into the folder (
cd crash-practice), and typeclaudeto start. Then ask it to look at the file — notice you don’t paste any rows; it reads the file itself:Read crashes.csv and tell me what the columns mean. It’s PennDOT crash data for Philadelphia, 2020–2024.
Ask the same question as Activity 1, and let it do the whole loop:
Write and run a short Python script that counts pedestrian-involved crashes by year. Show me the table and save the script as ped_crashes.py.
Watch what happens: Claude Code writes the script, runs it, and if the code errors (wrong column name, missing library), it reads the error and fixes it — the copy-paste-back-and-forth from Activity 1 is gone. It will ask permission before running things; read what it wants to do before saying yes.
Ask for the chart:
Now make a simple bar chart of that table and save it as ped_crashes.png.
Open the PNG from your file browser and look at it.
Expected result. The same small table as Activity 1 — pedestrian-involved crashes per year, roughly a few thousand each year — plus two real files on your computer: a script you can rerun and a chart you can open.
Check your work. The numbers should match your Activity 1 output exactly (same file, same question). If you skipped Activity 1, spot-check one year in Excel: count rows where the pedestrian field is > 0. Since Claude Code saved the script, you can also open ped_crashes.py and read what it actually did — that’s your audit trail.
Common pitfalls. Claude Code can read everything in the folder you start it in, so start it in a folder containing only this CSV — not your Documents folder. And the standing rule: Claude Code is not Drexel-supported and is approved for Low Risk (public) data only, so never point it at student records, PHI, or anything non-public.
Stretch (optional). Ask it to add bicycle-involved crashes as a second series on the same chart, and watch how it modifies and re-runs its own script.
Check your readiness
Answer these, then check — your score suggests whether to dive in or skim the readings first.
Recommended readings
Available in the shared OneDrive folder Staff Faculty AI Workshop → Readings, and online where linked:
- AI Agents for Data Scientists: Automations vs Agents — when AI should assist vs. when to keep manual control.
- How to Do Agentic Data Science (Eric J. Ma) — a practical workflow for AI-assisted analysis.
- Mastering the Data Science Human Skills AI Can’t Touch — the judgment you still own.
Useful resources
- ChatGPT Edu (Drexel AI Tools) — the approved tool for this work, with data rules.
- Posit / RStudio — the standard environment for R analysis.
- tidyverse — R packages for reading, summarizing, and plotting data.