Package 'rrricanes'

Title: Web Scraper for Atlantic and East Pacific Hurricanes and Tropical Storms
Description: Get archived data of past and current hurricanes and tropical storms for the Atlantic and eastern Pacific oceans. Data is available for storms since 1998. Datasets are updated via the rrricanesdata package. Currently, this package is about 6MB of datasets. See the README or view `vignette("drat")` for more information.
Authors: Tim Trice [aut], Joseph Stachelek [rev] (Joseph Stachelek reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/118), Emily Robinson [rev] (Emily Robinson reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/118), Sophia Barett [ctb], Lismarie Arche [ctb], Simon Ayotes [ctb], Goodness Ajayi-Martins [ctb], Elin Waring [aut, cre]
Maintainer: Elin Waring <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0.6.10
Built: 2024-11-27 03:41:00 UTC
Source: https://github.com/ropensci/rrricanes

Help Index


al_prblty_stations

Description

Retrieve list of probability stations based in the Atlantic basin from the NHC. To be used in tandem with 'wndprb' products.

Usage

al_prblty_stations()

Details

Originally it was believed this data source would be removed by the National Hurricane Center but it appears to have been updated. Additional columns have been added, one up front and three in the back. These columns all contain the same values each and I am unable to find documentation describing the values.

Regardless, the data is kept, just in case.

Warnings

Calling al_prblty_stations will generate a warning:

> "Expected 7 pieces. Additional pieces discarded in 1 rows [90]."

Station PATRICK AFB actually has eight columns. The data is kept for consistency; you decide if you want it or not.


al_tracking_chart

Description

Build tracking chart centered on Atlantic Basin.

Usage

al_tracking_chart(...)

Arguments

...

Additional parameters for tracking_chart and ggplot2

Value

ggplot2 object centered on Atlantic basin.

See Also

tracking_chart

Examples

## Not run: 
# Build map with white land areas, thin black borders
al_tracking_chart(color = "black", size = 0.1, fill = "white")

# 50nm resolution, no states
al_tracking_chart(res = 50, states = FALSE, color = "black", size = 0.1,
          fill = "white")

# 50nm resolution, coastlines only
al_tracking_chart(countries = FALSE, res = 50, color = "black", size = 0.1,
          fill = "white")

# Adding and modifying with ggplot functions
al_tracking_chart(color = "black", size = 0.1, fill = "white") +
  ggplot2::labs(x = "Lon", y = "Lat",
  title = "Base Atlantic Tracking Chart")

## End(Not run)

cp_prblty_stations

Description

Retrieve list of probability stations based in the central Pacific from the NHC. To be used in tandem with 'wndprb' products.

Usage

cp_prblty_stations()

Strike probabilities for Hurricane Katrina (AL122005)

Description

Strike probabilities for Hurricane Katrina (AL122005)

Usage

df.al_12_2005_prblty

Format

An object of class tbl_df (inherits from tbl, data.frame) with 937 rows and 10 columns.

Source

http://www.nhc.noaa.gov/archive/2005/KATRINA.shtml?


Forecast/Advisory and Wind Speed Probabilities for Hurricane Sandy (AL182012)

Description

Forecast/Advisory and Wind Speed Probabilities for Hurricane Sandy (AL182012)

Usage

df.al_18_2012

Format

An object of class list of length 2.

Source

http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?


Forecast/Advisory for Hurricane Sandy (AL182012)

Description

Forecast/Advisory for Hurricane Sandy (AL182012)

Usage

df.al_18_2012_fstadv

Format

An object of class tbl_df (inherits from tbl, data.frame) with 31 rows and 117 columns.

Source

http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?


Wind speed probabilities for Hurricane Sandy (AL182012)

Description

Wind speed probabilities for Hurricane Sandy (AL182012)

Usage

df.al_18_2012_wndprb

Format

An object of class tbl_df (inherits from tbl, data.frame) with 2227 rows and 18 columns.

Source

http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?


Atlantic cyclones for 2012

Description

Atlantic cyclones for 2012

Usage

df.al_2012

Format

An object of class tbl_df (inherits from tbl, data.frame) with 19 rows and 4 columns.

Source

http://www.nhc.noaa.gov/archive/2012/


GIS advisory dataset for Hurricane Sandy Adv 18

Description

GIS advisory dataset for Hurricane Sandy Adv 18

Usage

df.gis_adv

Format

