tarpan2_get_variables_weighted: tarpan2_get_variables_weighted

Description Usage Arguments Value

Description

Gets variable data for specified variable(s) from specified table and applies a weighted average on the variable "val" using the the 'group_by' input

Usage

1
2
3
4
tarpan2_get_variables_weighted(con = NULL, variable, variables = NULL,
  model, schema = "public", where_clause, group_by = NULL,
  weight = "branch_book", weight_by = NULL, bc_method = NULL,
  data_var = NULL)

Arguments

con

A connection created by make_tarpan2_connection

variables

character - the variable(s) to fetch data for

schema

character - one or more table names

where_clause

A where clause to append to the query

group_by

Any 'specified_variables' to group results by, typically grouped by a time or location variable

weight

Name of column the 'project_tbl' that is to be used to weight the results, typically "branch_book". Must be used in combination with 'weight_by'

weight_by

Name of column from 'project_tbl' that is to be used to group the weights, typically a spatial grouping, such as "sub_iso".

Value

A dataframe with the specified variables as columns


GlobalParametrics/taRpan_readonly documentation built on May 13, 2019, 11:23 a.m.