Getting Oriented: Filtering and Grouping
About this curriculum
Data for Food Security now runs on I2I_Synthetic_People_10000.csv — 10,000 synthetic survey records, one row per person, covering demographics, income, SNAP/WIC participation, pantry visits, and satisfaction. No SQL schema, no joins: every exercise works directly on this one table in a spreadsheet or with pandas. A companion workbook includes a City Summary sheet with pre-computed per-city totals you'll use to check your own work.
What this module is about
Before any analysis, you need to be able to slice the dataset down to a subset and summarize it — the two moves you'll repeat in every later module.
What you'll achieve
You'll filter the dataset to a single city and compute an average, then compare a chart you build yourself against numbers the instructor already computed.
Exercises
- Filter the dataset to one city (
City) and calculate the averageAgefor that city. - Create a bar chart of record counts by
City, and compare your counts against the City Summary sheet — they should match exactly. If they don't, that's a filtering bug worth finding now.
Why it matters
If your basic filter-and-count doesn't match a known-good summary, nothing built on top of it later in the course can be trusted either.
Suggested tools
Excel/Sheets pivot table and bar chart, or pandas groupby.