An object of class list of length 4.

Source

http://www.nhc.noaa.gov/gis/archive_forecast_results.php?id=al18&year=2012&name=Hurricane%20SANDY


GIS storm surge shapefile dataset for Hurricane Sandy(AL182012)

Description

GIS storm surge shapefile dataset for Hurricane Sandy(AL182012)

Usage

df.gis_storm_surge

Format

An object of class list of length 1.

Source

http://www.nhc.noaa.gov/gis/archive_psurge_results.php?id=al18&year=2012&name=Hurricane%20SANDY


GIS windfield and forecast wind radii for Hurricane Sandy (AL182012)

Description

GIS windfield and forecast wind radii for Hurricane Sandy (AL182012)

Usage

df.gis_wind_radii

Format

An object of class list of length 2.

Source

http://www.nhc.noaa.gov/gis/archive_forecast_info_results.php?id=al18&year=2012&name=Hurricane%20SANDY


GIS wind speed probabilities for Hurricane Sandy (AL182012)

Description

GIS wind speed probabilities for Hurricane Sandy (AL182012)

Usage

df.gis_wsp

Format

An object of class list of length 3.

Source

http://www.nhc.noaa.gov/gis/archive_wsp.php


ep_prblty_stations

Description

Retrieve list of probability stations based in the eastern Pacific from the NHC. To be used in tandem with 'wndprb' products.

Usage

ep_prblty_stations()

Details

Originally it was believed this data source would be removed by the National Hurricane Center but it appears to have been updated. Additional columns have been added, one up front and three in the back. These columns all contain the same values each and I am unable to find documentation describing the values.

Regardless, the data is kept, just in case.

Warnings

Calling ep_prblty_stations will generate a warning:

> "Expected 7 pieces. Missing pieces filled with 'NA' in 1 rows [41]."

Station SALINA CRUZ actually has six columns.


ep_tracking_chart

Description

Build tracking chart centered on northeast Pacific Basin.

Usage

ep_tracking_chart(...)

Arguments

...

Additional parameters for ggplot2

Value

ggplot2 object centered on northeast Pacific basin.

See Also

tracking_chart

Examples

## Not run: 
# Build map with white land areas, thin black borders
ep_tracking_chart(color = "black", size = 0.1, fill = "white")

# 50nm resolution, no states
ep_tracking_chart(res = 50, states = FALSE, color = "black", size = 0.1,
          fill = "white")

# 50nm resolution, coastlines only
ep_tracking_chart(countries = FALSE, res = 50, color = "black", size = 0.1,
          fill = "white")

# Adding and modifying with ggplot functions
ep_tracking_chart(color = "black", size = 0.1, fill = "white") +
  ggplot2::labs(x = "Lon", y = "Lat",
  title = "Base East Pacific Tracking Chart")

## End(Not run)

get_discus

Description

Return dataframe of discussion data.

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

Adv

Advisory Number

DateTime

Date of advisory issuance

StormKey

ID of cyclone

Contents

Text content of product

Usage

get_discus(links)

Arguments

links

URL to storm's archive page.

See Also

get_storms, public

Examples

## Not run: 
# Return dataframe of storm discussions for Tropical Storm Alex (AL011998)
get_discus("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html")

## End(Not run)

get_fstadv

Description

Return dataframe of forecast/advisory data.

Usage

get_fstadv(links)

Arguments

links

URL to storms' archive page.

Details

Returns a wide dataframe of most the data available in a cyclones forecast/advisory product (watches and warnings are not included at this time).

Overall structure of the dataframe is listed below. Note the following clarifications:

  1. The value of 'n' in 'Hr{n}' variables is the forecast period. Up to 2002, forecast periods are 12, 24, 36, 48 and 72 hours. After 2002, forecast periods were extended to 96 and 120 hours. Not all forecast periods will be available for every cyclone advisory (e.g., if it is dissipating or expected to dissipate.)

  2. Wind radius data is not included 96 and 120 hour forecast periods.

  3. Forecast dates are not truly 12, 24, ..., 120 hours from the date/time of the advisory. The NHC issues two positions in these products; one for current and one for three hours prior. It is the latter position the forecast date/times are based.

Status

Classification of cyclone

Name

Name of cyclone

Adv

Advisory number

DateTime

Date and time of advisory

StormKey

Unique identifier of cyclone

Lat

Latitude of cyclone center

Lon

Longitude of cyclone center

