From 77c9b3237b943198b71ce381866bb13e0e4318a0 Mon Sep 17 00:00:00 2001 From: Elin Waring Date: Wed, 13 Apr 2022 09:20:09 -0400 Subject: [PATCH] More vignette work related to other changes. --- vignettes/accumulated_cyclone_energy.Rmd | 3 ++- vignettes/forecast_advisory.Rmd | 5 +++-- vignettes/gis_data.Rmd | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/vignettes/accumulated_cyclone_energy.Rmd b/vignettes/accumulated_cyclone_energy.Rmd index 964019d..900367b 100644 --- a/vignettes/accumulated_cyclone_energy.Rmd +++ b/vignettes/accumulated_cyclone_energy.Rmd @@ -13,7 +13,7 @@ knitr::opts_chunk$set(echo = TRUE, ```{r, message = FALSE} library(dplyr) library(ggplot2) -library(HURDAT) +#library(HURDAT) library(lubridate) library(readr) library(rrricanes) @@ -35,6 +35,7 @@ To calculate ACE you would want to use the `fstadv` dataset and apply the follow * select `Wind` ```{r eval=FALSE} + fstadv <- fstadv %>% filter(hour(Date) %in% c(3, 9, 15, 21), Status %in% c("Tropical Storm", "Hurricane"), diff --git a/vignettes/forecast_advisory.Rmd b/vignettes/forecast_advisory.Rmd index 9e94629..1529180 100644 --- a/vignettes/forecast_advisory.Rmd +++ b/vignettes/forecast_advisory.Rmd @@ -26,14 +26,15 @@ key <- "AL092008" adv <- 42 ``` -```{r} +```{r eval=FALSE} fstadv <- fstadv %>% filter(Key == key, Adv <= adv) ``` ### GIS Advisory Forecast Track, Cone of Uncertainty, and Watches/Warnings ```{r warning=FALSE} -gis_adv <- gis_advisory(key = key, advisory = adv) %>% gis_download() +gis_adv <- gis_advisory(key = key, advisory = adv) %>% + gis_download() ``` Get bounding box of the forecast polygon. diff --git a/vignettes/gis_data.Rmd b/vignettes/gis_data.Rmd index 9a5d10c..6cde250 100644 --- a/vignettes/gis_data.Rmd +++ b/vignettes/gis_data.Rmd @@ -83,7 +83,7 @@ There are several datasets that are published for active cyclones. The following ## Advisory Package -```{r} +```{r warning=FALSE} gis_advisory(key = "AL182012", advisory = "18") ``` @@ -146,7 +146,7 @@ Each forecast position is also included in the points dataframe. You can access Forecast cone data is contained in the polygon dataset. To deal with this dataset you can use the `shp_to_df` function again or take the slightly longer way: -```{r} +```{r warning=FALSE} fcst_cone <- df.gis_adv$al182012.018_5day_pgn fcst_cone@data$id <- rownames(fcst_cone@data) fcst_cone.points <- broom::tidy(fcst_cone, region = "id") @@ -184,13 +184,13 @@ In the example above you can see tropical storm warnings issued for the Bahamas, The Tropical Cyclone Storm Surge Probabilities data shows the probability, in percent, of a specified storm surge occurring during the forecast period indicated. The product is based upon an ensemble of Sea, Lake, and Overland Surge from Hurricanes (SLOSH) model runs using the National Hurricane Center (NHC) official advisory and accounts for track, size, and intensity errors based on historical errors. -```{r} +```{r warning=FALSE} gis_prob_storm_surge(key = "AL142016", products = list(psurge = 0), datetime = "20161006") ``` -```{r, eval = FALSE} +```{r, warning=FALSE} df.gis_storm_surge <- gis_prob_storm_surge(key = "AL142016", products = list(psurge = 0),