Hey I was wondering if there is a workaround to reading in the files with safegraphR for the patterns post 06-24-20. The way that safegraphR runs it seems read_many_patterns works if they are all in the same directory but since the after 06-24-20, the files are all in separate directories with dates, i was wondering if there is a workaround rather than having to load the path of each
I was wondering if there is a workaround to reading in the files with safegraphR for patterns
Yep! Just specify the base directory and set
recursive = TRUE. It will read every file in every subdirectory, and use the AWS-standard folder structure to figure out start dates.
Notes on this:
- If you are using
read_many_patternsto do aggregation with the
byargument, you may need to re-aggregate after reading in, since it will only aggregate within each file, and now there are multiple files per week.
- This works as long as you want all the new-patterns-data you’ve loaded on your computer. If you want to read in only a subset of weeks you’ll need to do a
list.files(recursive = TRUE)yourself and pass whatever subset of the results you want into the
Perfect thank you so much. Speaking of aggregation, when I’m running the poi_link with the core places data, I’m getting some “NA” niacs_codes, can you load in multiple files? I’ve been loading it with the most recent core places (august) cause it takes one file but i’m wondering if i should load all three. Do you know @Nick_H-K_Seattle_University?
I’ve never checked it myself but I believe the core files are intended to be improved over time so you only need the most recent one. As for NA naics_codes, some POIs are just uncategorized.
Perfect thank you so so so much!