Wind

Maximum sustained one-minute winds in knots

Gust

Maximum sustained one-minute gusts in knots

Pressure

Minimum central pressure in millibars

PosAcc

Position accuracy of cyclone in nautical miles

FwdDir

Compass angle of forward motion

FwdSpeed

Forward speed in miles per hour

Eye

Size of eye in nautical miles

NE64

Radius of >=64kt winds in northeast quadrant

SE64

Radius of >=64kt winds in southeast quadrant

SW64

Radius of >=64kt winds in southwest quadrant

NW64

Radius of >=64kt winds in northwest quadrant

NE50

Radius of >=50kt winds in northeast quadrant

SE50

Radius of >=50kt winds in southeast quadrant

SW50

Radius of >=50kt winds in southwest quadrant

NW50

Radius of >=50kt winds in northwest quadrant

NE34

Radius of >=34kt winds in northwest quadrant

SE34

Radius of >=34kt winds in southeast quadrant

SW34

Radius of >=34kt winds in southwest quadrant

NW34

Radius of >=34kt winds in northwest quadrant

Hr{n}FcstDate

Forecast valid date

Hr{n}Lat

Forecast latitude in 'n' hours

Hr{n}Lon

Forecast longitude in 'n' hours

Hr{n}Wind

Forecast maximum wind in 'n' hours

Hr{n}Gust

Forecast maximum gust in 'n' hours

Hr{n}NE64

Forecast wind radius in 'n' hours

Hr{n}SE64

Forecast wind radius in 'n' hours

Hr{n}SW64

Forecast wind radius in 'n' hours

Hr{n}NW64

Forecast wind radius in 'n' hours

Hr{n}NE50

Forecast wind radius in 'n' hours

Hr{n}SE50

Forecast wind radius in 'n' hours

Hr{n}SW50

Forecast wind radius in 'n' hours

Hr{n}NW50

Forecast wind radius in 'n' hours

Hr{n}NE34

Forecast wind radius in 'n' hours

Hr{n}SE34

Forecast wind radius in 'n' hours

Hr{n}SW34

Forecast wind radius in 'n' hours

Hr{n}NW34

Forecast wind radius in 'n' hours

SeasNE

Radius of 12ft seas in northeast quadrant

SeasSE

Radius of 12ft seas in southeast quadrant

SeasSW

Radius of 12ft seas in southwest quadrant

SeasNW

Radius of 12ft seas in northwest quadrant

See Also

tidy_adv, tidy_wr, tidy_fcst, tidy_fcst_wr

Examples

## Not run: 
# Return dataframe of forecast/advisories for Tropical Storm Alex (AL011998)
get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html")

## End(Not run)

get_ftp_storm_data

Description

Retrieve text products from the National Hurricane Center's FTP server. Not all products may exist for certain storms.

Usage

get_ftp_storm_data(
  stormid,
  products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb")
)

Arguments

stormid

A six-character alphanumeric string formatted as AABBCCCC where

AA

The basin of the storm; AL or EP

BB

Storm number for the year as decimal number (e.g., 01, 02, ..., 10, ...)

CCCC

Year with century)

products

Products to retrieve; discus, fstadv, posest, public, prblty, update, and windprb.

See Also

get_storm_data


get_posest

Description

Return dataframe of position estimate data.

Usage

get_posest(links)

Arguments

links

URL to storm's archive page.

Details

This product was discontinued after the 2013 hurricane season and is now included in the Tropical Cyclone Update product (update).

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

DateTime

Date of advisory issuance

Contents

Text content of product

See Also

get_storms, posest


get_prblty

Description

Strike probabilities; the chances of the center of a cyclone passing within 65 nautical miles of a location.

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

Adv

Advisory Number

Date

Date of advisory issuance

Location

Location for which the probability statistics rely

A

Probability of a strike within the next 12 hours

B

Probability of a strike between 12 and 24 hours

C

Probability of a strike between 24 and 36 hours

D

Probability of a strike between 36 and 48 hours

E

Probability of a strike between 48 and 72 hours

Usage

get_prblty(links)

Arguments

links

URL to storm's archive page.


get_public

Description

Return dataframe of public advisory data.

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

Adv

Advisory Number

Date

Date of advisory issuance

StormKey

Unique ID of the cyclone

Contents

Text content of product

Usage

get_public(links)

Arguments

links

URL to storm's archive page.

See Also

