Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boshek/rsoi

Import Climate Indices into R
https://github.com/boshek/rsoi

cran oceanic-nino oceanography r

Last synced: 12 days ago
JSON representation

Import Climate Indices into R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{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.