All Projects → atlanhq → flyio

atlanhq / flyio

Licence: other
Input Output Files in R from Cloud or Local

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to flyio

Aws.s3
Amazon Simple Storage Service (S3) API Client
Stars: ✭ 302 (+556.52%)
Mutual labels:  amazon, aws-s3, r-package
storage-abstraction
Provides an abstraction layer for interacting with a storage; the storage can be local or in the cloud.
Stars: ✭ 36 (-21.74%)
Mutual labels:  amazon, aws-s3
punic
Punic is a remote cache CLI built for Carthage and Apple .xcframework
Stars: ✭ 25 (-45.65%)
Mutual labels:  amazon, aws-s3
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+8447.83%)
Mutual labels:  aws-s3, gcs
Django S3 Like Storage
Your Own Amazon S3 Django Storage
Stars: ✭ 28 (-39.13%)
Mutual labels:  amazon, aws-s3
django-s3file
A lightweight file upload input for Django and Amazon S3
Stars: ✭ 66 (+43.48%)
Mutual labels:  amazon, aws-s3
Aws Config To Elasticsearch
Generates an AWS Config Snapshot and ingests it into ElasticSearch for further analysis using Kibana
Stars: ✭ 62 (+34.78%)
Mutual labels:  amazon, aws-s3
cloud-integration
Spark cloud integration: tests, cloud committers and more
Stars: ✭ 20 (-56.52%)
Mutual labels:  aws-s3, gcs
linguisticsdown
Easy Linguistics Document Writing with R Markdown
Stars: ✭ 24 (-47.83%)
Mutual labels:  r-package
colocr
An R package for conducting co-localization analysis. Edit
Stars: ✭ 22 (-52.17%)
Mutual labels:  r-package
s3kit
AWS S3 CLI tooklit
Stars: ✭ 21 (-54.35%)
Mutual labels:  aws-s3
sqs-exporter
A Prometheus Exporter for the Amazon Simple Queue Service (SQS)
Stars: ✭ 24 (-47.83%)
Mutual labels:  amazon
bcdata
An R package for searching & retrieving data from the B.C. Data Catalogue
Stars: ✭ 68 (+47.83%)
Mutual labels:  r-package
fss3
FSS3 is an S3 filesystem abstraction layer for Golang
Stars: ✭ 52 (+13.04%)
Mutual labels:  aws-s3
Alexa-skills-starters
💻 A collection of super cool Amazon Alexa skills for complete newbies. 💻
Stars: ✭ 24 (-47.83%)
Mutual labels:  amazon
easyclimate
Easy access to high-resolution daily climate data for Europe
Stars: ✭ 26 (-43.48%)
Mutual labels:  r-package
tsmp
R Functions implementing UCR Matrix Profile Algorithm
Stars: ✭ 63 (+36.96%)
Mutual labels:  r-package
ghql
GraphQL R client
Stars: ✭ 128 (+178.26%)
Mutual labels:  r-package
realtime
No description or website provided.
Stars: ✭ 15 (-67.39%)
Mutual labels:  r-package
rodev
⛔ ARCHIVED ⛔ Helper for rOpenSci Package Developpers
Stars: ✭ 24 (-47.83%)
Mutual labels:  r-package

flyio - Make data fly to R

Input and output data from R — download, upload, read and write objects from AWS S3, GoogleCloudStorage or local file system from a single interface.

Overview

flyio provides a common interface to interact with data from cloud storage providers or local storage directly from R. It currently supports AWS S3 and Google Cloud Storage, thanks to the API wrappers provided by cloudyr. flyio also supports reading or writing tables, rasters, shapefiles and R objects to the data source from memory.

  • flyio_set_datasource(): Set the data source (GCS, S3 or local) for all the other functions in flyio.
  • flyio_auth(): Authenticate data source (GCS or S3) so that you have access to the data. In a single session, different data sources can be authenticated.
  • flyio_set_bucket(): Set the bucket name once for any or both data sources so that you don't need to write it in each function.
  • list_files(): List the files in the bucket/folder.
  • file_exists(): Check if a file exists in the bucket/folder.
  • export_[file/folder](): Upload a file/folder to S3 or GCS from R.
  • import_file(): Download a file from S3 or GCS.
  • import_[table/raster/stack/shp/rds/rda/st](): Read a file from the set data source and bucket from a user-defined function.
  • export_[table/raster/shp/rds/rda/st](): Write a file to the set data source and bucket from a user-defined function.

For global usage, the datsource, authentication keys and bucket can be set in the environment variables of the machine so that one does not have to input it every time.

  • For datasource:CLOUD_STORAGE_NAME
  • For bucket name: flyioBucketS3 or flyioBucketGcs
  • For authentication: GCS_AUTH_FILE or AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION (For AWS S3, if the awscli is athenticated, then this step is not needed)

Installation

# Install the stable version from CRAN:
install.packages("flyio")

# Install the latest dev version from GitHub:
install.packages("devtools")
devtools::install_github("atlanhq/flyio")

# Load the library
library(flyio)

If you encounter a bug, please file an issue with steps to reproduce it on Github. Please use the same for any feature requests, enhancements or suggestions.

Example

# Setting the data source
flyio_set_datasource("gcs")

# Verify if the data source is set
flyio_get_datasource()

# Authenticate the default data source and set bucket
flyio_auth("key.json")
flyio_set_bucket("atlanhq-flyio")

# Authenticate S3 also
flyio_auth(c("AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_DEFAULT_REGION", "AWS_SESSION_TOKEN"), data_source = "s3")
flyio_set_bucket("atlanhq-flyio", data_source = "s3")

# Listing the files in GCS
list_files(path = "test", pattern = "*csv")

# Saving mtcars to all the data sources using default function write.csv
export_table(mtcars, "~/Downloads/mtcars.csv", data_source = "local")
export_table(mtcars, "test/mtcars.csv") # saving to GCS, need not mention as set globally
export_table(mtcars, "test/mtcars.csv", data_source = "s3")

# Check if the file written exists in GCS
file_exists("test/mtcars.csv")

# Read the file from GCS using readr library
mtcars <- import_table("test/mtcars.csv", FUN = readr::read_csv)

References



Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].