get_storms, public


Get Serial Numbers

Description

Creates the serial numbers look up

This will create a fresh table for serial numbers Since this is constantly updated it should be refreshed regularly especially when seeking recent tracks.

Usage

get_serial_numbers()

get_storm_data

Description

Retrieve data from products.

Usage

get_storm_data(
  links,
  products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb")
)

Arguments

links

to storm's archive page.

products

Products to retrieve; discus, fstadv, posest, public, prblty, update, and windprb.

Details

get_storm_data is a wrapper function to make it more convenient to access the various storm products.

Types of products:

discus

Storm Discussions. This is technical information on the cyclone such as satellite presentation, forecast model evaluation, etc.

fstadv

Forecast/Advisory. These products contain the meat of an advisory package. Current storm information is available as well as structural design and forecast data.

posest

Position Estimate. Issued generally when a storm is threatening; provides a brief update on location and winds.

public

Public Advisory. Issued for public knowledge; more often for Atlantic than East Pacific storms. Contains general information.

prblty

Strike Probability. Discontinued after the 2005 hurricane season, strike probabilities list the chances of x-force winds in a particular city.

update

Cyclone Update. Generally issued when a significant change occurs in the cyclone.

windprb

Wind Probability. Replace strike probabilities beginning in the 2006 season. Nearly identical.

Progress bars are displayed by default. Additionally, you can display messages for each advisory being worked by setting the rrricanes.working_msg to TRUE.

Value

list of dataframes for each of the products.

See Also

get_ftp_storm_data

Examples

## Not run: 
## Get public advisories for first storm of 2016 Atlantic season.
#get_storms(year = 2016, basin = "AL") |>
 # dplyr::slice(1) |>
 # pull(Link) |>
 # get_storm_data( products = "public")
## Get public advisories and storm discussions for first storm of 2017
Atlantic season.
# get_storms(year = 2017, basin = "AL") |>
#  slice(1) |>
 # pull(Link) |>
  # get_storm_data(products = c("discus", "public"))

## End(Not run)

get_storm_list

Description

Get storm list

Usage

get_storm_list()

get_storm_track

Description

get_storm_track

Usage

get_storm_track(
  serials,
  source = c("ACTIVE", "last3years", "since1980", "ALL", "EP", "NA", "NI", "SA", "SI",
    "SP", "WP")
)

Arguments

serials

vector of serial numbers for a storm

source

Short name for source, allows use of smaller file.

Value

data frame of storm track


get_storms

Description

Returns storms and product link.

Usage

get_storms(years = format(Sys.Date(), "%Y"), basins = c("AL", "EP"))

Arguments

years

numeric or vector, four digits (%Y format)

basins

One or both of c("AL", "EP")

Format

A 4xN dataframe

Year

Numeric, four-digit year of the storm

Name

Character, name of storm mixed-case

Basin

AL (Atlantic) or EP (East Pacific)

Link

URL to storms' product pages

Details

By default returns all storms for the current year. If no storms have developed will return an empty dataframe.

Value

Dataframe of storms.

Source

http://www.nhc.noaa.gov/archive/2016/

Examples

# Default. Get all storms, both basins, for last year.
## Not run: 
storms <- get_storms(year = 2016, basin = c("AL", "EP"))

# Get storms for two different years
storms.2010 <- get_storms(c(2010, 2015))

# Get storms for two consecutive years, Atlantic basin only
storms.al.2005 <- get_storms(2005:2007, basin = "AL")

## End(Not run)

get_update

Description

Return dataframe of cyclone update data.

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

Date

Date of advisory issuance

Key

Unique ID of cyclone

Contents

Text content of product

Usage

get_update(links)

Arguments

links

URL to storm's archive page.

See Also

get_storms, update


get_url_contents

Description

Get contents from URL

Usage

get_url_contents(links)

Arguments

links

character vector of URLs to download

Details

This function primarily is reserved for extracting the contents of the individual products (thought it can be used in other instances). Often, there are timeout issues. This is an attempt to try to work around that.


get_wndprb

Description

Return dataframe of wind speed probability data.

Usage

get_wndprb(links)

Arguments

links

URL to storm's archive page.

Details

Wind Speed Probability product replaced Strike Probabilities product after the 2005 hurricane season. These products may not be issued for every advisory/cyclone.

Status

Classification of storm, e.g., Tropical Storm, Hurricane, etc.

Name

