View source: R/calculate_percentage_field.R
calculate_percentage_field | R Documentation |
Calculate a percentage from ACS fields
calculate_percentage_field( con, variable_name, numerator_cols, denominator_cols, inverse_pct, geography, keys, params )
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 |
A data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.