census: Random sample of 2000 U.S. Census Data

Description Usage Format Source Examples

Description

A random sample of 500 observations from the 2000 U.S. Census Data.

Usage

1

Format

A data frame with 500 observations on the following 8 variables.

census_year

Census Year.

state_fips_code

Name of state.

total_family_income

Total family income (in U.S. dollars).

age

Age.

sex

Sex with levels Female and Male.

race_general

Race with levels American Indian or Alaska Native, Black, Chinese, Japanese, Other Asian or Pacific Islander, Two major races, White and Other.

marital_status

Marital status with levels Divorced, Married/spouse absent, Married/spouse present, Never married/single, Separated and Widowed.

total_personal_income

Total personal income (in U.S. dollars).

Source

http://factfinder.census.gov

Examples

1
2
3
4
5
6
7
library(dplyr)
library(ggplot2)

census %>%
  filter(total_family_income > 0) %>%
  ggplot(aes(x = total_family_income)) +
    geom_histogram(binwidth = 25000)

tessington/qsci381 documentation built on Sept. 26, 2020, 12:40 p.m.