library(tidyverse)
library(plotly)
library(scales)
library(colorspace)
library(ggrepel)
theme_set(theme_minimal())
AE 19: Increase in cost-burdened households in the United States
We have already seen this semester that the cost of housing in the United States has been rising for several decades. A household is considered cost-burdened if they spend more than 30% of their income on housing costs.
In this application exercise we will explore trends in the percentage of cost-burdened rental households in the 10 largest metropolitan statistical areas (MSAs).1 The relevant data can be found in data/msa-renters-burden.csv
.
<- read_csv(file = "data/msa-renters-burden.csv")
renter_burden renter_burden
# A tibble: 110 × 4
year geoid name pct_burdened
<dbl> <dbl> <chr> <dbl>
1 2013 12060 Atlanta-Sandy Springs-Roswell, GA 0.500
2 2013 16980 Chicago-Naperville-Elgin, IL-IN 0.493
3 2013 19100 Dallas-Fort Worth-Arlington, TX 0.453
4 2013 26420 Houston-Pasadena-The Woodlands, TX 0.460
5 2013 31080 Los Angeles-Long Beach-Anaheim, CA 0.561
6 2013 33100 Miami-Fort Lauderdale-West Palm Beach, FL 0.595
7 2013 35620 New York-Newark-Jersey City, NY-NJ 0.511
8 2013 37980 Philadelphia-Camden-Wilmington, PA-NJ-DE-MD 0.503
9 2013 38060 Phoenix-Mesa-Chandler, AZ 0.477
10 2013 47900 Washington-Arlington-Alexandria, DC-VA-MD-WV 0.466
# ℹ 100 more rows
pct_burdened
reports the percentage of renter-occupied housing units that spend 30%+ of their household income on gross rent.2
Communicating trends with a static visualization
Your turn: While Americans face rising housing costs, the percentage of cost-burdened households has not increased uniformly across the country. Design and implement a static visualization to communicate the trends for these 10 MSAs. Ensure it can reasonably be used to identify trends specific to each MSA.
# add code here
Communicating trends with an interactive visualization
Your turn: Design and implement an interactive visualization to communicate the trends for these 10 MSAs. Ensure it can reasonably be used to identify trends specific to each MSA. Leverage interactive components to reduce clutter in the visualization and effectively utilize interactivity.
- Customizing the tooltip to provide better-formatted information
highlight()
trend lines to draw attention to selected MSA- Implement the plot purely using
plot_ly()
# add code here
Footnotes
Based on population as of 2023.↩︎
Specifically Table B25070 from the American Community Survey.↩︎