Name of storm

Adv

Advisory Number

Date

Date of advisory issuance

Wind

Minimum wind speed for which probabilities reference

Wind12

Probability of sustained 'Wind' within 12 hours

Wind24

Probability of sustained 'Wind' within 24 hours

Wind24Cum

Cumulative probability through 24 hours

Wind36

Probability of sustained 'Wind' within 36 hours

Wind36Cum

Cumulative probability through 36 hours

Wind48

Probability of sustained 'Wind' within 48 hours

Wind48Cum

Cumulative probability through 48 hours

Wind72

Probability of sustained 'Wind' within 72 hours

Wind72Cum

Cumulative probability through 72 hours

Wind96

Probability of sustained 'Wind' within 96 hours

Wind96Cum

Cumulative probability through 96 hours

Wind120

Probability of sustained 'Wind' within 120 hours

Wind120Cum

Cumulative probability through 120 hours

Value

Data frame of wndprb information

Source

http://www.nhc.noaa.gov/about/pdf/About_Windspeed_Probabilities.pdf


gis_advisory

Description

Advisory Forecast Track, Cone of Uncertainty, and Watches/Warnings

Usage

gis_advisory(key, advisory = as.character())

Arguments

key

Key of storm (i.e., AL012008, EP092015)

advisory

Advisory number. If NULL, all advisories are returned. Intermediate advisories are acceptable.

See Also

gis_download


gis_breakpoints

Description

Return link to breakpoints shapefile by year

Usage

gis_breakpoints()

Details

Coastal areas placed under tropical storm and hurricane watches and warnings are identified through the use of "breakpoints." A tropical cyclone breakpoint is defined as an agreed upon coastal location that can be chosen as one of two specific end points or designated places between which a tropical storm/hurricane watch/warning is in effect. The U.S. National Weather Service designates the locations along the U.S. East, Gulf, and California coasts, Puerto Rico, and Hawaii. These points are listed in NWS Directive 10-605 (PDF). Individual countries across the Caribbean, Central America, and South America provide coastal locations for their areas of responsibility to the U.S. National Weather Service for the National Hurricane Center's use in tropical cyclone advisories when watches/warnings are issued by international partners. The National Hurricane Center maintains a list of pre-arranged breakpoints for the U.S. Atlantic and Gulf coasts, Mexico, Cuba and the Bahamas. Other sites are unofficial and sites not on the list can be selected if conditions warrant.


gis_download

Description

Get GIS data for storm.

Usage

gis_download(url, ...)

Arguments

url

link to GIS dataset to download.

...

additional parameters for simple features


gis_latest

Description

Latest GIS datasets for active cyclones

Usage

gis_latest(basins = c("AL", "EP"), ...)

Arguments

basins

AL and/or EP.

...

additional parameters for sf::st_read()


gis_outlook

Description

Tropical Weather Outlook

Usage

gis_outlook()

See Also

gis_download


gis_prob_storm_surge

Description

Probabilistic Storm Surge

Usage

gis_prob_storm_surge(key, products, datetime = NULL)

Arguments

key

Key of storm (i.e., AL012008, EP092015)

products

list of products and associated n values; psurge (0:20) or esurge (10, 20, 30, 40, 50).

datetime

Datetime in %Y%m%d%H format.

Details

Probabilistic Storm Surge Forecasts

Products

esurge

The Tropical Cyclone Storm Surge Exceedances (P-Surge 2.5) data shows the probability, in percent, of a specified storm surge, including tides, exceeding the specified height, in feet, during the forecast period indicated. The 10 percent exceedance height, for example, is the storm surge height, including tides, above ground level (AGL) such that there is a 10 percent chance of exceeding it. 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 and astronomical tide. Valid values are 10, 20, 30, 40 or 50.

psurge

The Tropical Cyclone Storm Surge Probabilities (P-Surge 2.5) 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 and astronomical tide. Valid values are 0:20.

See Also

Tropical Cyclone Storm Surge Probabilities

gis_download

Examples

## Not run: 
# Return the last psurge0 product for storm AL092016
gis_prob_storm_surge("AL092016", products = list("psurge" = 0))

# Return the psurge0 and esurge10 products for storm AL092016
gis_prob_storm_surge("AL092016", products = list("psurge" = 0, "esurge" = 1
0))

# Return all psurge0 products for Sep 2, 2016, storm AL092016
gis_prob_storm_surge("AL092016", products = list("psurge" = 0),
           datetime = "20160902")

