Skip to contents

This function downloads data from remote sources like CKAN, AWS S3, and MongoDB. It retrieves the data based on the hashed_data identifier and assumes the data is stored using the same naming conventions provided in the `remote_share` function.

Usage

remote_download(
  hashed_data = NULL,
  ckan_url,
  ckan_key,
  ckan_package,
  s3_key_id,
  s3_secret_key,
  s3_region,
  s3_bucket,
  mongo_key,
  mongo_collection
)

Arguments

hashed_data

A character string representing the hashed identifier of the data to be downloaded.

ckan_url

A character string representing the CKAN base URL.

ckan_key

A character string representing the CKAN API key.

ckan_package

A character string representing the CKAN package identifier.

s3_key_id

A character string representing the AWS S3 access key ID.

s3_secret_key

A character string representing the AWS S3 secret access key.

s3_region

A character string representing the AWS S3 region.

s3_bucket

A character string representing the AWS S3 bucket name.

mongo_key

A character string representing the mongo key.

mongo_collection

A character string representing the mongo collection.

Value

A named list containing the downloaded datasets.

Examples

if (FALSE) { # \dontrun{
  downloaded_data <- remote_download(hashed_data = "example_hash",
                                     ckan_url = "https://example.com",
                                     ckan_key = "your_ckan_key",
                                     ckan_package = "your_ckan_package",
                                     s3_key_id = "your_s3_key_id",
                                     s3_secret_key = "your_s3_secret_key",
                                     s3_region = "your_s3_region",
                                     s3_bucket = "your_s3_bucket",
                                     mongo_key = "mongo_key",
                                     mongo_collection = "mongo_collection")
} # }