AEM 6850
Empirical Methods for Applied Economists
Taught by
Prof. Ariel Ortiz-Bobea
TAs: Senjie Huang (PhD student) ·
Samuel Topper (MS student)
Every empirical project involves data somebody had to find, collect, clean, check, and organize. Methods courses typically teach you techniques that assume such data is ready to go. This course, in contrast, equips you with practical skills and tools on how to acquire, process and verify data with Artificial Intelligence (AI) assistance. We cover a wide range of data types including messy tables, text, documents, images, audio, and maps. Work with AI will emphasize code and output verification, an emerging bottleneck in research workflows. In-class quizzes test mastery of basic concepts. Homeworks are hands-on coding mini-projects that expose students to a variety of data types and test verification skills. Homework assignments follow an investigation of the January 2025 Los Angeles wildfires. There are no prerequisites.
| Date | Topic | |
|---|---|---|
| Part I — Foundations | ||
| Getting started | Tue Aug 25 | 1 · Overview What the course covers and how it works; installing R and RStudio; creating a GitHub account and making a first commit from the browser. |
| Thu Aug 27 | 2 · R essentials I Objects, vectors, types, and data frames; subsetting with conditions; how R converts data types automatically and how to check for it. | |
| Tue Sep 1 | 3 · R essentials II Matrices and lists — building, indexing, and combining them; running one function over every row, column, group, or file; then reading a real CSV into those shapes. Extra material, not taught: Wrangling: dplyr. | |
| Thu Sep 3 | 4 · Basic plots I Choosing the plot that matches the question, drawing it in one line, the settings that work on all of them, panels, and writing a figure to disk. | |
| Tue Sep 8 | 5 · Basic plots II Panels of unequal size, shaded windows and confidence bands, colour scales, hand-built axes, heat maps, maps, and animation. | |
| Coding craft | Thu Sep 10 | 6 · How to code How a project and a script are organized: folders, one script per task, sections, names and named constants. Writing functions instead of copy-pasting. Checking as you go with stopifnot(), and debugging as a strategy rather than a toolbox. |
| Tue Sep 15 | 7 · Projects & git How a project is organized: where code and data live, relative paths, symlinks for large files — then version control with git: commits, cloning, pushing, and reading a diff. | |
| AI & verification | Thu Sep 17 | 8 · AI I: chatbots Using AI chatbots and assistants for research tasks — explaining code, drafting text, planning an analysis — and their common failure modes. |
| Tue Sep 22 | 9 · AI II: the coding loop A workflow for AI-assisted coding: state the goal, delegate the code, predict the output, and verify the result before accepting it. | |
| Thu Sep 24 | 10 · Verification Common ways datasets go wrong — missing rows, impossible values, corrupted identifiers, unreconciled totals — and the checks that detect each one. | |
| Publication ready | Tue Sep 29 | 11 · Reproducible projects Making a project reproducible: package management with renv, reports and project websites written in Quarto, the README standard economics journals now enforce, and testing that everything runs from a fresh copy on another machine. |
| Thu Oct 1 | 12 · Publication graphics Making figures for readers with ggplot2: aesthetics, geoms, scales, facets, themes, labels, and exporting at exact sizes. | |
| Part II — Applications | ||
| Getting data | Tue Oct 6 | 13 · The data landscape A survey of unconventional data in economics — what satellite images, text, scanned documents, and other sources have been used to measure — and how to find data for a question. |
| Thu Oct 8 | 14 · Channels I: APIs Downloading data from APIs: endpoints, JSON, storing keys safely, handling rate limits, and saving raw responses. | |
| Tue Oct 13 | fall break — no class | |
| Thu Oct 15 | 15 · Channels II: scraping Extracting data from web pages with rvest and CSS selectors; politeness and terms of use; common pitfalls such as incomplete pagination. | |
| Text & documents | Tue Oct 20 | 16 · Text I: regex Working with text using stringr and regular expressions: extracting structured fields from unstructured text, with tests for every pattern. |
| Thu Oct 22 | 17 · Text II: LLMs Using large language models from R to classify text and extract structured data; controlling the output format, caching responses, and checking a sample against the source. | |
| Tue Oct 27 | 18 · Documents & scans Extracting tables from PDFs and scanned documents, and checking the results against totals printed in the document. | |
| Imagery & audio | Thu Oct 29 | 19 · Images: photographs Turning photographs into data: scoring images with vision models and validating the scores against measured data, including a year of daily sky photos matched to air-quality readings. |
| Tue Nov 3 | 20 · Satellite I: local Satellite and aerial imagery on your own machine: the resolution triad as a requirements checklist, band algebra and NDVI, off-the-shelf products against classifying your own, and surviving a very large download. | |
| Thu Nov 5 | 21 · Satellite II: Earth Engine When the data is too big to fetch, send the computation instead: the Earth Engine catalog, filtering a collection, server-side thinking, and zonal statistics over your own polygons exported back to a table. | |
| Tue Nov 10 | 22 · Audio Transcribing speech with timestamps and speaker labels, and extracting features beyond the words: pauses, disfluencies, and tone. | |
| Time & space | Thu Nov 12 | 23 · Time & time zones Dates and times in R: parsing formats, spreadsheet date numbers, time zones, and daylight saving time, with an exercise estimating how much of the world's population is awake at a given moment. |
| Tue Nov 17 | 24 · Spatial I: vector Vector spatial data with sf: geometries, coordinate reference systems and projections, spatial joins, and drawing maps. | |
| Thu Nov 19 | 25 · Spatial II: rasters Raster data with terra: aggregating gridded values such as weather to regions, choosing weights, and a fast method for doing it at scale. | |
| Tue Nov 24 | 26 · Spatial III: exposures Building new variables from spatial data: wind direction from wind fields, upwind and downwind indicators, distances, and travel paths. | |
| Ethics & close | Thu Nov 26 | Thanksgiving — no class |
| Tue Dec 1 | 27 · AI ethics Discussion of AI use in research: disclosure practices, fabricated citations, journal policies, and authorship. | |
| Thu Dec 3 | 28 · Moving forward The semester replayed as one arc, which checks caught real errors, and what these tools cannot do for you: the care, patience, and broad reading that decide whether a result is worth anything. | |