calculate_percentage_field: Calculate a percentage from ACS fields

View source: R/calculate_percentage_field.R

calculate_percentage_fieldR Documentation

Calculate a percentage from ACS fields

Description

Calculate a percentage from ACS fields

Usage

calculate_percentage_field(
  con,
  variable_name,
  numerator_cols,
  denominator_cols,
  inverse_pct,
  geography,
  keys,
  params
)

Arguments

con

A database connection

variable_name

Name of the variable to derive

numerator_cols

Variable or variables to divide. Multiple values will be summed.

denominator_cols

Variable or variables to divide by. Multiple values will be summed.

inverse_pct

If TRUE, result will be 1 - (sum(numerator_cols)/sum(denominator_cols))

geography

Geographic level of data

keys

Named list with the structure ‘list(geoid = X, year = ’year')', where X is variable name for the GEOID of the geography

params

List of params

Value

A data frame


ruralinnovation/acsR documentation built on March 23, 2022, 12:09 a.m.