MyNixOS website logo
Description

'Ready Signal' API Wrapper.

A simple way to interact with the 'Ready Signal' API without leaving your 'R' environment. Discover features, manage signals, and retrieve data easily. View the full API documentation at <https://readysignal.com/ready-signal-api-documentation/>.

Ready Signal API - R

R wrapper for the Ready Signal API: http://app.readysignal.com

Please direct all questions and/or recommendations to [email protected]


Installation

# install from CRAN
install.packages("readysignal")

# or install from GitHub
library(devtools)
devtools::install_github("rxa-io/readysignal-r")

Usage

Your access token and signal ID can be found on your "Manage Signal" page within the Output information

The signal ID is also visible within the URL of the "Manage Signal" page:

https://app.readysignal.com/signal/SIGNAL_ID/manage

Setup

library(readysignal)

access_token <- "YOUR_ACCESS_TOKEN"
signal_id <- 123  # your signal ID here

Available Functions

Use the help() function in the R shell for details

# view all functions...
help(package = readysignal)

# ...or view a single help page
help(signal_to_csv)

Examples

library(readysignal)

# using an environment variable is optional but useful
token <- Sys.getenv("MY_TOKEN")

# grab list of signals
signals <- list_signals(token)

# find a signal ID
signal_id <- signals$id[1]

# grab the signal details
details <- get_signal_details(token, signal_id)
print(details$name)

# grab the signal data as a dataframe...
signal_df <- get_signal(token, signal_id)
print(dim(signal_df))

# ...or save it directly as a CSV
signal_to_csv(token, signal_id, 'my_signal.csv')

# create a new signal with the AutoDiscovery feature
# from a dataframe. When geo-grain=Country, columns
# MUST be c("Date", "Value"). When geo-grain=State,
# columns MUST be c("Date", "Value", "State")
df <- data.frame(
    Date=c("2022-01-01", "2022-01-02", "2022-01-03"), 
    Value=c(351, 465, 712)
)
auto_discover(token, geo_grain="Country", date_grain="Day", df=df)

# use AutoDiscovery with a file upload, this time we'll
# use a State geo_grain. The file needs the same columns
# as described above
system("cat states.csv") # Date,State,Value
                         # 2020-03-01,TN,416000
                         # 2020-03-01,KY,373000
                         #        ...
resp <- auto_discover(token, geo_grain="State", date_grain="Month", filename="states.csv")

# delete a signal (in this case, the one we just created)
delete_signal(token, resp$signal_id)
Metadata

Version

0.0.9

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows