get_suspensions: Wrapper around 'deanslist_api' to pull suspension data for...

Description Usage Arguments Value

Description

This function wraps deanslist_api to pull the suspenions endpoint (i.e., deanlist_api(endpoint = 'suspensions', ...). If you don't explicitly pass the key_list paramater a named list, the function will attempt use Sys.getenv to gather keys from environment variables. These variables can be added to a .Renviron file that is source on startup or you can you set them using Sys.setenv. In either case, the function looks for variables that begin with DLAKEY_. So for Langley High School you might set a key with the variable name DL_KEY_LHS = 'super_secret_key'.

If multiple keys are found (or passed as a named list to the key_list argument), then a list of data frames will be returned. The slot in the list for each data frame is named after the key used to retrieve it.

Usage

1
get_suspensions(key_list, ...)

Arguments

key_list

either a named list or named character vector of DeansLists API keys for each school to accdess suspesions data for your school(s). Alternatively you can add keys to .Renviron variables, which must start with DL_KEY_ in order to be recognized.

...

parameteres like domain passed on onto deanslist_api

Value

a data.frame or list of data.frames (if multiple keys passed) with DeansList suspension data


chrishaid/deanslistr documentation built on May 13, 2019, 6:53 p.m.