ComeçarComece de graça

Getting simple feature geometry

tidycensus can obtain simple feature geometry for many geographies by adding the argument geometry = TRUE. In this exercise, you'll obtain a dataset of median housing values for owner-occupied units by Census tract in Orange County, California with simple feature geometry included.

Este exercício faz parte do curso

Analyzing US Census Data in R

Ver curso

Instruções do exercício

  • Use the get_acs() function to get a dataset of median owner-occupied housing value by Census tract.
  • Set geometry = TRUE to request Census tract simple feature geometry.
  • Plot the estimate to view a map of the data.

Exercício interativo prático

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

library(tidycensus)
library(tidyverse)
library(sf)

# Get dataset with geometry set to TRUE
orange_value <- ___(___ = "tract", state = "CA", 
                    county = "Orange", 
                    ___ = "B25077_001", 
                    ___ = TRUE)

# Plot the estimate to view a map of the data
___(orange_value["estimate"])
Editar e executar o código