clean_allocations: artlookR allocations data cleaning

View source: R/clean_allocations.R

clean_allocationsR Documentation

artlookR allocations data cleaning

Description

The allocations table in artlookR stores information about resources (i.e., resourceable_types) that have been allocated to schools, organizations, programs, partnerships, and profiles (i.e., allocateable_types).

Usage

clean_allocations(

    comm_name = NULL

    school_org_prog_part = c("Organization", "Partnership", "Profile", "Program", "School")

    type_of_resource = c("Approach","Discipline","EngagementType","FinancialAssistanceType","FundingType","Governance",
    "IdentityFrequency","IntegrationType","LeadershipCharacteristic","Obstacle","OutcomeType","ProgramType","ScheduleType",
    "SpaceType","Standard","SubDiscipline")

    table_of_resource = c("approaches","disciplines","engagement_types","financial_assistance_types","funding_types",
    "governances","identity_frequencies","integration_types","leadership_characteristics","obstacles","outcome_types",
    "program_types","schedule_types","space_types","standards","sub_disciplines")

)

Arguments

comm_name

The community name as recognized by artlookR

school_org_prog_part

The allocateable_type to filter the allocations table by. In other words, what type of entity should the data you download apply to?

type_of_resource

The resourceable_type to filter the allocations 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_allocations function.

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

    • disciplines <-> Discipline (meta_disc(...))

    • engagement_types <-> EngagementType (meta_engage(...))

    • integration_types <-> IntegrationType (meta_integration(...))

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

    • schedule_types <-> ScheduleType (meta_schedule(...))

    • space_types <-> SpaceType (meta_space(...))

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

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

    • approaches <-> Approach (meta_approaches(comm_name))

    • financial_assistance_types <-> FinancialAssistanceType (meta_financial_assistance_types(comm_name))

    • funding_types <-> FundingType (meta_funding(comm_name))

    • governances <-> Governance (meta_governances(comm_name))

    • identity_frequencies <-> IdentityFrequency (meta_identity_frequencies(comm_name))

    • leadership_characteristics <-> LeadershipCharacteristic (meta_leadership_characteristics(comm_name))

    • obstacles <-> Obstacle (meta_obstacles(comm_name))

    • outcome_types <-> OutcomeType (meta_outcome(comm_name))

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

    • standards <-> Standard (meta_standards(comm_name))

Details

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

  • There is a variable in the allocations table called focus, which in years 2018-19 and earlier used to indicate the focus area for a partner's programs. This variable is excluded as an output from this data pull because it became obsolete in 2019-20. For data prior to 2019-20, a separate data pull must be run to access the data stored in the focus variable. There may be some data stored in this field even after 2019-20 because it was carried over as part of a partner copying a program from a prior year where there was info in the field. In such cases, the data in this field should not be used.

Value

A tibble / data frame with "cleaned" data from the allocations table. By clean, we mean data that is more suitable for end-users. The exact data included will vary from one table to the next.

Examples

clean_allocations("chicago", "Program", "ProgramType", "program_types")
clean_allocations("houston", "Organization", "LeadershipCharacteristic", "leadership_characteristics")

# does not work because ProgramTypes are not allocated to Schools
clean_allocations("chicago", "School", "ProgramType", "program_types")

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