clarity_api | R Documentation |
Calls the Clarity Looker API HUD CSV Export (BETA) & LookML models to return to the HUD Export Items & other datasets on various time ranges via pre-constructed Looks. See ?call_data
for details on using all data methods.
Methods for calling Export items and all looks contained within specified folders are dynamically added on initialization.
Available HUD Export Items are
Affiliation
Assessment
AssessmentQuestions
AssessmentResults
Client
CurrentLivingSituation
Disabilities
EmploymentEducation
Enrollment
EnrollmentCoC
Event
Exit
Export
Funder
HealthAndDV
IncomeBenefits
Inventory
Organization
Project
ProjectCoC
Services
User
YouthEducationStatus
folders
{lookr}
folder data stored here
new()
initialize the Looker API connection given the path to the ini configuration file.
clarity_api$new( configFile, export_folder = 9862, daily_folder = 9711, look_folders = 9874, dirs = list(export = "inst/extdata/export", public = "inst/extdata/public", spm = "inst/extdata/spm", extras = "inst/extdata/extras") )
configFile
(character)
Path to the Looker .ini configuration file. Only the directory path is needed if the file is entitled Looker.ini
export_folder
(numeric)
ID of the folder containing Export looks.
daily_folder
(numeric)
ID of the folder containing Export look data added or modified in the past 24 hours (12a-12p)
look_folders
(character/numeric)
list of names or numeric IDs of the additional folders containing relevant looks. Numeric IDs are recommended.
dirs
(named list)
of default directory paths for where to store the feather files for the following data types:
export
The HUD Export items Default: data/export
public
The public items Default: data/public
spm
The SPM items Default: data/spm
extras
The HUD Extras (custom items) Default: data/extras
This is optional and the path can be provided to individual methods as needed.
get_export()
Pull all Export items with associate Looks
clarity_api$get_export( path = self$dirs$export, .write = TRUE, skip = c("Assessment", "AssessmentQuestions", "AssessmentResults", "YouthEducationStatus") )
path
(character)
The directory path from which to load stored data
.write
(logical)
Whether to write data as feather file to path
skip
(character)
of Look titles to skip
get_folder_looks()
Pull all Looks associated with a folder
clarity_api$get_folder_looks( folder, details = FALSE, .write = FALSE, path, skip = c("Client_COVID_extras", "Client_Doses_extras") )
folder
(folder)
Folder object from folders
field
details
(logical)
Whether to return Look info for the looks in the specified folder
.write
(logical)
Whether to write the folder looks to disk
path
(character)
If .write = TRUE
, where to write the files too.
skip
(character)
vector of the names of looks in the folder to skip
(list)
of specified looks in folder
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.