Links
Comment on page

Getting started

Installation

The easiest way to get started with the redivis-r library is via a Redivis notebook, which comes with the latest version pre-installed. Additionally, authentication is automatically handled within the Redivis notebook environment.
If you'd like to use the client in another environment, you can install the redivis library from Github. Use devtools to install the latest version from the main branch:
devtools::install_github("redivis/redivis-r", ref="main")

Authentication

If you are using this library within a Redivis notebook, you'll automatically be authenticated. You can ignore this section.
In order to authenticate with your Redivis account, you must first generate an API Token.
This API token must then be set as the REDIVIS_API_TOKEN environment variable before running your script. You can set the variable for your current session by running the following in your terminal:
export REDIVIS_API_TOKEN=YOUR_TOKEN
# or, within R
Sys.setenv(REDIVIS_API_TOKEN = "your_api_token")

Example usage

data <- (
redivis::organization("Demo")
$dataset("CMS 2014 Medicare Data")
$table("Hospice providers")
$to_tibble(max_results=100)
)
print(data)
When referencing datasets, projects, and tables on Redivis, you should be familiar with the resource reference syntax.

Learn more