| house | R Documentation |
Include household characteristics categorical and numeric variables.
house
A data frame with 129695 rows (each row is a household) and 9 columns
Household identifier. Use this variable to join the house dataset and the person dataset as well as join the house dataset and the trip dataset.
2010 Census division classification for the respondent's home address.
Number of drivers in household.
Count of household members.
Count of household vehicles.
Life Cycle classification for the household, derived by attributes pertaining to age, relationship, and work status.
Count of adult household members at least 18 years old.
Number of workers in household.
Count of persons with an age between 0 and 4 in household.
if (require("tidyverse")) {
# Filtered to households with at least one driver
house_with_drivers <- house |>
filter(number_drivers > 0)
# Filtered to households with at least one vehicle
house_with_vehicles <- house_with_drivers |>
filter(number_vehicles > 0)
# Plot household vehicles by number of drivers
ggplot(data = house_with_vehicles,
aes(x = number_drivers,
y = number_vehicles)) +
geom_jitter(alpha = 0.08, width = 0.15, height = 0.15) +
geom_smooth(method = lm, se = FALSE, formula = y ~ x, color = "blue") +
labs(title = "Household Vehicles versus Number of Drivers",
x = "Number of Drivers in Household",
y = "Number of Household Vehicles") +
theme_bw()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.