Exciting news for a Friday afternoon: the SafeGraphR package is now fully functional and has entered beta! The package is designed to make it easy to download, read in, and process SafeGraph patterns and stay-at-home data.
- Read and compile files (from AWS or from the shop) into R, including the ability to expand JSON columns and aggregate to different levels while minimizing memory footprint (plus, do multiple aggregations/expansions in a single file-read to save time)
- Produce a POI-NAICS link file
- Perform normalization: to sample size, to adjust for sampling rate differences, hierarchical Bayes shrinkage, seven-day moving averages, and scaling relative to a date or relative to previous year
- Helper functions and data sets make it easy to pull state and county FIPS codes from census block group codes, to link those FIPS codes to the actual names of the places, and also to put names on the NAICS codes.
- You can find installation information as well as two informative vignettes that walk you through working with patterns and stay-at-home data, respectively, at the package’s website here: Package for Processing and Analyzing SafeGraph Data • SafeGraphR
Let me know any issues you have.