Skip to content

Commit e3394b5

Browse files
committed
minor documentation update
1 parent 23a1a66 commit e3394b5

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

R/get_scenario.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#' @param method character, download method. Default is `'curl'`, passed to `download.file()`.
66
#' @param quiet logical, suppress download messages. Default is `TRUE`.
77
#'
8-
#' @returns a data frame with columns for id, scenario, year, SLR in meters, and SLR in feet.
8+
#' @returns A data frame with columns for id, scenario, year, SLR in meters, and SLR in feet.
99
#'
10-
#' @details Information from <https://sealevel.nasa.gov/task-force-scenario-tool?psmsl_id={gauge}>. Results are SLR in meters and feet for the intermediate low, intermediate, and intermediate high scenarios by default based on recommended scenarios from the Climate Science Advisory Panel. Full options for scenarios are `'Low'`, `'IntLow'`, `'Int'`, `'IntHigh'`, and `'High'`. Values for SLR are relative change from 2020.
10+
#' @details Information from <https://sealevel.nasa.gov/task-force-scenario-tool?psmsl_id=520>, by default. Results are SLR in meters and feet for the intermediate low, intermediate, and intermediate high scenarios based on recommended scenarios from the Climate Science Advisory Panel. Full options for scenarios are `'Low'`, `'IntLow'`, `'Int'`, `'IntHigh'`, and `'High'`. Values for SLR are relative change from 2020.
1111
#'
1212
#' @export
1313
#'

R/get_sealevel.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#'
33
#' @param gauge numeric, gauge number. Default is 8726520 (St. Petersburg, FL).
44
#'
5-
#' @returns a data frame with columns for gauge, year, month, date, MSL in meters, and MSL in feet.
5+
#' @returns A data frame with columns for gauge, year, month, date, MSL in meters, and MSL in feet.
66
#'
7-
#' @details Information from <https://tidesandcurrents.noaa.gov> using the URL <https://tidesandcurrents.noaa.gov/sltrends/data/{gauge}_meantrend.txt>. Results are monthly Mean Sea Level (MSL) in meters and feet, with the seasonal cycle removed.
7+
#' @details Information from <https://tidesandcurrents.noaa.gov> using the URL <https://tidesandcurrents.noaa.gov/sltrends/data/8726520_meantrend.txt>, by default. Results are monthly Mean Sea Level (MSL) in meters and feet, with the seasonal cycle removed.
88
#'
99
#' @export
1010
#'
@@ -22,7 +22,7 @@ get_sealevel <- function(gauge = 8726520){
2222
date = as.Date(paste(Year, Month, 1), format = '%Y %m %d'),
2323
msl_ft = msl_m * 3.28084
2424
) |>
25-
dplyr::select(gauge, dplyr::everything())
25+
dplyr::select(gauge, Year, Month, date, msl_m, msl_ft)
2626

2727
return(out)
2828

R/plot_scenario.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#' @param caption logical, add caption with source. Default is `TRUE`.
88
#' @param xrng numeric, x-axis range. Default is `c(2020, 2100)`.
99
#' @param xbrk numeric, number of x-axis breaks. Default is `10`.
10-
#' @param yrng numeric, y-axis range as two values. Default is `NULL`, which uses the range of the data..
10+
#' @param yrng numeric, y-axis range as two values. Default is `NULL`, which uses the range of the data.
1111
#' @param ybrk numeric, number of y-axis breaks. Default is `7`.
1212
#'
13-
#' @returns a ggplot object
13+
#' @returns A ggplot object
1414
#' @export
1515
#'
1616
#' @examples

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ library(slrcsap)
2424

2525
## Contributing
2626

