This report analyzes the estimated 2025 rent costs for ZIP codes in the greater Nashville area for various bedroom sizes.
Nashville FMR, by size and ZIP | |||||||
ZIP | Studio | BR1 | BR2 | BR3 | BR4 | ZIP_Average | Rent_Category |
---|---|---|---|---|---|---|---|
37069 | 2380 | 2470 | 2740 | 3460 | 4260 | 3062 | Above average |
37135 | 2380 | 2470 | 2740 | 3460 | 4260 | 3062 | Above average |
37220 | 2380 | 2470 | 2740 | 3460 | 4260 | 3062 | Above average |
37179 | 2350 | 2440 | 2700 | 3410 | 4200 | 3020 | Above average |
37201 | 2260 | 2350 | 2600 | 3280 | 4040 | 2906 | Above average |
37027 | 2220 | 2300 | 2550 | 3220 | 3960 | 2850 | Above average |
37219 | 2170 | 2260 | 2500 | 3160 | 3890 | 2796 | Above average |
37065 | 2150 | 2230 | 2470 | 3120 | 3840 | 2762 | Above average |
37068 | 2150 | 2230 | 2470 | 3120 | 3840 | 2762 | Above average |
37067 | 2120 | 2200 | 2440 | 3080 | 3790 | 2726 | Above average |
37215 | 2080 | 2160 | 2390 | 3020 | 3720 | 2674 | Above average |
37205 | 2070 | 2150 | 2380 | 3010 | 3700 | 2662 | Above average |
37014 | 2070 | 2150 | 2380 | 3000 | 3700 | 2660 | Above average |
37204 | 2040 | 2120 | 2350 | 2970 | 3650 | 2626 | Above average |
37122 | 2030 | 2100 | 2330 | 2940 | 3620 | 2604 | Above average |
37064 | 1980 | 2060 | 2280 | 2880 | 3540 | 2548 | Above average |
37221 | 1950 | 2020 | 2240 | 2830 | 3480 | 2504 | Above average |
37037 | 1940 | 2010 | 2230 | 2820 | 3470 | 2494 | Above average |
37174 | 1840 | 1890 | 2220 | 2810 | 3230 | 2398 | Above average |
37086 | 1820 | 1890 | 2090 | 2640 | 3250 | 2338 | Above average |
37214 | 1780 | 1850 | 2050 | 2590 | 3190 | 2292 | Above average |
37153 | 1760 | 1830 | 2020 | 2560 | 3140 | 2262 | Above average |
37203 | 1740 | 1810 | 2000 | 2530 | 3110 | 2238 | Above average |
37046 | 1700 | 1770 | 2000 | 2550 | 3030 | 2210 | Above average |
37209 | 1700 | 1770 | 1960 | 2480 | 3050 | 2192 | Above average |
37013 | 1680 | 1740 | 1930 | 2440 | 3000 | 2158 | Above average |
37128 | 1680 | 1740 | 1930 | 2440 | 3000 | 2158 | Above average |
37212 | 1680 | 1740 | 1930 | 2440 | 3000 | 2158 | Above average |
37208 | 1670 | 1730 | 1920 | 2430 | 2980 | 2146 | Below average |
37213 | 1670 | 1740 | 1920 | 2420 | 2980 | 2146 | Below average |
37206 | 1640 | 1710 | 1890 | 2390 | 2940 | 2114 | Below average |
37216 | 1640 | 1710 | 1890 | 2390 | 2940 | 2114 | Below average |
37228 | 1640 | 1710 | 1890 | 2390 | 2940 | 2114 | Below average |
37011 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37024 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37062 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37070 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37116 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37129 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37202 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37222 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37224 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37229 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37232 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37236 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37238 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37240 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37243 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37246 | 1630 | 1690 | 1870 | 2360 | 2910 | 2092 | Below average |
37076 | 1570 | 1630 | 1810 | 2290 | 2810 | 2022 | Below average |
37138 | 1550 | 1610 | 1780 | 2250 | 2770 | 1992 | Below average |
37211 | 1550 | 1610 | 1780 | 2250 | 2770 | 1992 | Below average |
37217 | 1550 | 1610 | 1780 | 2250 | 2770 | 1992 | Below average |
37072 | 1520 | 1580 | 1750 | 2210 | 2720 | 1956 | Below average |
37089 | 1520 | 1580 | 1750 | 2210 | 2720 | 1956 | Below average |
37131 | 1520 | 1580 | 1750 | 2210 | 2720 | 1956 | Below average |
37133 | 1520 | 1580 | 1750 | 2210 | 2720 | 1956 | Below average |
37090 | 1500 | 1560 | 1730 | 2180 | 2680 | 1930 | Below average |
37060 | 1470 | 1540 | 1710 | 2170 | 2620 | 1902 | Below average |
37167 | 1450 | 1510 | 1670 | 2110 | 2600 | 1868 | Below average |
37115 | 1440 | 1500 | 1660 | 2100 | 2580 | 1856 | Below average |
37210 | 1430 | 1490 | 1650 | 2080 | 2560 | 1842 | Below average |
37127 | 1410 | 1460 | 1620 | 2050 | 2520 | 1812 | Below average |
37218 | 1410 | 1460 | 1620 | 2050 | 2520 | 1812 | Below average |
37143 | 1400 | 1450 | 1610 | 2030 | 2500 | 1798 | Below average |
37189 | 1370 | 1420 | 1570 | 1980 | 2440 | 1756 | Below average |
37085 | 1350 | 1410 | 1550 | 1960 | 2420 | 1738 | Below average |
37015 | 1330 | 1390 | 1540 | 1940 | 2390 | 1718 | Below average |
37130 | 1300 | 1350 | 1490 | 1880 | 2320 | 1668 | Below average |
37132 | 1300 | 1350 | 1490 | 1880 | 2320 | 1668 | Below average |
38476 | 1270 | 1310 | 1470 | 1860 | 2280 | 1638 | Below average |
37020 | 1270 | 1300 | 1460 | 1890 | 2240 | 1632 | Below average |
37207 | 1270 | 1320 | 1460 | 1840 | 2270 | 1632 | Below average |
37025 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
37080 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
37118 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
37149 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
37160 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
37180 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
38401 | 1270 | 1300 | 1460 | 1840 | 2240 | 1622 | Below average |
Two-bedroom stats, by rent category | ||||
Rent_Category | Count | Minimum | Average | Maximum |
---|---|---|---|---|
Above average | 28 | 1930 | 2309 | 2740 |
Below average | 52 | 1460 | 1713 | 1920 |
## [[1]]
## NULL
##
## [[2]]
## NULL
##
## [[3]]
## NULL
##
## [[4]]
## NULL
##
## [[5]]
## NULL
##
## [[6]]
## NULL
##
## [[7]]
## NULL
##
## [[8]]
## NULL
## [[1]]
## [1] "readxl" "gtExtras" "gt" "openxlsx" "lubridate" "forcats"
## [7] "stringr" "dplyr" "purrr" "readr" "tidyr" "tibble"
## [13] "ggplot2" "tidyverse" "stats" "graphics" "grDevices" "utils"
## [19] "datasets" "methods" "base"
##
## [[2]]
## [1] "readxl" "gtExtras" "gt" "openxlsx" "lubridate" "forcats"
## [7] "stringr" "dplyr" "purrr" "readr" "tidyr" "tibble"
## [13] "ggplot2" "tidyverse" "stats" "graphics" "grDevices" "utils"
## [19] "datasets" "methods" "base"
##
## [[3]]
## [1] "leafpop" "readxl" "gtExtras" "gt" "openxlsx" "lubridate"
## [7] "forcats" "stringr" "dplyr" "purrr" "readr" "tidyr"
## [13] "tibble" "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [19] "utils" "datasets" "methods" "base"
##
## [[4]]
## [1] "sf" "leafpop" "readxl" "gtExtras" "gt" "openxlsx"
## [7] "lubridate" "forcats" "stringr" "dplyr" "purrr" "readr"
## [13] "tidyr" "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [19] "grDevices" "utils" "datasets" "methods" "base"
##
## [[5]]
## [1] "mapview" "sf" "leafpop" "readxl" "gtExtras" "gt"
## [7] "openxlsx" "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [13] "readr" "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [19] "graphics" "grDevices" "utils" "datasets" "methods" "base"
##
## [[6]]
## [1] "RColorBrewer" "mapview" "sf" "leafpop" "readxl"
## [6] "gtExtras" "gt" "openxlsx" "lubridate" "forcats"
## [11] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [16] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [21] "grDevices" "utils" "datasets" "methods" "base"
##
## [[7]]
## [1] "tidycensus" "RColorBrewer" "mapview" "sf" "leafpop"
## [6] "readxl" "gtExtras" "gt" "openxlsx" "lubridate"
## [11] "forcats" "stringr" "dplyr" "purrr" "readr"
## [16] "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [21] "graphics" "grDevices" "utils" "datasets" "methods"
## [26] "base"
##
## [[8]]
## [1] "tidycensus" "RColorBrewer" "mapview" "sf" "leafpop"
## [6] "readxl" "gtExtras" "gt" "openxlsx" "lubridate"
## [11] "forcats" "stringr" "dplyr" "purrr" "readr"
## [16] "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [21] "graphics" "grDevices" "utils" "datasets" "methods"
## [26] "base"
## [1] "494018a70f114d4f76b10537730ccc9c7dbfe36b"
## Reading layer `cb_2020_us_zcta520_500k' from data source
## `C:\Users\brock\OneDrive\Documents\cb_2020_us_zcta520_500k.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 33791 features and 7 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -176.6967 ymin: -14.37374 xmax: 145.8304 ymax: 71.34122
## Geodetic CRS: NAD83
## [1] "Column Names in FMR_Nash_Map:"
## [1] "ZIP" "Studio" "BR1" "BR2"
## [5] "BR3" "BR4" "AFFGEOID20" "GEOID20"
## [9] "NAME20" "LSAD20" "ALAND20" "AWATER20"
## [13] "geometry" "GEOID" "NAME" "Rentals"
## [17] "Rentals_MOE" "Households" "Households_MOE" "ZIP_Average"
r echo=FALSE, message=FALSE, warning=FALSE
# Installing and loading required packages
if (!require("tidyverse"))
install.packages("tidyverse")
if (!require("openxlsx"))
install.packages("openxlsx")
if (!require("gtExtras"))
install.packages("gtExtras")
if (!require("readxl"))
install.packages("readxl")
library(tidyverse)
library(openxlsx)
library(gtExtras)
library(readxl)
# Reading data from:
# https://www.huduser.gov/portal/datasets/fmr/fmr2025/fy2025_safmrs.xlsx
download.file("https://www.huduser.gov/portal/datasets/fmr/fmr2025/fy2025_safmrs.xlsx", "rent.xlsx", mode = "wb")
FMR <- read_excel(path = "rent.xlsx", .name_repair = "universal")
# Making a list of Nashville-area ZIP codes
ZIPList <- c(
"37135", "37215", "37064", "37060", "37014", "37122", "37027", "37046", "37221", "37153",
"37210", "37202", "37024", "37218", "37062", "37179", "37025", "37206", "37065", "37214",
"37067", "37246", "37068", "37167", "37069", "37189", "37070", "37204", "37072", "37208",
"37076", "37212", "37080", "37216", "37085", "37020", "37086", "38476", "37089", "37160",
"37090", "37174", "37115", "37180", "37116", "37201", "37118", "37203", "37015", "37205",
"37127", "37207", "37128", "37209", "37129", "37211", "37130", "37213", "37220", "37037",
"37222", "37217", "37228", "37219", "37232", "37013", "37131", "37224", "37132", "37229",
"37133", "37236", "37238", "37240", "37243", "37138", "38401", "37143", "37011", "37149"
)
# Filtering for Nashville-area ZIP codes and selecting relevant columns
FMR_Nash <- FMR %>%
filter(ZIP.Code %in% ZIPList) %>%
select(ZIP.Code, SAFMR.0BR, SAFMR.1BR, SAFMR.2BR, SAFMR.3BR, SAFMR.4BR) %>%
distinct()
# Renaming the columns
colnames(FMR_Nash) <- c("ZIP", "Studio", "BR1", "BR2", "BR3", "BR4")
# Averaging estimates
FMR_Nash <- FMR_Nash %>%
mutate(ZIP_Average = (Studio + BR1 + BR2 + BR3 + BR4) / 5)
# Sorting in descending order by ZIP_Average
FMR_Nash <- FMR_Nash %>%
arrange(desc(ZIP_Average))
# Averaging ZIP_Average
Average_ZIP_Average <- mean(FMR_Nash$ZIP_Average, na.rm = TRUE)
# Categorizing by ZIP_Average
FMR_Nash <- FMR_Nash %>%
mutate(
Rent_Category = case_when(
ZIP_Average > Average_ZIP_Average ~ "Above average",
ZIP_Average == Average_ZIP_Average ~ "Average",
ZIP_Average < Average_ZIP_Average ~ "Below average",
.default = "Error"))
# Showing the data as a table
FMR_Nash_table <- gt(FMR_Nash) %>%
tab_header("Nashville FMR, by size and ZIP") %>%
cols_align(align = "left") %>%
gt_theme_538
FMR_Nash_table
# Grouping and summarizing
Summary_BR2 <- FMR_Nash %>%
group_by(Rent_Category) %>%
summarize(Count = n(),
Minimum = min(BR2, na.rm = TRUE),
Average = round(mean(BR2, na.rm = TRUE), 0),
Maximum = max(BR2, na.rm = TRUE))
# Making the table
Summary_BR2_table <- gt(Summary_BR2) %>%
tab_header("Two-bedroom stats, by rent category") %>%
cols_align(align = "left") %>%
gt_theme_538
# Showing the table
Summary_BR2_table
r echo=FALSE, message=FALSE, warning=FALSE
# Install and load required packages
packages <- c("tidyverse", "gtExtras", "leafpop", "sf", "mapview", "RColorBrewer", "tidycensus", "readxl")
install_if_missing <- function(p) {
if (!requireNamespace(p, quietly = TRUE)) install.packages(p)
}
lapply(packages, install_if_missing)
lapply(packages, library, character.only = TRUE)
# Set Census API key (use your own API key)
census_api_key("494018a70f114d4f76b10537730ccc9c7dbfe36b", install = TRUE, overwrite = TRUE)
# Fetching Census data for Nashville ZIP codes
Census_Data <- get_acs(
geography = "zcta",
variables = c("DP04_0047E", "DP04_0047M", "DP04_0045E", "DP04_0045M"),
year = 2023,
survey = "acs5",
output = "wide"
)
# Renaming columns (including MOE values)
Census_Data <- Census_Data %>%
rename(Rentals = DP04_0047E,
Rentals_MOE = DP04_0047M,
Households = DP04_0045E,
Households_MOE = DP04_0045M) %>%
mutate(ZIP = as.character(GEOID)) # Ensure ZIP is character type for merging
# Reading Fair Market Rent data from HUD (2025)
download.file("https://www.huduser.gov/portal/datasets/fmr/fmr2025/fy2025_safmrs.xlsx", "rent.xlsx", mode = "wb")
FMR <- read_xlsx(path = "rent.xlsx", .name_repair = "universal")
# Define list of Nashville-area ZIP codes
ZIPList <- c(
"37135", "37215", "37064", "37060", "37014", "37122", "37027", "37046", "37221", "37153",
"37210", "37202", "37024", "37218", "37062", "37179", "37025", "37206", "37065", "37214",
"37067", "37246", "37068", "37167", "37069", "37189", "37070", "37204", "37072", "37208",
"37076", "37212", "37080", "37216", "37085", "37020", "37086", "38476", "37089", "37160",
"37090", "37174", "37115", "37180", "37116", "37201", "37118", "37203", "37015", "37205",
"37127", "37207", "37128", "37209", "37129", "37211", "37130", "37213", "37220", "37037",
"37222", "37217", "37228", "37219", "37232", "37013", "37131", "37224", "37132", "37229",
"37133", "37236", "37238", "37240", "37243", "37138", "38401", "37143", "37011", "37149"
)
# Filter and select relevant columns for Nashville-area ZIP codes
FMR_Nash <- FMR %>%
filter(ZIP.Code %in% ZIPList) %>%
select(ZIP.Code, SAFMR.0BR, SAFMR.1BR, SAFMR.2BR, SAFMR.3BR, SAFMR.4BR) %>%
distinct()
# Renaming columns
colnames(FMR_Nash) <- c("ZIP", "Studio", "BR1", "BR2", "BR3", "BR4")
# Ensure ZIP is character for merging
FMR_Nash <- FMR_Nash %>%
mutate(ZIP = as.character(ZIP))
# Download and extract ZIP code shapefile
zip_url <- "https://www2.census.gov/geo/tiger/GENZ2020/shp/cb_2020_us_zcta520_500k.zip"
zip_file <- "ZCTAs2020.zip"
download.file(zip_url, zip_file)
unzip(zip_file)
# Read ZIP code shapefile
ZCTAMap <- st_read("cb_2020_us_zcta520_500k.shp") %>%
rename(ZIP = ZCTA5CE20) %>%
mutate(ZIP = as.character(ZIP)) # Ensure ZIP is character type for merging
# Merge FMR data with ZIP code shapefile
FMR_Nash_Map <- left_join(FMR_Nash, ZCTAMap, by = "ZIP")
# Merge with Census data (including MOE values)
FMR_Nash_Map <- left_join(FMR_Nash_Map, Census_Data, by = "ZIP")
# Calculate the average rent per ZIP code
FMR_Nash_Map <- FMR_Nash_Map %>%
mutate(ZIP_Average = rowMeans(select(FMR_Nash_Map, Studio, BR1, BR2, BR3, BR4), na.rm = TRUE))
# Convert to spatial data frame
FMR_Nash_Map <- st_as_sf(FMR_Nash_Map)
# Debug: Check column names
print("Column Names in FMR_Nash_Map:")
print(names(FMR_Nash_Map))
# Check if required columns exist
required_cols <- c("ZIP", "Studio", "BR1", "BR2", "BR3", "BR4",
"Rentals", "Rentals_MOE", "Households", "Households_MOE", "ZIP_Average")
missing_cols <- setdiff(required_cols, names(FMR_Nash_Map))
if (length(missing_cols) > 0) {
stop("Missing columns in FMR_Nash_Map: ", paste(missing_cols, collapse = ", "))
}
# Create interactive map with red color palette
ZIP_Map <- suppressWarnings(
mapview(
FMR_Nash_Map,
zcol = "ZIP_Average",
col.regions = brewer.pal(9, "Reds"), # Changed color palette to "Reds"
layer.name = "Average Rent",
popup = popupTable(
FMR_Nash_Map,
feature.id = FALSE,
row.numbers = FALSE,
zcol = required_cols
)
)
)
# Show the map
ZIP_Map