View source: R/safegraph_aws.R
safegraph_aws | R Documentation |
This is a thin wrapper for aws.s3::s3sync
that will aim you at the right directory to synchronize.
safegraph_aws( path = ".", dataset, bucket_only = FALSE, base_url = "s3.wasabisys.com", key, secret, region = "", prefix = "", prefix_is_dir = FALSE, s3 = "s3://sg-c19-response/", max_print = 1, ... )
path |
The local directory to synchronize. |
dataset |
The SafeGraph bucket to get from. Can be "weekly" (new method since July 2021), "weekly-backfill" (the new method for times before July 2021; note AS OF AUGUST 2021 this gives the same result as "weekly" but I've kept "weekly-backfill" here in case it switches back to being different later), "monthly" (method since July 2021; also contains backfill folders as |
bucket_only |
Instead of doing an |
base_url |
The base URL to pull the data from. |
key |
A character string containing an AWS Access Key ID. |
secret |
A character string containing an AWS Secret Access Key. |
region |
A character string containing the AWS region. |
prefix |
Leading part of the objects in the bucket must have this prefix. For example, to download social distancing data only from 2020, set this to "2020/". Some of the backfill buckets can be tricky because folder structure also includes the release date. For example, for "weekly-backfill" if you want patterns data, you want "patterns_backfill/2021/07/15/15/" and THEN followed by the time period you want like "2021/". If you want backfill data from "monthly", for example patterns, it's "patterns_backfill/2021/07/15/16/", then followed by the year/month. The "neighborhood" buckets use "y=2021/m=06/" etc instead of "2021/06". |
prefix_is_dir |
If |
s3 |
The S3 server that stores the data. |
max_print |
Temporarily set |
... |
Additional parameters to be sent to |
NOTE THE BREAKING CHANGE WITH SafeGraphR 0.4.2: BUCKET NAMES ARE CHANGED AND ACCESS TO OUTDATED VERSIONS OF DATA IS REMOVED.
This function doesn't add too much, but it does make the default behavior you probably want a bit easier. If you plan to specify the aws.s3::s3sync
"bucket" option yourself, this function is largely useless.
See catalog.safegraph.io for more description of the various buckets.
## Not run: # Download all the recent weekly-patterns files to the working directory safegraph_aws(dataset = 'weekly', key = 'MYINFO', secret = 'MYOTHERINFO') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.