## End(Not run)

gis_storm_surge_flood

Description

Potential Storm Surge Flooding (Inundation)

Usage

gis_storm_surge_flood(
  key,
  advisory = as.numeric(),
  products = c("inundation", "tidalmask")
)

Arguments

key

Key of storm (i.e., AL012008, EP092015)

advisory

Advisory number.

products

indundation or tidalmask

See Also

gis_download


gis_windfield

Description

Advisory Wind Field and Forecast Wind Radii

Usage

gis_windfield(key, advisory = as.character())

Arguments

key

Key of storm (i.e., AL012008, EP092015)

advisory

Advisory number. If NULL, all advisories are returned. Intermediate advisories are acceptable.

Details

Tropical Cyclone Advisory Wind Field http://www.nhc.noaa.gov/gis/archive_forecast_info_results.php?id=al14&year =2016 http://www.nhc.noaa.gov/gis/forecast/archive/ Example file name: al012017_fcst_001.zip [basin]2[year_num]2[year]4_fcst_[advisory]3.zip Many storms do not appear to have this data; especially earlier.

Not all advisories will be available for storms. For example, Hurricane Matthew (AL142016) is missing several advisories.

See Also

gis_download


gis_wsp

Description

Wind Speed Probabilities

Usage

gis_wsp(datetime, res = c(5, 0.5, 0.1))

Arguments

datetime

Datetime in %Y%m%d%H format. %m, %d and %H are optional but will return more datasets.

res

Resolution as a numeric vector; 5, 0.5, 0.1.

Details

Probability winds affecting an area within a forecast period. Datasets contain windfields for 34kt, 50kt and 64kt. Resolution is at 5km, 0.5 degrees and 0.1 degrees. Not all resolutions may be available for all storms. Not all windfields will be available for all advisories.

See Also

gis_download

Examples

## Not run: 
# Return datasets for January 1, 2016 with resolution of 0.5 degrees
gis_wsp("20160101", res = 0.5)

# Return wsp of 0.1 and 0.5 degree resolution, July, 2015
gis_wsp("201507", res = c(0.5, 0.1))

## End(Not run)

knots_to_mph

Description

convert knots (kt) to miles per hour (mph)

Usage

knots_to_mph(x)

Arguments

x

wind speed in knots

Value

x in miles per hour

Examples

knots_to_mph(65)

mb_to_in

Description

convert millibars (mb) to inches of mercury (in)

Usage

mb_to_in(x)

Arguments

x

barometric pressure in mb

Value

x in inches

Examples

mb_to_in(999)

nm_to_sm

Description

Convert nautical miles to survey miles

Usage

nm_to_sm(x)

Arguments

x

Nautical miles

Examples

nm_to_sm(c(50, 100, 150))

rrricanes

Description

rrricanes is a web-scraping library for R designed to deliver hurricane data (past and current) into well-organized datasets. With these datasets you can explore past hurricane tracks, forecasts and structure elements.

This documentation and additional help articles can be found online.

Text products (Forecast/Advisory, Public Advisory, Discussions and Probabilities) are only available from 1998 to current. An effort will be made to add prior data as available.

Getting Storms

List all storms that have developed by year and basin. Year must be in a four-digit format (%Y) and no earlier than 1998. Basin can be one or both of Atlantic ("AL") or East Pacific ("EP").

get_storms

List all storms by year, basin

Getting Storm Data

get_storm_data can be used to select multiple products, multiple storms and from multiple basins.

Additional text products are:

get_discus

Storm Discussions

get_fstadv

Forecast/Advisory. These products contain a bulk of the information for tropical cyclones including current position, structure, forecast position and forecast structure.

get_posest

Position Estimates. Rare and used generally for threatening cyclones. This product was discontinued after the 2013 season and is now issued as get_update.

get_prblty

Strike Probabilities. Show the probability of the center of a cyclone passing within 65nm of a location for a given forecast period. This product was discontinued after 2005, replaced with get_wndprb.

get_public

Public Advisory. General non-structured information exists in these products.

get_update

Updates. Generally issued when a cyclone undergoes a sudden change that requires immediate notice.

get_wndprb

Wind Speed Probability. Lists the probability of a location experiencing a minimum of 35kt, 50kt or 64kt winds for an alotted forecast period or accumulated probability. This product replaced get_prblty after the 2005 season.

