knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/", out.width = "100%" )
library(retirementData) library(kableExtra)
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:
library(retirementData) names(retirementLoc) |> matrix(ncol = 3, byrow = T) |> kableExtra::kbl() |> kable_styling(bootstrap_options = "striped", full_width = T, position = 'center')
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")
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)
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.