get_clusters: Download clusters from Go.Data (version agnostic)

View source: R/get_clusters.R

get_clustersR Documentation

Download clusters from Go.Data (version agnostic)

Description

A function to retrieve the cluster data for a specific outbreak_id. This function relies on the ⁠/outbreaks/{id}/clusters⁠ API endpoint. Records are imported in iterative batches and then appended together into a single data frame.

Usage

get_clusters(url, username, password, outbreak_id, batch_size = 50000)

Arguments

url

Insert the base URL for your instance of Go.Data here. Don't forget the forward slash "/" at end!

username

The email address for your Go.Data login.

password

The password for your Go.Data login

outbreak_id

The id number for the outbreak for which you want to download clusters.

batch_size

For large datasets, specify the number of records to retrieve in each iteration.

Details

This function works on all versions of Go.Data.

Value

Returns data frame.

Examples

## Not run: 
url <- "https://MyGoDataServer.com/"
username <- "myemail@email.com"
password <- "mypassword"
outbreak_id <- "3b5554d7-2c19-41d0-b9af-475ad25a382b"

clusters <- get_clusters(
  url = url,
  username = username,
  password = password,
  outbreak_id = outbreak_id
)

## End(Not run)

WorldHealthOrganization/godataR documentation built on May 21, 2023, 11:30 a.m.