Skip to content

Commit 2c608b4

Browse files
committed
working on pkgdown structure and vignette content #1
1 parent 049fc89 commit 2c608b4

File tree

5 files changed

+78
-5
lines changed

5 files changed

+78
-5
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main, master]
66
pull_request:
77

8-
name: R-CMD-check.yaml
8+
name: R-CMD-check
99

1010
permissions: read-all
1111

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
types: [published]
99
workflow_dispatch:
1010

11-
name: pkgdown.yaml
11+
name: pkgdown
1212

1313
permissions: read-all
1414

_pkgdown.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
url: ~
1+
url: https://github.com/tbep-tech/slrcsap
22
template:
33
bootstrap: 5
44

5+
navbar:
6+
structure:
7+
left: [intro, reference, articles, news]
8+
right: [search, github]
9+
10+
articles:
11+
- title: Get Started
12+
navbar: ~
13+
contents:
14+
- tbeploads
15+
16+
reference:
17+
- title: Get data
18+
desc: |
19+
Functions for getting data.
20+
contents: starts_with('get')
21+
- title: Plot data
22+
desc: |
23+
Functions for plotting data.
24+
contents: starts_with('plot')

vignettes/figs.Rmd

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,28 @@ knitr::opts_chunk$set(
1515
collapse = TRUE,
1616
comment = "#>",
1717
message = F, warning = F,
18-
fig.align = 'center'
18+
fig.align = 'center',
19+
dpi = 300
1920
)
2021
```
2122

2223
```{r setup}
2324
library(slrcsap)
2425
```
2526

26-
This vignette provides two figures that support the 2025 update of sea level rise projections for the Tampa Bay region. The report was created by the Climate Science Advisory Panel (CSAP) to update recommendations from @tbep0519.
27+
This vignette provides two figures that support the 2025 update of sea level rise projections for the Tampa Bay region. The report was created by the Climate Science Advisory Panel (CSAP) to update recommendations from @tbep0519.
28+
29+
The first figure shows mean monthly sea level at the St. Petersburg, FL tide gauge, with the seasonal cycle removed. Download the figure here](https://raw.githubusercontent.com/tbep-tech/slrcsap/main/docs/fig/tddat.png).
30+
31+
```{r, fig.width = 8, fig.height = 3, fig.cap="1947-2025 monthly mean sea level (MSL) in St. Petersburg, FL, NOAA tide gauge 8726520. Seasonal cycle removed."}}
32+
dat <- get_sealevel()
33+
plot_sealevel(dat)
34+
```
35+
36+
The second figure shows three sea level rise scenarios for St. Petersburg, FL based on regionally corrected NOAA 2022 curves. Download the figure [here](https://raw.githubusercontent.com/tbep-tech/slrcsap/main/docs/fig/tddat.png).
37+
38+
```{r, fig.width = 8, fig.height = 4, fig.cap="Graphic relative sea level change (RSLC) scenarios for St. Petersburg, FL, as calculated using the regionally corrected NOAA 2022 curves"}}
39+
dat <- get_scenario()
40+
plot_scenario(dat)
41+
```
42+

vignettes/slrcsap.Rmd

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "Getting started"
3+
output: rmarkdown::html_vignette
4+
vignette: >
5+
%\VignetteIndexEntry{Getting started}
6+
%\VignetteEngine{knitr::rmarkdown}
7+
%\VignetteEncoding{UTF-8}
8+
---
9+
10+
```{r, include = FALSE}
11+
knitr::opts_chunk$set(
12+
collapse = TRUE,
13+
comment = "#>",
14+
warning = F,
15+
message = F,
16+
fig.align = "center"
17+
)
18+
```
19+
20+
## Installation
21+
22+
Install the package from [r-universe](http://tbep-tech.r-universe.dev/ui/#builds) as follows. The source code is available on [GitHub](https://github.com/tbep-tech/slrcsap).
23+
24+
```{r eval = F}
25+
# Install slrcsap in R:
26+
install.packages('slrcsap', repos = c('https://tbep-tech.r-universe.dev', 'https://cloud.r-project.org'))
27+
```
28+
29+
Load the package in an R session after installation:
30+
31+
```{r}
32+
library(slrcsap)
33+
```
34+
35+
## Usage
36+
37+
text

0 commit comments

Comments
 (0)