Skip to contents

This function returns a data frame about population from State Cancer Profiles.

Usage

demo_population(area, areatype, population, race = NULL, sex = NULL)

Arguments

area

A state/territory abbreviation or USA.

areatype

One of the following values:

  • "county"

  • "hsa" (Health Service Area)

  • "state".

population

One of the following values:

  • "age under 18"

  • "age 18-39"

  • "age 40-64"

  • "ages 40 and over"

  • "ages 50 and over"

  • "ages 60 and over"

  • "american indian/alaska native"

  • "asian/pacific islander"

  • "black"

  • "foreign born"

  • "hispanic"

  • "non-hispanic (origin recode)"

  • "white"

  • "males"

  • "females".

race

One of the following values:

  • "American Indian/Alaska Native"

  • "Asian/Pacific Islander"

  • "Black"

  • "Hispanic"

  • "White (includes Hispanic)"

  • "White non-Hispanic"

  • "Hispanic (Any Race)".

sex

One of the following values:

  • "both sexes"

  • "male"

  • "female".

Value

A data frame with the following columns: Area Type, Area Code, Percent, Households, Rank.

Examples

if (FALSE) {
demo_population(
  area = "WA",
  areatype = "county",
  population = "males",
  race = "all races (includes hispanic)"
)

demo_population(
  area = "dc",
  areatype = "hsa",
  population = "foreign born",
  race = "black",
  sex = "females"
)

demo_population(
  area = "usa",
  areatype = "state",
  population = "foreign born",
  race = "hispanic (any race)",
  sex = "females"
)
}