27-
To contribute to this project, please view the [Contributing Guide](https://github.com/tbep-tech/slrcsap/CONTRIBUTING.html))
27+
To contribute to this project, please view the [Contributing Guide](https://tbep-tech.github.io/slrcsap/CONTRIBUTING.html)
2828

2929
## Code of Conduct
3030

31-
Please note that the slrcsap project is released with a [Contributor Code of Conduct](https://github.com/tbep-tech/slrcsap/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
31+
Please note that the slrcsap project is released with a [Contributor Code of Conduct](https://tbep-tech.github.io/slrcsap/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
3232

man/get_scenario.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_sealevel.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_scenario.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/figs.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ library(slrcsap)
2626
library(ggplot2)
2727
```
2828

29-
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.
29+
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 the previous report @tbep0519.
3030

3131
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://tbep-tech.github.io/slrcsap/articles/figs_files/figure-html/sealevelplot-1.png).
3232

@@ -35,7 +35,7 @@ dat <- get_sealevel()
3535
plot_sealevel(dat, yrng = c(-1, 1), ybrk = 5)
3636
```
3737

38-
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://tbep-tech.github.io/slrcsap/articles/figs_files/figure-html/scenarioplot-1.png).
38+
The second figure shows three recommended sea level rise scenarios for St. Petersburg, FL based on regionally corrected NOAA 2022 curves. Download the figure [here](https://tbep-tech.github.io/slrcsap/articles/figs_files/figure-html/scenarioplot-1.png).
3939

4040
```{r scenarioplot, 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."}
4141
dat <- get_scenario()

vignettes/slrcsap.Rmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ library(slrcsap)
3737

3838
## Usage
3939

40-
The package includes two core functions to download data and two core functions to plot data. The two download functions are `get_sealevel()` and `get_scenario()` to download tidal gauge data and sea level rise scenario data, respectively. The corresponding plot functions to view data retrieved from the download functions are `plot_sealevel()` and `plot_scenario()`. The content below demonstrates how to use each function, including the optional arguments that can be used to customize the output.
40+
The package includes two core workflows to download and plot data relevant to assess sea level rise risks in the Tampa Bay region. The first workflow retrieves and plots historical sea level data and the second retrieves and plots sea level rise scenario data. Default arguments for all functions are set for the tidal gauge at [St. Petersburg, FL](https://tidesandcurrents.noaa.gov/stationhome.html?id=8726520){target="_blank"}. The content below demonstrates how to use the functions in this package for each workflow.
4141

4242
### Sea level Data
4343

44-
Sea level data is downloaded from the [NOAA Tides and Currents](https://tidesandcurrents.noaa.gov){target="_blank} website. The data is available for all NOAA tide gauges and is setup to download data for the St. Petersburg, FL gauge (NOAA ID 8726520) by default. The data is read directly into R from the URL <https://tidesandcurrents.noaa.gov/sltrends/data/8726520_meantrend.txt>. The data includes monthly mean sea level (MSL) values from 1947 to the present, including a seasonal correction.
44+
Sea level data are downloaded from the [NOAA Tides and Currents](https://tidesandcurrents.noaa.gov){target="_blank} website. The data are available for all NOAA tide gauges and is setup to download data for the St. Petersburg, FL gauge (NOAA ID 8726520) by default. The data is read directly into R from the URL <https://tidesandcurrents.noaa.gov/sltrends/data/8726520_meantrend.txt>. The data for St. Petersburg, includes monthly mean sea level (MSL) values from 1947 to the present, including a seasonal correction.
4545

4646
```{r}
4747
# Download sea level data for St. Petersburg
@@ -59,7 +59,7 @@ head(cksealevel)
5959

6060
The sea level data can be plotted using the `plot_sealevel()` function.
6161

62-
```{r, figheight = 3, fig.width = 8}
62+
```{r, fig.height = 3, fig.width = 8}
6363
# Plot sea level data for St. Petersburg
6464
plot_sealevel(spsealevel)
6565
@@ -87,7 +87,7 @@ plot_sealevel(spsealevel) +
8787

8888
### Sea Level Rise Scenarios
8989

90-
Sea level rise scenarios can be downloaded using the `get_scenario()` function. Data are downloaded from the [Interagency Sea Level Rise Scenario Tool](https://sealevel.nasa.gov/task-force-scenario-tool){target="_blank} website. Details of the methods used in this tool are found in the technical report [@sweet2022]. The data are downloaded as an Excel sheet to from the URL <https://sealevel.nasa.gov/task-force-scenario-tool?psmsl_id=520>, set to St. Petersburg, FL by default using regionally corrected NOAA 2022 curves. Emissions scenarios of NOAA Intermediate Low, Intermediate, and Intermediate High are downloaded by default, as recommended by the Climate Science Advisory Panel. The data show relative sea level change (RSLC) from 2020 to 2100 for each scenario in meters and feet.
90+
Sea level rise scenarios can be downloaded using the `get_scenario()` function. Data are downloaded from the [Interagency Sea Level Rise Scenario Tool](https://sealevel.nasa.gov/task-force-scenario-tool){target="_blank} website that uses regionally corrected NOAA 2022 curves. Details of the methods used in this tool are found in the technical report [@sweet2022]. The data are downloaded as an Excel sheet to from the URL <https://sealevel.nasa.gov/task-force-scenario-tool?psmsl_id=520>, set to St. Petersburg, FL by default. Emissions scenarios of NOAA Intermediate Low, Intermediate, and Intermediate High are downloaded by default, as recommended by the Climate Science Advisory Panel. The data show relative sea level change (RSLC) from 2020 to 2150 for each scenario in meters and feet.
9191

9292
```{r}
9393
# Download sea level rise scenarios for St. Petersburg
@@ -103,7 +103,7 @@ ckscenario <- get_scenario(id = 428, scenario = c('Low', 'IntLow', 'Int', 'IntHi
103103
head(ckscenario)
104104
```
105105

106-
The sea level rise scenarios can be plotted using the `plot_scenario()` function.
106+
The sea level rise scenarios can be plotted using the `plot_scenario()` function. Note the default x-axis range that extends only to 2100.
107107

108108
```{r, fig.height = 4, fig.width = 8}
109109
# Plot sea level rise scenarios for St. Petersburg
@@ -113,15 +113,15 @@ plot_scenario(spscenario)
113113
plot_scenario(ckscenario)
114114
```
115115

116-
Various arguments for `plot_sealevel()` can change the appearance of the plot. Below, the color ramp, units, and x-axis range are modified
116+
Various arguments for `plot_scenario()` can change the appearance of the plot. Below, the color ramp, units, and x-axis range are modified
117117

118118
```{r, fig.height = 4, fig.width = 8}
119119
# Change arguments for the plot
120120
plot_scenario(spscenario, cols = c('green', 'blue', 'red'), units = 'm',
121121
xrng = c(2020, 2150))
122122
```
123123

124-
The plot is also a `ggplot` object and can be modified with additional [ggplot2](https://ggplot2.tidyverse.org/){target="_blank"} functions. Below, the plot is modified to add a title, subtitle, and change the theme.
124+
The plot is also a `ggplot()` object and can be modified with additional [ggplot2](https://ggplot2.tidyverse.org/){target="_blank"} functions. Below, the plot is modified to add a title, subtitle, and change the theme.
125125

126126
```{r, fig.height = 4, fig.width = 8}
127127
# Add a title, subtitle and change the theme

0 commit comments

Comments
 (0)