DPSS Capstone — University of Chicago Harris School, Data & Policy Summer Scholar program. July 2022 · Revised July 2026
Daily card-transaction data from the SafeGraph Spend panel (seven retail categories, February 1 – March 31, 2022) are used to ask whether Russia's February 24, 2022 invasion of Ukraine — and the sanctions that followed — visibly changed U.S. consumer spending.
Author: Pablo Zavala
📄 Report: PDF · HTML (self-contained; all code embedded behind fold-out buttons)
- No break at the invasion. Aggregate panel spending rose a modest +6.1% after February 24, led by categories with mundane seasonal explanations (clothing +25.1%, traveler accommodation +17.6%). Grocery — the stockpiling candidate — was flat (−0.6%).
- The apparent "reaction" on February 21 is a calendar artifact. Presidents' Day is a bank holiday: card processing paused (−4.9 s.d. residual on Feb 21) and the weekend backlog cleared on Tuesday (+4.9 s.d. on Feb 22). What looks like a geopolitical consumption response is a payment-processing displacement — a useful caution for event studies on high-frequency payments data.
- The war's clearest imprint is prices at the pump. Gasoline-station spending per transaction climbed steadily (+10.6%) as fuel prices hit record nominal levels — yet county-level shifts in general-merchandise spending are uncorrelated with gasoline-spending shifts (β ≈ 0 with state fixed effects and HC1 errors, winsorized robustness), i.e., no evidence of early crowd-out.
| Section | What it does |
|---|---|
| National trends | Daily panel spending by category with the invasion and Presidents' Day marked; documents the Monday processing sawtooth |
| Deseasonalization | Day-of-week fixed effects estimated within category; standardized residuals isolate genuine surprises (and expose the holiday whipsaw) |
| Per-transaction spending | Category series indexed to pre-invasion mean = 100; isolates the intensive margin where the fuel-price shock shows up |
| NYC geography | 3,198 establishments spatially joined to the five boroughs; deciles of spending change computed within NYC |
| Substitution test | County-level Δgeneral-merchandise on Δgas-station spending: OLS, + state FE, + winsorization; HC1 robust SEs (modelsummary table) |
capstone.Rmd Source of record — R Markdown report
capstone.R Generated from capstone.Rmd via knitr::purl(); do not edit
data/
spending_timeseries_total.csv Daily total spending by category
spending_timeseries_per.csv Daily per-transaction spending by category
spending_shift_in_baskets.csv County-level spending shifts (general merch vs. gas)
spending_maps.csv Establishment-level spending changes with coordinates
get_shapefile.sh Downloads the county shapefile (not committed)
output/
capstone-report.pdf Rendered report (PDF)
capstone-report.html Rendered report (self-contained HTML)
figs/ Figure PNGs exported at render time
-
Install R (≥ 4.3) and packages:
install.packages(c("tidyverse", "sf", "scales", "kableExtra", "modelsummary", "sandwich", "ragg", "rmarkdown"))
or create a conda environment with everything prebuilt:
conda create -p ./env -c conda-forge r-base r-tidyverse r-sf r-rmarkdown \ r-modelsummary r-kableextra r-sandwich r-ragg pandoc tectonic
-
Download the 2016 TIGER/Line county shapefile (~124 MB unzipped, not committed):
bash data/get_shapefile.sh
-
Render from the repository root:
rmarkdown::render("capstone.Rmd", output_file = "output/capstone-report.html") # HTML rmarkdown::render("capstone.Rmd", output_format = "pdf_document", output_file = "capstone-report.pdf") # PDF (Tectonic)
data/*.csvare course-provided extracts derived from SafeGraph Spend data, included for coursework reproducibility; review SafeGraph's terms before redistributing.- The establishment- and county-level change measures (
delta_STD) are provided by the course extract; their exact construction is not fully documented, so the report interprets them ordinally (deciles, signs) rather than as precise magnitudes. - County boundaries: U.S. Census Bureau TIGER/Line 2016.
The spending-data extracts were prepared and provided by the Data & Policy Summer Scholar (DPSS) program at the University of Chicago Harris School of Public Policy. All analysis, interpretation, and any errors are the author's own.
Code in this repository (the R Markdown source, the generated script, and shell scripts) is released under the MIT License. The files in data/ are course-provided extracts derived from SafeGraph Spend and are not covered by that license; they remain subject to SafeGraph's terms and are included solely to reproduce this coursework.

