Hi all!
There’s a new version of the SafeGraph R package out - 0.5.1. This package is all about downloading and processing SafeGraph data, including functions to find the appropriate Patterns files given dates, for expanding the JSON columns, whether they’re unlabeled integers like visits_by_day
using expand_integer_json
, labeled characters like the bucketed
columns with expand_cat_json
, or the mind-twister that is open_hours
with expand_open_hours
. There are also tools for reading in SafeGraph data from the shop, weekly patterns files, normalization files, etc. (read_many_shop
, read_many_patterns
, read_many_csvs
, etc.). Plus stuff for processing and graphing.
All information at the package website: Package for Processing and Analyzing SafeGraph Data • SafeGraphR
This new version reflects the shift away from AWS access and towards API access. The safegraph_aws
and patterns_lookup
functions have been made more flexible to aid in finding and downloading SafeGraph data from AWS buckets other than the C19 one, which is being discontinued end-of-month.
Plus, there’s now the safegraph_api
function to help you download data using the SafeGraph Places GraphiQL API ( https://docs.safegraph.com/reference/places-api-overview-new ). Easily look up data from lots of SafeGraph databases using Placekeys, addresses, or general search terms.
Check it out, and let me know if you stumble across any bugs. And thanks to @Victor Chen (SafeGraph - API) for assistance navigating the API!
(Also, I know I haven’t updated the package vignettes to reflect this change - that’s coming relatively soon)