scrape_header: scrape_name_header

Description Usage Arguments Details Value

View source: R/scrapers.R

Description

Extract values from products header.

Usage

1
scrape_header(contents, ret = NULL)

Arguments

contents

text content of product

ret

Choose either status, name, adv or date to return.

status

status of cyclone (Hurricane, Tropical Storm, Subtropical Storm...)

name

return name of storm

adv

return advisory number

date

Date/Time of product issuance.

key

Key, unique identifier for each storm. May not be available in some packages

Details

A typical header will look like this:

1
2
3
4
5
6
  ZCZC MIATCPAT1 ALL
  TTAA00 KNHC DDHHMM
  BULLETIN
  TROPICAL DEPRESSION ONE ADVISORY NUMBER   1
  NATIONAL WEATHER SERVICE MIAMI FL
  11 AM AST MON JUL 27 1998

The first three lines are irrelevant. This function is only concerned about returning Status, Name, Advisory Number, and Date/Time values.

Value

Returns integer advisory number, character status or name, or date in %F %R (yyyy-mm-dd hh:mm) format, UTC time zone.


timtrice/Hurricanes documentation built on April 6, 2018, 3:23 p.m.