# Load library
library(tidyverse)
# Import data
house <- read_csv(file = "https://raw.githubusercontent.com/zief0002/epsy-5261/main/data/housing-and-income.csv")
# View data
househousing-and-income.csv
The data in housing-and-income.csv include data on house prices and household incomes for cities in the United States. The data, collated by Construction Coverage, come from the U.S. Census Bureau’s American Community Survey and Zillow’s Zillow Home Value Index.
The attributes included in the data are:
city: City namestate: Statehouse_income_ratio: The ratio of median house cost to median household incomemedian_house_price: Median listing price of the house (in thousands of dollars)median_income: Median household income (in thousands of dollars)house_change: 5-year change in the median house price (as a percentage)greater_30: Percentage of mortgage holders who spend more than 30% of their household income on housing costs annually
Preview
# A tibble: 42 × 7
city state house_income_ratio median_house_price median_income
<chr> <chr> <dbl> <dbl> <dbl>
1 Bellevue WA 9.9 1257 127
2 Buffalo NY 4.8 195 41
3 Cambridge MA 7.9 946 120
4 Cedar Rapids IA 2.9 166 57
5 Centennial CO 5.6 622 111
6 Chesapeake VA 4.3 337 78
7 Chula Vista CA 8.4 738 88
8 Cleveland OH 3 97 32
9 Columbia MD 4.1 430 104
10 Dallas TX 5.1 282 55
house_change greater_30
<dbl> <dbl>
1 65.4 NA
2 87.8 23
3 30.9 NA
4 27.6 18.5
5 48.3 NA
6 30.5 28.1
7 59.4 41
8 98.5 30.1
9 24.4 NA
10 60.8 32.1
# ℹ 32 more rows