get_requests: artlookR reqeusts data

View source: R/get_requests.R

get_requestsR Documentation

artlookR reqeusts data

Description

The requests table in artlookR stores information about resources (i.e., resourceable_types) that have been requested by schools. It's parallel to the get_allocations function but in this case since requests can only be made by schools, there is no parallel to the allocateable_type that is used in that function. There are also fewer resourceable_types available than is the case in that other function.

Usage

get_requests(

    comm_name = NULL

    type_of_resource = c("Discipline","ProgramType","ResourceType","SubDiscipline")

    table_of_resource = c("disciplines","program_types","resource_types","sub_disciplines")

)

Arguments

comm_name

The community name as recognized by artlookR

type_of_resource

The resourceable_type to filter the requests table by. In other words, what type of resource is being provided to the identified school_org_prog_part?

table_of_resource

The meta-data table to which the resourceable_type must be connected to make sense of it. In other words, the table_of_resource must correspond to the type_of_resource or the description of the resourceable_type will be wrong.

The contents of these meta-data tables can be separately checked with a call to an artlookR meta-data function that starts with meta_() (e.g., meta_approaches). Whether they are stored in the public schema or in community-specific schema impacts the call to the meta-data function, but not the call to the table itself in this get_requests function.

  • Public schema: table_of_resource <-> type_of_resource (meta-data function):

    • disciplines <-> Discipline (meta_disc(...)) - NOTE this is only available in Chicago's schema because it became obsolete before launching in other communities.

    • program_types <-> ProgramType (meta_prog(...))

    • sub_disciplines <-> SubDiscipline (meta_subdisc(...))

  • Community schema: table_of_resource <-> type_of_resource (meta-data function):

    • resource_types <-> ResourceType (meta_resource(comm_name))

Details

  • You will need to run the connection.R script and create a connection object named myconn for this script to run.

Value

A tibble / data frame with the following columns:

  • resourceable_type: should only be the value provided in type_of_resource

  • resourceable_id: the artlookR ID for the resource

  • school_year_id: artlookR school year in which the resource was allocated

  • tag: where applicable (e.g., SubDiscipline in Schools can be tagged as in_school, out_of_school, or both)

  • other_text: where applicable

  • name: the text name (level) of the resource

Examples

get_requests("chicago", "ProgramType", "program_types")
get_requests("houston", "SubDiscipline", "sub_disciplines")

# does not work because LeadershipCharacteristics are not requestable by Schools
get_requests("jacksonville", "LeadershipCharacteristics", "leadership_characteristics")

Ingenuity-Inc/artlookR documentation built on May 18, 2022, 12:33 a.m.