-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.Rmd
70 lines (52 loc) · 1.97 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
warning = FALSE
)
```
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![R-CMD-check](https://github.com/boshek/rsoi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/boshek/rsoi/actions/workflows/R-CMD-check.yaml)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/rsoi)](https://cran.r-project.org/package=rsoi) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/rsoi?color=brightgreen)](https://CRAN.R-project.org/package=rsoi) [![cran checks](https://cranchecks.info/badges/worst/rsoi)](https://cran.r-project.org/web/checks/check_results_rsoi.html)
# rsoi
An R package to download the most up to date of these climate indices:
- Southern Oscillation Index
- Oceanic Nino Index
- North Pacific Gyre Oscillation
- North Atlantic Oscillation
- Arctic Oscillation
- Antarctic Oscillation
- Multivariate ENSO Index Version 2
- Pacific Decadal Oscillation
- Dipole Mode Index
## Installation
For the development version
```{r, eval = FALSE, echo = TRUE}
install.packages("rsoi")
library(rsoi)
library(tibble)
```
```{r, eval = TRUE, echo = FALSE}
library(rsoi)
library(tibble)
```
## Usage
Download Oceanic Nino Index data
```{r, eval = TRUE, echo = TRUE, warning=FALSE, message=FALSE}
oni <- download_oni()
head(oni)
```
And a quick plot to illustrate the data:
```{r plot, eval = TRUE, echo = TRUE, warning=FALSE, message=FALSE}
barcols <- c('#edf8b1','#7fcdbb','#2c7fb8')
barplot(oni$ONI, names.arg = oni$Date, ylab = "Oceanic Nino Index" ,
col = barcols[oni$phase], border = NA, space = 0,
xaxt = "n")
```
## Inspired by
The idea for this package borrows heavily from the `rpdo` package. `rsoi` now supercedes `rpdo` as a source of data in R for Pacific Decadal Oscillation.