-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
91 lines (64 loc) · 3.62 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
output: github_document
always_allow_html: true
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r options, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%"
)
```
```{r load-data, include = F}
library(retirementData)
library(kableExtra)
```
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/RobWiederstein/retirement/workflows/R-CMD-check/badge.svg)](https://github.com/RobWiederstein/retirement/actions)
[![License: MIT](https://img.shields.io/badge/license-MIT-bright%20green)](https://img.shields.io/badge/license-MIT-bright%20green)
[![Codecov test coverage](https://codecov.io/gh/RobWiederstein/retirement/branch/main/graph/badge.svg)](https://codecov.io/gh/RobWiederstein/retirement?branch=main)
[![Last Commit](https://img.shields.io/github/last-commit/RobWiederstein/retirementData)](https://img.shields.io/github/last-commit/RobWiederstein/retirementData)
<!-- badges: end -->
<h4 align= "center">
<a href='https://rob-wiederstein.shinyapps.io/retirementdash/'><img src='man/figures/retirement-dashboard.jpg' align="center" height="400"/><br/></a>
<a href='https://rob-wiederstein.shinyapps.io/retirementdash/'>Retirement Locator</a>
</h4>
# Introduction
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](https://rob-wiederstein.shinyapps.io/retirementdash/?_ga=2.99037854.1258475930.1633524763-1285109657.1633184174). Within the package, the main dataset is `retirementLoc`. Its variables are:
```{r list-variables, echo=F, fig.align='center'}
library(retirementData)
names(retirementLoc) |>
matrix(ncol = 3, byrow = T) |>
kableExtra::kbl() |>
kable_styling(bootstrap_options = "striped", full_width = T, position = 'center')
```
## Installation
You can install the development and experimental version of `retirementData` from its [repository](https://github.com/RobWiederstein/retirementData) with:
``` r
# Or the development version from GitHub:
# install.packages("devtools")
install_github("RobWiederstein/retirementData")
```
## Load Data
Once the development package is installed, it can be loaded via:
```{r}
data("retirementData")
```
## Common Questions
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:
```{r example}
library(retirementData)
retirementLoc |>
dplyr::arrange(years_to_payoff) |>
dplyr::select(state, county, pop_2020, years_to_payoff) |>
dplyr::slice(1:5)
```
<!--You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this. You could also use GitHub Actions to re-render `README.Rmd` every time you push. An example workflow can be found here: <https://github.com/r-lib/actions/tree/master/examples>.
# Displaying Code Blocks
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.
-->
## Code of Conduct
Please note that the retirementData project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.