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-10-28 06:07:42 UTC |
Source: | https://github.com/ropensci/rrricanes |
Retrieve list of probability stations based in the Atlantic basin from the NHC. To be used in tandem with 'wndprb' products.
al_prblty_stations()
al_prblty_stations()
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.
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.
Build tracking chart centered on Atlantic Basin.
al_tracking_chart(...)
al_tracking_chart(...)
... |
Additional parameters for tracking_chart and ggplot2 |
ggplot2 object centered on Atlantic basin.
## 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)
## 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)
Retrieve list of probability stations based in the central Pacific from the NHC. To be used in tandem with 'wndprb' products.
cp_prblty_stations()
cp_prblty_stations()
Strike probabilities for Hurricane Katrina (AL122005)
df.al_12_2005_prblty
df.al_12_2005_prblty
An object of class tbl_df
(inherits from tbl
, data.frame
) with 937 rows and 10 columns.
http://www.nhc.noaa.gov/archive/2005/KATRINA.shtml?
Forecast/Advisory and Wind Speed Probabilities for Hurricane Sandy (AL182012)
df.al_18_2012
df.al_18_2012
An object of class list
of length 2.
http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?
Forecast/Advisory for Hurricane Sandy (AL182012)
df.al_18_2012_fstadv
df.al_18_2012_fstadv
An object of class tbl_df
(inherits from tbl
, data.frame
) with 31 rows and 117 columns.
http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?
Wind speed probabilities for Hurricane Sandy (AL182012)
df.al_18_2012_wndprb
df.al_18_2012_wndprb
An object of class tbl_df
(inherits from tbl
, data.frame
) with 2227 rows and 18 columns.
http://www.nhc.noaa.gov/archive/2012/SANDY.shtml?
Atlantic cyclones for 2012
df.al_2012
df.al_2012
An object of class tbl_df
(inherits from tbl
, data.frame
) with 19 rows and 4 columns.
http://www.nhc.noaa.gov/archive/2012/
GIS advisory dataset for Hurricane Sandy Adv 18
df.gis_adv
df.gis_adv
An object of class list
of length 4.
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)
df.gis_storm_surge
df.gis_storm_surge
An object of class list
of length 1.
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)
df.gis_wind_radii
df.gis_wind_radii
An object of class list
of length 2.
GIS wind speed probabilities for Hurricane Sandy (AL182012)
df.gis_wsp
df.gis_wsp
An object of class list
of length 3.
http://www.nhc.noaa.gov/gis/archive_wsp.php
Retrieve list of probability stations based in the eastern Pacific from the NHC. To be used in tandem with 'wndprb' products.
ep_prblty_stations()
ep_prblty_stations()
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.
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.
Build tracking chart centered on northeast Pacific Basin.
ep_tracking_chart(...)
ep_tracking_chart(...)
... |
Additional parameters for ggplot2 |
ggplot2 object centered on northeast Pacific basin.
## 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)
## 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)
Return dataframe of discussion data.
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Advisory Number
Date of advisory issuance
ID of cyclone
Text content of product
get_discus(links)
get_discus(links)
links |
URL to storm's archive page. |
## 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)
## 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)
Return dataframe of forecast/advisory data.
get_fstadv(links)
get_fstadv(links)
links |
URL to storms' archive page. |
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:
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.)
Wind radius data is not included 96 and 120 hour forecast periods.
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.
Classification of cyclone
Name of cyclone
Advisory number
Date and time of advisory
Unique identifier of cyclone
Latitude of cyclone center
Longitude of cyclone center
Maximum sustained one-minute winds in knots
Maximum sustained one-minute gusts in knots
Minimum central pressure in millibars
Position accuracy of cyclone in nautical miles
Compass angle of forward motion
Forward speed in miles per hour
Size of eye in nautical miles
Radius of >=64kt winds in northeast quadrant
Radius of >=64kt winds in southeast quadrant
Radius of >=64kt winds in southwest quadrant
Radius of >=64kt winds in northwest quadrant
Radius of >=50kt winds in northeast quadrant
Radius of >=50kt winds in southeast quadrant
Radius of >=50kt winds in southwest quadrant
Radius of >=50kt winds in northwest quadrant
Radius of >=34kt winds in northwest quadrant
Radius of >=34kt winds in southeast quadrant
Radius of >=34kt winds in southwest quadrant
Radius of >=34kt winds in northwest quadrant
Forecast valid date
Forecast latitude in 'n' hours
Forecast longitude in 'n' hours
Forecast maximum wind in 'n' hours
Forecast maximum gust in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Forecast wind radius in 'n' hours
Radius of 12ft seas in northeast quadrant
Radius of 12ft seas in southeast quadrant
Radius of 12ft seas in southwest quadrant
Radius of 12ft seas in northwest quadrant
tidy_adv
, tidy_wr
,
tidy_fcst
, tidy_fcst_wr
## 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)
## 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)
Retrieve text products from the National Hurricane Center's FTP server. Not all products may exist for certain storms.
get_ftp_storm_data( stormid, products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb") )
get_ftp_storm_data( stormid, products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb") )
stormid |
A six-character alphanumeric string formatted as AABBCCCC where
|
products |
Products to retrieve; discus, fstadv, posest, public, prblty, update, and windprb. |
Return dataframe of position estimate data.
get_posest(links)
get_posest(links)
links |
URL to storm's archive page. |
This product was discontinued after the 2013 hurricane season and is
now included in the Tropical Cyclone Update product (update
).
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Date of advisory issuance
Text content of product
Strike probabilities; the chances of the center of a cyclone passing within 65 nautical miles of a location.
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Advisory Number
Date of advisory issuance
Location for which the probability statistics rely
Probability of a strike within the next 12 hours
Probability of a strike between 12 and 24 hours
Probability of a strike between 24 and 36 hours
Probability of a strike between 36 and 48 hours
Probability of a strike between 48 and 72 hours
get_prblty(links)
get_prblty(links)
links |
URL to storm's archive page. |
get_product_links
get_product_links(links, product)
get_product_links(links, product)
links |
data frame containing Link that lists storm page urls |
product |
Data product |
vector of links for specific storm and product
Return dataframe of public advisory data.
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Advisory Number
Date of advisory issuance
Unique ID of the cyclone
Text content of product
get_public(links)
get_public(links)
links |
URL to storm's archive page. |
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.
get_serial_numbers()
get_serial_numbers()
Retrieve data from products.
get_storm_data( links, products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb") )
get_storm_data( links, products = c("discus", "fstadv", "posest", "public", "prblty", "update", "wndprb") )
links |
to storm's archive page. |
products |
Products to retrieve; discus, fstadv, posest, public, prblty, update, and windprb. |
get_storm_data
is a wrapper function to make it more
convenient to access the various storm products.
Types of products:
Storm Discussions. This is technical information on the cyclone such as satellite presentation, forecast model evaluation, etc.
Forecast/Advisory. These products contain the meat of an advisory package. Current storm information is available as well as structural design and forecast data.
Position Estimate. Issued generally when a storm is threatening; provides a brief update on location and winds.
Public Advisory. Issued for public knowledge; more often for Atlantic than East Pacific storms. Contains general information.
Strike Probability. Discontinued after the 2005 hurricane season, strike probabilities list the chances of x-force winds in a particular city.
Cyclone Update. Generally issued when a significant change occurs in the cyclone.
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.
list of dataframes for each of the products.
## 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)
## 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_track
get_storm_track( serials, source = c("ACTIVE", "last3years", "since1980", "ALL", "EP", "NA", "NI", "SA", "SI", "SP", "WP") )
get_storm_track( serials, source = c("ACTIVE", "last3years", "since1980", "ALL", "EP", "NA", "NI", "SA", "SI", "SP", "WP") )
serials |
vector of serial numbers for a storm |
source |
Short name for source, allows use of smaller file. |
data frame of storm track
Returns storms and product link.
get_storms(years = format(Sys.Date(), "%Y"), basins = c("AL", "EP"))
get_storms(years = format(Sys.Date(), "%Y"), basins = c("AL", "EP"))
years |
numeric or vector, four digits (%Y format) |
basins |
One or both of c("AL", "EP") |
A 4xN dataframe
Numeric, four-digit year of the storm
Character, name of storm mixed-case
AL (Atlantic) or EP (East Pacific)
URL to storms' product pages
By default returns all storms for the current year. If no storms have developed will return an empty dataframe.
Dataframe of storms.
http://www.nhc.noaa.gov/archive/2016/
# 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)
# 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)
Return dataframe of cyclone update data.
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Date of advisory issuance
Unique ID of cyclone
Text content of product
get_update(links)
get_update(links)
links |
URL to storm's archive page. |
Get contents from URL
get_url_contents(links)
get_url_contents(links)
links |
character vector of URLs to download |
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.
Return dataframe of wind speed probability data.
get_wndprb(links)
get_wndprb(links)
links |
URL to storm's archive page. |
Wind Speed Probability product replaced Strike Probabilities product after the 2005 hurricane season. These products may not be issued for every advisory/cyclone.
Classification of storm, e.g., Tropical Storm, Hurricane, etc.
Name of storm
Advisory Number
Date of advisory issuance
Minimum wind speed for which probabilities reference
Probability of sustained 'Wind' within 12 hours
Probability of sustained 'Wind' within 24 hours
Cumulative probability through 24 hours
Probability of sustained 'Wind' within 36 hours
Cumulative probability through 36 hours
Probability of sustained 'Wind' within 48 hours
Cumulative probability through 48 hours
Probability of sustained 'Wind' within 72 hours
Cumulative probability through 72 hours
Probability of sustained 'Wind' within 96 hours
Cumulative probability through 96 hours
Probability of sustained 'Wind' within 120 hours
Cumulative probability through 120 hours
Data frame of wndprb information
http://www.nhc.noaa.gov/about/pdf/About_Windspeed_Probabilities.pdf
Advisory Forecast Track, Cone of Uncertainty, and Watches/Warnings
gis_advisory(key, advisory = as.character())
gis_advisory(key, advisory = as.character())
key |
Key of storm (i.e., AL012008, EP092015) |
advisory |
Advisory number. If NULL, all advisories are returned. Intermediate advisories are acceptable. |
Return link to breakpoints shapefile by year
gis_breakpoints()
gis_breakpoints()
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.
Get GIS data for storm.
gis_download(url, ...)
gis_download(url, ...)
url |
link to GIS dataset to download. |
... |
additional parameters for simple features |
Latest GIS datasets for active cyclones
gis_latest(basins = c("AL", "EP"), ...)
gis_latest(basins = c("AL", "EP"), ...)
basins |
AL and/or EP. |
... |
additional parameters for sf::st_read() |
Probabilistic Storm Surge
gis_prob_storm_surge(key, products, datetime = NULL)
gis_prob_storm_surge(key, products, datetime = NULL)
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. |
Probabilistic Storm Surge Forecasts
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.
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.
Tropical Cyclone Storm Surge Probabilities
## 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)
## 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)
Potential Storm Surge Flooding (Inundation)
gis_storm_surge_flood( key, advisory = as.numeric(), products = c("inundation", "tidalmask") )
gis_storm_surge_flood( key, advisory = as.numeric(), products = c("inundation", "tidalmask") )
key |
Key of storm (i.e., AL012008, EP092015) |
advisory |
Advisory number. |
products |
indundation or tidalmask |
Advisory Wind Field and Forecast Wind Radii
gis_windfield(key, advisory = as.character())
gis_windfield(key, advisory = as.character())
key |
Key of storm (i.e., AL012008, EP092015) |
advisory |
Advisory number. If NULL, all advisories are returned. Intermediate advisories are acceptable. |
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.
Wind Speed Probabilities
gis_wsp(datetime, res = c(5, 0.5, 0.1))
gis_wsp(datetime, res = c(5, 0.5, 0.1))
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. |
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.
## 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)
## 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)
convert knots (kt) to miles per hour (mph)
knots_to_mph(x)
knots_to_mph(x)
x |
wind speed in knots |
x in miles per hour
knots_to_mph(65)
knots_to_mph(65)
convert millibars (mb) to inches of mercury (in)
mb_to_in(x)
mb_to_in(x)
x |
barometric pressure in mb |
x in inches
mb_to_in(999)
mb_to_in(999)
Convert nautical miles to survey miles
nm_to_sm(x)
nm_to_sm(x)
x |
Nautical miles |
nm_to_sm(c(50, 100, 150))
nm_to_sm(c(50, 100, 150))
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.
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
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.
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.
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.
Return category of tropical cyclone based on wind. Saffir- Simpson Hurricane Scale does not apply to non-tropical cyclones.
saffir(x)
saffir(x)
x |
Vector of wind speed values. |
saffir(c(32, 45, 70, 90, 110, 125, 140))
saffir(c(32, 45, 70, 90, 110, 125, 140))
Convert shapefile object to dataframe
shp_to_df(obj)
shp_to_df(obj)
obj |
Spatial object to convert. See details. |
Takes a SpatialLinesDataFrame object or SpatialPolygonsDataFrame object and converts into a dataframe that can be plotted in ggplot2.
Convert Status abbreviation to string
status_abbr_to_str(x)
status_abbr_to_str(x)
x |
character vector of status abbreviations |
Status abbreviations
Disturbance (of any intensity)
Extratropical cyclone (of any intensity)
Tropical cyclone of hurricane intensity (> 64 knots)
A low that is neither a tropical cyclone, a subtropical cyclone, nor an extratropical cyclone (of any intensity)
Subtropical cyclone of subtropical depression intensity (< 34 knots)
Subtropical cyclone of subtropical storm intensity (> 34 knots)
Tropical cyclone of tropical depression intensity (< 34 knots)
Tropical cyclone of tropical storm intensity (34-63 knots)
Tropical Wave (of any intensity)
character vector of strings
http://www.aoml.noaa.gov/hrd/hurdat/newhurdat-format.pdf
# Extratropical Cyclone status_abbr_to_str("EX") # Hurricane status_abbr_to_str("HU")
# Extratropical Cyclone status_abbr_to_str("EX") # Hurricane status_abbr_to_str("HU")
Tidy current details of a fstadv dataframe object.
tidy_adv
will be deprecated in 0.2.2
tidy_adv(df) tidy_fstadv(df)
tidy_adv(df) tidy_fstadv(df)
df |
fstadv dataframe object |
Returns current data only of a fstadv dataframe. Use Key, Adv and Date to join with other tidy dataframes.
Unique identifier of cyclone
Advisory number
Date and time of advisory
Classification of cyclone
Name of cyclone
Latitude of cyclone center
Longitude of cyclone center
Maximum sustained one-minute winds in knots
Maximum sustained one-minute gusts in knots
Minimum central pressure in millibars
Position accuracy of cyclone in nautical miles
Compass angle of forward motion
Forward speed in miles per hour
Size of eye in nautical miles
Radius of 12ft seas in northeast quadrant
Radius of 12ft seas in southeast quadrant
Radius of 12ft seas in southwest quadrant
Radius of 12ft seas in northwest quadrant
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_adv() ## End(Not run)
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_adv() ## End(Not run)
Tidy forecasts of a fstadv dataframe object.
tidy_fcst(df)
tidy_fcst(df)
df |
fstadv dataframe object |
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.
Unique identifier of cyclone
Advisory number
Date and time of advisory
Forecast date and time in UTC
Forecast latitude
Forecast Longitude
Forecast wind in knots
Forecast gust in knots
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_fcst() ## End(Not run)
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_fcst() ## End(Not run)
Tidy forecast wind radii of a fstadv dataframe object
tidy_fcst_wr(df)
tidy_fcst_wr(df)
df |
fstadv dataframe object |
Tidies forecast wind radius for each forecast position. Complete cases only (by quadrants). Use Key, Adv and Date to join with other tidy dataframes.
Unique identifier of cyclone
Advisory number
Date and time of advisory
Forecast date and time in UTC
Minimum sustained wind field for quadrants
Radius in nautical miles for northeast quadrant
Radius in nautical miles for southeast quadrant
Radius in nautical miles for southwest quadrant
Radius in nautical miles for northwest quadrant
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_fcst_wr() ## End(Not run)
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_fcst_wr() ## End(Not run)
Tidy current wind radius of a fstadv dataframe object.
tidy_wr(df)
tidy_wr(df)
df |
fstadv dataframe object |
Returns tidy dataframe of current wind radius values for a cyclone. Returns only complete.cases (based on quadrants).
Unique identifier of cyclone
Advisory number
Date and time of advisory
Minimum wind speed expected
Radius of 'Windfield' in the northeast quadrant
Radius of 'Windfield' in the southeast quadrant
Radius of 'Windfield' in the southwest quadrant
Radius of 'Windfield' in the northwest quadrant
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_wr() ## End(Not run)
## Not run: get_fstadv("http://www.nhc.noaa.gov/archive/1998/1998ALEXadv.html") |> tidy_wr() ## End(Not run)
Build base tracking chart using ggplot
tracking_chart(countries = TRUE, states = TRUE, res = 110, ...)
tracking_chart(countries = TRUE, states = TRUE, res = 110, ...)
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 |
Returns ggplot2 object that can be printed directly or have new layers added.
## 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)
## 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)
Atlantic Tropical Weather Outlook
twoal()
twoal()
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.
East Pacific Tropical Weather Outlook
twoep()
twoep()
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.