The products above may take some time to load if the NHC website is slow (as is often the case, unfortunately). For all storm advisories issued outside of the current month, use the rrricanesdata package.

To install rrricanesdata, run

install.packages("rrricanesdata", repos = "https://timtrice.github.io/drat/", type = "source")

See vignette("installing_rrricanesdata", package = "rrricanes") for more information.

GIS Data

For enhanced plotting of storm data, several GIS datasets are available. The core GIS functions return URLs to help you refine the data you wish to view. (Some products will not exist for all storms/advisories). These products are:

gis_advisory

Past track, current position, forecast and wind radii

gis_breakpoints

Breakpoints for watches and warnings

gis_latest

All available GIS products for active cyclones

gis_outlook

Tropical Weather Outlook

gis_prob_storm_surge

Probabilistic Storm Surge

gis_windfield

Wind Radii

gis_wsp

Wind Speed Probabilities

gis_download will download the datasets from the above functions.

Some GIS datasets will need to be converted to dataframes to plot geoms. Use shp_to_df to convert SpatialLinesDataFrames and SpatialPolygonsDataFrames. SpatialPointsDataFrames can be converted using tibble::as_data_frame targeting the @data object.

Package Options

In get_storms, the progress bar is based on the number of years being requested. In the product functions (i.e., get_fstadv) it is based on the number of advisories. It can be misleading when calling get_storm_data because it shows the progress of working through a storm's product advisories but will reset on new products/storms.

product datasets. In get_storms, the progress bar is based on the number of years being requested. In the product functions (i.e., get_fstadv) it is based on the number of advisories. It can be misleading when calling get_storm_data because it shows the progress of working through a storm's product advisories but will reset on new products/storms.

rrricanes.working_msg is set to FALSE by default. When TRUE, it will list the current storm, advisory and date being worked.


saffir

Description

Return category of tropical cyclone based on wind. Saffir- Simpson Hurricane Scale does not apply to non-tropical cyclones.

Usage

saffir(x)

Arguments

x

Vector of wind speed values.

Examples

saffir(c(32, 45, 70, 90, 110, 125, 140))

shp_to_df

Description

Convert shapefile object to dataframe

Usage

shp_to_df(obj)

Arguments

obj

Spatial object to convert. See details.

Details

Takes a SpatialLinesDataFrame object or SpatialPolygonsDataFrame object and converts into a dataframe that can be plotted in ggplot2.


status_abbr_to_str

Description

Convert Status abbreviation to string

Usage

status_abbr_to_str(x)

Arguments

x

character vector of status abbreviations

Details

Status abbreviations

DB

Disturbance (of any intensity)

EX

Extratropical cyclone (of any intensity)

HU

Tropical cyclone of hurricane intensity (> 64 knots)

LO

A low that is neither a tropical cyclone, a subtropical cyclone, nor an extratropical cyclone (of any intensity)

SD

Subtropical cyclone of subtropical depression intensity (< 34 knots)

SS

Subtropical cyclone of subtropical storm intensity (> 34 knots)

TD

Tropical cyclone of tropical depression intensity (< 34 knots)

TS

Tropical cyclone of tropical storm intensity (34-63 knots)

WV

Tropical Wave (of any intensity)

Value

character vector of strings

See Also

http://www.aoml.noaa.gov/hrd/hurdat/newhurdat-format.pdf

Examples

# Extratropical Cyclone
status_abbr_to_str("EX")

# Hurricane
status_abbr_to_str("HU")

tidy_adv

Description

Tidy current details of a fstadv dataframe object.

tidy_adv will be deprecated in 0.2.2

Usage

tidy_adv(df)

tidy_fstadv(df)

Arguments

df

fstadv dataframe object

Details

Returns current data only of a fstadv dataframe. Use Key, Adv and Date to join with other tidy dataframes.

StormKey

Unique identifier of cyclone

Adv

Advisory number

Date

Date and time of advisory

Status

Classification of cyclone

Name

Name of cyclone

Lat

Latitude of cyclone center

Lon

Longitude of cyclone center

Wind

Maximum sustained one-minute winds in knots

Gust

Maximum sustained one-minute gusts in knots

Pressure

Minimum central pressure in millibars

PosAcc

Position accuracy of cyclone in nautical miles

FwdDir

Compass angle of forward motion

FwdSpeed

Forward speed in miles per hour

Eye

