I want to make line graphs with changes in activity (foot traffic) at the industry-level (NAICS4), overall and for employees

Hi, apologies if this has already been asked. I want to make line graphs with changes in activity (foot traffic) at the industry-level (NAICS4), overall and for employees, similar to what you have here below. Is there code available that reproduces some of these plots?

@Jorge_Colmenares_MIT We don’t provide this data directly, but we have detailed documentation for you to reproduce from the Patterns data available here.

Here is detailed documentation

Hi @Jorge_Colmenares_MIT, you’d have to aggregate this data yourself to recreate this. Thanks!

I do have some R code that aggregates into the NAICS categories that correspond to these. Would that be useful?

This piece of code aggregates the weekly patterns into salient industry categories at the state level. I think all of the industries in the Figure you posted are in here.

I wrote it a while ago so the underlying data might have changed. If you want US-wide you just have to take out the state loop.

Thank you!

No problem! It’s not the most efficient code, but because of how large the CBG dataset is, parallelizing made R crash.