Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Data and Policy Summer Scholar Program

Capstone Project 2022

Macroeconomic shocks and consumer spending

In this Capstone Project, you will use consumption data from SafeGraph, a data aggregator, to monitor how the global economic response to the Russian invasion of Ukraine has impacted spending patterns in the United States. You will work with four different data les, all hosted on Canvas.

1. Using the le spending_timeseries_total, make a daily time series gure of spend- ing by retail category (spending, top_category). You can make either seven different figures or overlay each time series in a single gure. In three sentences or less, describe what you observe from the data.  Are the trends similar across retailers?  Are there any particular days of the week that experience large swings in spending? What might cause these cyclical day-over-day changes? It might be helpful to carefully review the data documentation here [link].

2.  Given the potential biases discovered in the question above, how might you deal with cyclical spending patterns?  One option is to deseasonalize the data to get rid of the weekly patterns.  To do this, you could implement a simple regression that uses day of week xed effects and studies the residuals.  Make the corresponding time series plot from the question above for these deseasonalized spending measures. Second, it is helpful to standardize spending by the number of transactions. Using the le spend- ing_timeseries_per, make the same time series plot as above for the alternative spending measure (spending_ptpd). In three sentences or less, describe what you ob- serve from these new data.  In each of these additional gures, what do you observe about changes in consumption? Are there any large shifts around February 21, 2022, when NATO member states announced sanctions?

3. Next, you will visualize geographic changes in spending. Using the file spending_map, you can map the post-invasion change (5 business days post vs 5 business days prior) in spending by retail location (delta).  Given the scale of the map, pick (at least) one state to visualize.  Each retail location is listed with coordinates (latitude, longitude) used for mapping. Use the change in spending to create the color gradient so that you can identify the change visually. You might also want to use a standardized version of the change in spending, which is included in the dataset as well (delta_STD has mean

0 and standard deviation of 1).  To make your map even more compelling, consider splitting out retail locations by category. In three sentences or less, describe what you observe from the data. What do you nd? Are there geographic pockets that are most impacted by the increase in spending on gasoline, for example?

4. Finally, using the le spending_shift_in_baskets, you will study how the change in spending on gasoline by county correlates with changes in spending on all other goods and services in the same county.  To do this, run two linear regressions.  One is the bivariate regression including delta_STD_gen as the outcome and delta_STD_gas as the regressor of interest.  The second is the same regression, but including state xed effects (STATEFP). In three sentences or less, describe what you observe from these regressions. Does the shift in spending on gasoline correlate significantly, in precision or economic terms (magnitude), with spending on other retail categories?

Figure 1: Example Plots

 

(a) Daily time series of total spending by retailer category during February and March 2022

 

(b) Changes in spending across all categories by retailer (percentile of delta_STD) for Florida