Skip to content

Commit fbf07a6

Browse files
committed
Adds packagedown website and frequency bands in the data
1 parent 620771b commit fbf07a6

26 files changed

+161
-26
lines changed

.Rbuildignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
^data-raw$
77
^dev$
88
^devtools_history\.R$
9-
^\.github$
9+
^\.github$
10+
^_pkgdown\.yml$
11+
^docs$
12+
^pkgdown$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: any::pkgdown, local::.
37+
needs: website
38+
39+
- name: Build site
40+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
41+
shell: Rscript {0}
42+
43+
- name: Deploy to GitHub pages 🚀
44+
if: github.event_name != 'pull_request'
45+
uses: JamesIves/github-pages-deploy-action@v4.5.0
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ resourcecodedata.Rproj
55
.httr-oauth
66
.DS_Store
77
.quarto
8+
docs

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: resourcecodedata
22
Title: Data package with the Resourcecode database configuration data
3-
Version: 0.2.0
3+
Version: 1.0.0
44
Authors@R:
55
person("Nicolas", "Raillard", , "nicolas.raillard@ifremer.fr", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-3385-5104"))
@@ -13,8 +13,7 @@ Description: Includes Resourcecode hindcast database (see
1313
regional sources and co-funding by the European Union's Horizon 2020
1414
research and innovation program.
1515
License: GPL (>= 3)
16-
URL: https://github.com/Resourcecode-project/r-resourcecodedata
17-
https://resourcecode-project.r-universe.dev/resourcecodedata
16+
URL: https://github.com/Resourcecode-project/r-resourcecodedata, https://resourcecode-project.r-universe.dev/resourcecodedata, https://resourcecode-project.github.io/r-resourcecodedata, https://resourcecode-project.github.io/r-resourcecodedata/
1817
BugReports:
1918
https://github.com/Resourcecode-project/r-resourcecodedata/issues
2019
Depends:

R/data.R

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#' <https://archimer.ifremer.fr/doc/00751/86306/>
9090
"rscd_triangles"
9191

92-
#' Resourcecode frequency vector of 1D and 2D spectra
92+
#' Resourcecode central frequency vector of 1D and 2D spectra
9393
#'
9494
#' The wave spectrum discretization considers 36 frequencies, starting from
9595
#' 0.0339 Hz up to 0.9526 Hz with a frequency increment factor of 1.1
@@ -100,6 +100,28 @@
100100
#' <https://archimer.ifremer.fr/doc/00751/86306/>
101101
"rscd_freq"
102102

103+
#' Resourcecode lower frequency vector of 1D and 2D spectra
104+
#'
105+
#' The wave spectrum discretization considers 36 frequencies, starting from
106+
#' 0.0339 Hz up to 0.9526 Hz with a frequency increment factor of 1.1
107+
#'
108+
#' @format A vector 36 elements with the frequencies values
109+
#'
110+
#' @source User Manual of the RESOURCECODE database
111+
#' <https://archimer.ifremer.fr/doc/00751/86306/>
112+
"rscd_frequency1"
113+
114+
#' Resourcecode higher frequency vector of 1D and 2D spectra
115+
#'
116+
#' The wave spectrum discretization considers 36 frequencies, starting from
117+
#' 0.0339 Hz up to 0.9526 Hz with a frequency increment factor of 1.1
118+
#'
119+
#' @format A vector 36 elements with the frequencies values
120+
#'
121+
#' @source User Manual of the RESOURCECODE database
122+
#' <https://archimer.ifremer.fr/doc/00751/86306/>
123+
"rscd_frequency2"
124+
103125
#' Resourcecode directional bins
104126
#'
105127
# In terms of directional discretization, 36 directions were used

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ knitr::opts_chunk$set(
1616

1717
# resourcecodedata
1818

19-
This a data-only R package. It contains the **Resourcecode** hindcast database configuration data:
20-
nodes locations for both the sea-state parameters, examples of time series of 1D and 2D surface elevation variance spectral density, etc.
19+
This a data-only R package. It contains the **Resourcecode** hindcast database configuration data, that is used to run the WWIIIⓇ model:
20+
nodes locations for both the sea-state parameters, examples of time series of 1D and 2D surface elevation variance spectral density, etc. These are static data that will **never** be updated.
2121

2222
For more on using these data, see the GitHub repository for the [resourcecode](https://github.com/Resourcecode-project/r-resourcecode) package, which is built to interact with data in this package.
2323

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# resourcecodedata
55

66
This a data-only R package. It contains the **Resourcecode** hindcast
7-
database configuration data: nodes locations for both the sea-state
8-
parameters, examples of time series of 1D and 2D surface elevation
9-
variance spectral density, etc.
7+
database configuration data, that is used to run the WWIIIⓇ model: nodes
8+
locations for both the sea-state parameters, examples of time series of
9+
1D and 2D surface elevation variance spectral density, etc. These are
10+
static data that will **never** be updated.
1011

1112
For more on using these data, see the GitHub repository for the
1213
[resourcecode](https://github.com/Resourcecode-project/r-resourcecode)

_pkgdown.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
url: https://resourcecode-project.github.io/r-resourcecodedata/
2+
template:
3+
bootstrap: 5
4+

data/rscd_1d_spectra.rda

1.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)