View source: R/build_getpop_query.R
build_getpop_query | R Documentation |
A helper function for building queries for get_pop
build_getpop_query(
con,
cols,
pop_table,
group_by,
group_geo_type,
select_geo_type,
ages,
years,
genders,
races,
...
)
con |
a database connection |
cols |
data.table A three column data.table that describes the colname and coltype and cat |
pop_table |
DBI::Id of the relevant database table |
group_by |
character vector of column types to group results by. Should use types passed in cols |
group_geo_type |
SQL defining how to handle geo type grouping (mostly for things computed on the fly from blocks) |
select_geo_type |
SQL defining how to select geo_id |
ages |
vector of the ages to subset by. Use "All" to not subset |
years |
vector of years to subset results. Use "All" to not subset |
genders |
vector of genders to subset by. Use "All" to not subset |
races |
Vector of races to subsey by. Use 'All' to not subset |
... |
other SQL commands specifying subsets |
This function does very little argument checking since it assumes its being run within get_population
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.