The goal of the retirementData
package was to consolidate some diverse and relevant factors on where to locate for retirement. The data is located in the retirementData
package but displayed on a separate dashboard here. Within the package, the main dataset is retirementLoc
. Its variables are:
fips | lon | lat |
state | county | pop_2020 |
pct_pop_change | cbsa_desig | rucc_2013 |
partisan_lean | med_hh_inc_2019 | pct_bachelor |
broadband_2017 | life_exp | violent_crime_rate |
average_daily_pm2_5 | prim_care_dr_rate | avg_annual_temp |
median_home_price | yoy_price_chg_pct | years_to_payoff |
You can install the development and experimental version of retirementData
from its repository with:
# Or the development version from GitHub:
# install.packages("devtools")
install_github("RobWiederstein/retirementData")
Once the development package is installed, it can be loaded via:
data("retirementData")
#> Warning in data("retirementData"): data set 'retirementData' not found
The data can provide some practical guidance as to candidate locations by identifying high growth counties, reasonable housing costs, air quality and life expectancy. For example, the code below might be used to answer where housing costs are reasonable:
library(retirementData)
retirementLoc |>
dplyr::arrange(years_to_payoff) |>
dplyr::select(state, county, pop_2020, years_to_payoff) |>
dplyr::slice(1:5)
#> # A tibble: 5 × 4
#> state county pop_2020 years_to_payoff
#> <chr> <chr> <dbl> <dbl>
#> 1 OK Harmon 2557 0.9
#> 2 OK Tillman 7229 0.9
#> 3 WV Wyoming 20123 0.9
#> 4 AR Phillips 17299 1
#> 5 MN Traverse 3218 1
Please note that the retirementData project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.