Size of eye in nautical miles

SeasNE

Radius of 12ft seas in northeast quadrant

SeasSE

Radius of 12ft seas in southeast quadrant

SeasSW

Radius of 12ft seas in southwest quadrant

SeasNW

Radius of 12ft seas in northwest quadrant

Examples

## Not run: 
get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |>
  tidy_adv()

## End(Not run)

tidy_fcst

Description

Tidy forecasts of a fstadv dataframe object.

Usage

tidy_fcst(df)

Arguments

df

fstadv dataframe object

Details

Gathers all forecast points, tidies dataframe to make one row per forecast position. Complete cases only. Use Key, Adv and Date to join with other tidy dataframes.

Key

Unique identifier of cyclone

Adv

Advisory number

Date

Date and time of advisory

FcstDate

Forecast date and time in UTC

Lat

Forecast latitude

Lon

Forecast Longitude

Wind

Forecast wind in knots

Gust

Forecast gust in knots

Examples

## Not run: 
get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |>
  tidy_fcst()

## End(Not run)

tidy_fcst_wr

Description

Tidy forecast wind radii of a fstadv dataframe object

Usage

tidy_fcst_wr(df)

Arguments

df

fstadv dataframe object

Details

Tidies forecast wind radius for each forecast position. Complete cases only (by quadrants). Use Key, Adv and Date to join with other tidy dataframes.

StormKey

Unique identifier of cyclone

Adv

Advisory number

Date

Date and time of advisory

FcstDate

Forecast date and time in UTC

WindField

Minimum sustained wind field for quadrants

NE

Radius in nautical miles for northeast quadrant

SE

Radius in nautical miles for southeast quadrant

SW

Radius in nautical miles for southwest quadrant

NW

Radius in nautical miles for northwest quadrant

Examples

## Not run: 
get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |>
  tidy_fcst_wr()

## End(Not run)

tidy_wr

Description

Tidy current wind radius of a fstadv dataframe object.

Usage

tidy_wr(df)

Arguments

df

fstadv dataframe object

Details

Returns tidy dataframe of current wind radius values for a cyclone. Returns only complete.cases (based on quadrants).

StormKey

Unique identifier of cyclone

Adv

Advisory number

Date

Date and time of advisory

Windfield

Minimum wind speed expected

NE

Radius of 'Windfield' in the northeast quadrant

SE

Radius of 'Windfield' in the southeast quadrant

SW

Radius of 'Windfield' in the southwest quadrant

NW

Radius of 'Windfield' in the northwest quadrant

Examples

## Not run: 
get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |>
  tidy_wr()

## End(Not run)

tracking_chart

Description

Build base tracking chart using ggplot

Usage

tracking_chart(countries = TRUE, states = TRUE, res = 110, ...)

Arguments

countries

Show country borders. Default TRUE.

states

Show state boundaries. Default TRUE. Ignored if 'countries' is FALSE.

res

Resolution of charts; 110 (1:110m), 50 (1:50m), 10 (1:10m). Default is low. The higher the resolution, the longer the plot takes to appear.

...

Additional ggplot2::aes parameters

Value

Returns ggplot2 object that can be printed directly or have new layers added.

See Also

aes

Examples

## Not run: 
# Build map with white land areas, thin black borders
tracking_chart(color = "black", size = 0.1, fill = "white")

# 50nm resolution, no states
tracking_chart(res = 50, states = FALSE, color = "black", size = 0.1,
       fill = "white")

# 50nm resolution, coastlines only
tracking_chart(countries = FALSE, res = 50, color = "black", size = 0.1,
       fill = "white")

# Adding and modifying with ggplot functions
tracking_chart(color = "black", size = 0.1, fill = "white") +
  ggplot2::labs(x = "Lon", y = "Lat", title = "Base Tracking Chart")

## End(Not run)

twoal

Description

Atlantic Tropical Weather Outlook

Usage

twoal()

Details

This function parses the latest xml tropical weather outlook for the Atlantic ocean. The core data is located in the 'channel$item' element where 'title', 'description' and 'pubDate' reside. 'link' is also available to point to the NHC website.


twoep

Description

East Pacific Tropical Weather Outlook

Usage

twoep()

Details

This function parses the latest xml tropical weather outlook for the east Pacific. The core data is located in the 'channel$item' element where 'title', 'description' and 'pubDate' reside. 'link' is also available to point to the NHC website.