library(tidycensus)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(scales)
##
## Attaching package: 'scales'
##
## The following object is masked from 'package:purrr':
##
## discard
##
## The following object is masked from 'package:readr':
##
## col_factor
The guiding research question for this report is how has renter housing affordability changed across Washington state counties over the last decade. My goal is to better understand how renting affordability has changed over time. Rent affordability affects financial stability and overall well-being. Identifying trends is important for communities across the state.
The data used for this report is the American Community Survey (ACS) 5-year estimates (2014-2023), collected by the U.S. Census Bureau. The data is publicly available at data.census.gov.
The packages used while working with the data include tidyverse, tidycensus, and scales. Rent burden was calculated by multiplying the median rent by 12 and then dividing by median income. I am visualizing the 10 counties with the highest change in rent burden comparing the 5 year estimates from 2010-2014 to 2019-2023.
years <- 2014:2023
vars <- c(
median_rent = "B25064_001",
median_income = "B19013_001",
median_value = "B25077_001",
renter_cb = "S2503_C01_023",
owner_cb_mortgage = "S2503_C02_023",
owner_cb_nomortgage = "S2503_C03_023"
)
county_data <- map_df(years, function(yr) {
get_acs(
geography = "county",
variables = vars,
year = yr,
survey = "acs5",
output = "wide",
cache_table = TRUE
) %>%
transmute(
GEOID,
county = sub(",.*$", "", NAME),
state = sub("^.*,\\s*", "", NAME),
year = yr,
median_rent = median_rentE,
median_income = median_incomeE,
renter_cb = renter_cbE,
owner_cb_mortgage = owner_cb_mortgageE,
owner_cb_nomortgage = owner_cb_nomortgageE
)
})
## Getting data from the 2010-2014 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2011-2015 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2012-2016 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2013-2017 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2014-2018 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2015-2019 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2016-2020 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2017-2021 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2018-2022 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
## Getting data from the 2019-2023 5-year ACS
## Fetching data by table type ("B/C", "S", "DP") and combining the result.
county_data <- county_data %>%
filter(state == "Washington")
county_data <- county_data %>%
mutate(rent_burden = (median_rent * 12) / median_income)
rank_df <- county_data %>%
filter(year %in% c(2014, 2023)) %>%
select(county, state, year, rent_burden) %>%
pivot_wider(
names_from = year,
values_from = rent_burden,
names_prefix = "yr_"
) %>%
drop_na(yr_2014, yr_2023) %>%
mutate(change = yr_2023 - yr_2014) %>%
arrange(desc(change)) %>%
slice_head(n = 10)
I learned that a remote county with low population had significantly higher incraese in rent burden than any other Washington county. Highly populated counties like King, Snohomish, and Pierce were also in the top 10 greatest increase in rent burden. My findings are that most Washington residents faced an increase in rent burden with the three most populated counties all having an over 1% increase and some less populated counties faced significantly worse increase in rent burden than the rest of the state.
ggplot(rank_df,
aes(x = reorder(county, change),
y = change,
fill = county)) +
geom_col() +
geom_text(
aes(label = paste0(round(change, 1), "%")),
hjust = 1.05,
color = "white",
size = 3.5
) +
coord_flip() +
scale_y_continuous(labels = percent_format(accuracy = 1)) +
labs(
title = "Top 10 Counties with Largest Increase in Rent Burden 2010-2014 Average vs. 2019-2023 Average)",
x = "County",
y = "Increase in Rent Burden (percentage points)"
) +
theme_minimal(base_size = 14) +
theme(legend.position = "none")
Cost of rent is increasing faster than income across Washington state. Policy makers should be aware of the rising financial pressure from rent becoming harder to afford over time. Wahkiakum County had significantly higher increase in rent burden over time than any other county in Washington. Further research should be conducted to determine why that is and what can be done to help the residents of the county to slow the increase. A potential limitation of this report is that the data is estimates based on a survery and might not be completely accurate.