ComeçarComece de graça

Download and view a table of data from the ACS

Variables in the decennial Census and American Community Survey are organized into tables, within which they share a common prefix. Commonly, analysts will want to work with all variables in a given table, as these variables might represent different aspects of a common characteristic (such as race or income levels). To request data for an entire table in tidycensus, users can specify a table argument with the table prefix, and optionally cache a dataset of table codes to speed up table searching in future requests. In this exercise, you'll acquire a table of variables representing different income bands, then filter out the denominator rows.

Este exercício faz parte do curso

Analyzing US Census Data in R

Ver curso

Instruções do exercício

  • For counties in Washington, download table "B19001" from the ACS using the table argument.
  • Check the variables you've acquired using the head() function.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

library(tidycensus)
library(tidyverse)

# Download table "B19001"
wa_income <- ___(___ = "county", 
                 state = "WA", 
                 table = ___)

# Check out the first few rows of wa_income
___(wa_income)
Editar e executar o código