You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/get_scenario.R
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@
5
5
#' @param method character, download method. Default is `'curl'`, passed to `download.file()`.
6
6
#' @param quiet logical, suppress download messages. Default is `TRUE`.
7
7
#'
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.
9
9
#'
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.
#' @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.
6
6
#'
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.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ library(slrcsap)
24
24
25
25
## Contributing
26
26
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)
28
28
29
29
## Code of Conduct
30
30
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.
Copy file name to clipboardExpand all lines: vignettes/figs.Rmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ library(slrcsap)
26
26
library(ggplot2)
27
27
```
28
28
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.
30
30
31
31
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).
32
32
@@ -35,7 +35,7 @@ dat <- get_sealevel()
35
35
plot_sealevel(dat, yrng = c(-1, 1), ybrk = 5)
36
36
```
37
37
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).
39
39
40
40
```{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."}
Copy file name to clipboardExpand all lines: vignettes/slrcsap.Rmd
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,11 @@ library(slrcsap)
37
37
38
38
## Usage
39
39
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.
41
41
42
42
### Sea level Data
43
43
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.
45
45
46
46
```{r}
47
47
# Download sea level data for St. Petersburg
@@ -59,7 +59,7 @@ head(cksealevel)
59
59
60
60
The sea level data can be plotted using the `plot_sealevel()` function.
61
61
62
-
```{r,figheight = 3, fig.width = 8}
62
+
```{r,fig.height = 3, fig.width = 8}
63
63
# Plot sea level data for St. Petersburg
64
64
plot_sealevel(spsealevel)
65
65
@@ -87,7 +87,7 @@ plot_sealevel(spsealevel) +
87
87
88
88
### Sea Level Rise Scenarios
89
89
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.
91
91
92
92
```{r}
93
93
# Download sea level rise scenarios for St. Petersburg
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.
107
107
108
108
```{r, fig.height = 4, fig.width = 8}
109
109
# Plot sea level rise scenarios for St. Petersburg
@@ -113,15 +113,15 @@ plot_scenario(spscenario)
113
113
plot_scenario(ckscenario)
114
114
```
115
115
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
117
117
118
118
```{r, fig.height = 4, fig.width = 8}
119
119
# Change arguments for the plot
120
120
plot_scenario(spscenario, cols = c('green', 'blue', 'red'), units = 'm',
121
121
xrng = c(2020, 2150))
122
122
```
123
123
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.
0 commit comments