get_flow_data: Get data from each run (flow)

get_flow_dataR Documentation

Get data from each run (flow)

Description

Call RapidPro data from each run or flow.

Usage

get_flow_data(
  uuid_data = get_rapidpro_uuid_names(),
  flow_name = NULL,
  rapidpro_site = get_rapidpro_site(),
  token = get_rapidpro_key(),
  by = c("flow_name", "id_name"),
  id_names = NULL,
  flatten = FALSE,
  checks = FALSE,
  return_all = FALSE,
  flow_type = "none",
  flow_handle_type = NULL,
  flow_handle_type_sub = "category",
  include_archived_data = FALSE,
  get_by = "gotit",
  data_from_archived = NULL,
  read_archived_data_from = NULL,
  created_on = FALSE,
  date_from = NULL,
  date_to = NULL,
  format_date = "%Y-%m-%d",
  tzone_date = "UTC"
)

Arguments

uuid_data

A string containing UUID values. See set_rapidpro_uuid_names() to set this value.

flow_name

A string containing flow names to call data from if ⁠by = "flow_name⁠.

rapidpro_site

A string containing the rapidpro website to call the data from. See set_rapidpro_site() to amend the website.

token

A string containing the token to call the data. See set_rapidpro_key() to amend the token.

by

A string taking either "flow_name" or "id_name" to determine whether to filter the flow data by a given flow name, or to give all flows for a given id.

id_names

A string containing ID names to call data from if ⁠by = "id_name⁠.

flatten

Default FALSE. A boolean denoting whether the data should be flattened into a two-dimensional tabular structure.

checks

Default FALSE. A boolean whether to check and update the data if it is not found.

return_all

Default FALSE. A boolean whether to return a specific part of the string, or all of the data.

flow_type

Only if return_all = FALSE. Default none. Takes values "other".

flow_handle_type

Default NULL. If flow_type is other, this is the value of the flow under ⁠$value⁠ to get the response for.

flow_handle_type_sub

Default NULL. If flow_type is other, this is the group within flow_handle_type to handle.

include_archived_data

Default FALSE. A boolean denoting whether to include archived data or not.

get_by

A string denoting how to access the archived data (if include_archived_data is TRUE). Options are "read_from_RDS", "gotit". The first denotes that the data is read from an RDS file (given in read_archived_data_from), the latter that the data is stored and will be read in directly (see data_from_archived).

data_from_archived

If get_by = "gotit", this is the archived data.

read_archived_data_from

If get_by = "read_from_RDS", this is the archived data.

created_on

Parameter for flow_data.

date_from

character string giving the date to filter the data from.

date_to

character string giving the date to filter the data to.

format_date

from ⁠as.POSIX*⁠ function: character string giving a date-time format as used by strptime.

tzone_date

from ⁠as.POSIX*⁠ function: time zone specification to be used for the conversion, if one is required. System-specific (see time zones), but "" is the current time zone, and "GMT" is UTC (Universal Time, Coordinated). Invalid values are most commonly treated as UTC, on some platforms with a warning.

Value

List separated by each flow_name provided. Each element in the list contains a data frame for each flow_name provided.


lilyclements/Rapidreadr documentation built on April 17, 2025, 6:10 p.m.