-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Rmd
More file actions
76 lines (59 loc) · 2.88 KB
/
README.Rmd
File metadata and controls
76 lines (59 loc) · 2.88 KB
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
eval = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
fig.align = "center"
)
```
# Resource**code** <a href="https://github.com/Resourcecode-project/r-resourcecode"><img src="man/figures/logo.png" align="right" height="139" alt="resourcecode website" /></a>
<!-- badges: start -->
[](https://github.com/Resourcecode-project/r-resourcecode/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/Resourcecode-project/r-resourcecode)
[](https://resourcecode-project.r-universe.dev/resourcecode)
[](https://CRAN.R-project.org/package=resourcecode)
[](https://CRAN.R-project.org/package=resourcecode)
<!-- badges: end -->
The goal of `{resourcecode}` is to provide an easy access to the Resourcecode hindcast database of sea-states. More information on the database can be found [here](https://resourcecode.ifremer.fr). This website only contains information about the way to retrieve data from this data base and the functionalities offred by this package.
## Installation
The `{resourcecode}` package is on CRAN so you can simply run :
```{r install, eval=F}
install.packages("resourcecode")
```
You can install the development version of `{resourcecode}` thanks to [r-universe](https://resourcecode-project.r-universe.dev/resourcecode):
```{r install-r-universe, eval=F}
install.packages("resourcecode",
repos = c(
"https://resourcecode-project.r-universe.dev",
"https://cloud.r-project.org"
)
)
```
or using the classical:
```{r install-dev, eval=F}
devtools::install_github("Resourcecode-project/r-resourcecode")
```
This package depends on data in a data package `{resourcecodedata}` that is available on CRAN on will be installed when installing the package for the first time.
## Examples
Plot the bathymetry used in the project
```{r bathymetry, fig.retina=3}
library(resourcecode)
library(resourcecodedata)
resourcecode::rscd_mapplot(rscd_field$depth, name = "Depth (m)", transform = "sqrt")
```
See the variables available in the database:
```{r variables}
head(rscd_variables)
```
Download a time series of significant wave height next to the coast of Finistère:
```{r data_fetcher, fig.retina=3}
data <- get_parameters(node = "134865", parameters = "hs")
str(data)
if (!is.null(data)) plot(data, type = "l")
```