Skip to content

poissonconsulting/readwriteaws

Repository files navigation

readwriteaws

Lifecycle: experimental

Overview

This package is designed for Poisson employees to easily access our files within our AWS S3 buckets. The general workflow for this package is:

  1. Obtain a list of files from the bucket
  2. Download them to your local drive

This package can also upload files from our local drive to AWS S3 buckets as well.

Installation

To install the latest version from GitHub

# install.packages("remotes")
remotes::install_github("poissonconsulting/readwriteaws")

Credentials

Credentials need to be set up properly so you have permission to access AWS. It is recommended to put the credentials in your .Renviron file. The names of the variables must match below or you will not be authenticated.

AWS_ACCESS_KEY_ID=GET_FROM_AWS_USER
AWS_SECRET_ACCESS_KEY=GET_FROM_AWS_USER
AWS_REGION=ca-central-1

Credentials can also be passed to the functions directly. See examples for more info.

Examples

Downloading files for analysis

capture_2021 <- rwa_list_su_files(bucket_name = "purple-lake-poissonconsulting", 
                                  data_type = "punch-data",
                                  year = 2021,
                                  file_extension = "csv")

rwa_download_files(file_list = capture_2021, 
                   directory = "purple-lake", 
                   bucket_name = "purple-lake-poissonconsulting")

How to Contribute

Please report any issues.

Pull requests are always welcome.

Please note that the readwriteaws project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

R package to interface between s3 buckets and your local file structure

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages