Description Usage Arguments Value Examples
View source: R/count_household_income_by_race.R
Return the householder count per income bracket and per race group for the given the geographical names (i.e., zip codes, state codes, state names, county names) and the observation year period.
1 2 3 4 5 6 7 | count_household_income_by_race(
geo_names,
location_type = c(NA, "zip", "county", "state"),
start_year = 2011,
end_year = 2018,
year = NA
)
|
geo_names |
required, vector of string(s) of geographical names. |
location_type |
optional, string indicating the location type of the geographical names. NA by default. |
start_year |
optional, integer indicating the start year of observation. 2011 by default. |
end_year |
optional, integer indicating the end year of observation. 2018 by default. |
year |
optional, integer indicating a single year of observation. This parameter overrides the start_year and end_year parameters when it is not NA, such that start_year=year and end_year=year. NA by default. |
A named list with each list item is a data frame containing the household income observations of each region per income bracket. The data frame is identified by the observation year and race group.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | zips <- c("94035","94039","94040","94041","94042","94043")
# Count the householders per income and race group in the specified ZIP codes
count_household_income_by_race(zips)
# Count the householders from 2012 to 2015
count_household_income_by_race(zips, start_year=2012, end_year=2015)
# Count the householders in 2012
count_household_income_by_race(zips, year=2012)
# Count the householders in the state of California
count_household_income_by_race(c("California")) # State name
count_household_income_by_race(c("CA")) # State code
count_household_income_by_race(c("06")) # 2-digit state FIPS code
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.