-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
65 lines (48 loc) · 1.59 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# readweo
<!-- 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/MattCowgill/readweo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MattCowgill/readweo/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
`{readweo}` is an R package that helps you download, import and tidy data from the IMF's World Economic Outlook.
## Installation
You can install `{readweo}` from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("MattCowgill/readweo")
```
`{readweo}` is not currently on CRAN. At present I do not plan to submit it to CRAN.
## Usage
The package has one key function: `read_weo()`.
You can use it like so:
```{r}
library(readweo)
weo <- read_weo("Oct 2022")
weo
```
`read_weo()` returns a tidy (long) tibble.
You can use it like this:
```{r}
library(dplyr)
library(ggplot2)
weo %>%
filter(country %in% c("New Zealand", "Australia"),
subject_descriptor == "Unemployment rate") %>%
ggplot(aes(x = year, y = value, col = country)) +
geom_line() +
geom_vline(aes(xintercept = estimates_start_after),
linetype = 2) +
theme_minimal() +
labs(subtitle = "Unemployment rate with IMF forecast")
```