Description Usage Arguments Details Examples
Decodes and returns a table of processed METAR data allowing for easier analysis.
1 | parse_METAR(metar, out_format = "data.frame")
|
metar |
A single METAR string or a vector containing METAR strings. |
out_format |
One of the following: list returns a list with data from each METAR string as a separate list element, data.frame returns the data in a data.frame with one row per METAR reading, data.table (requires data.table package) returns the data in a data.table with one row per METAR reading. |
The output data will contain the following columns or named sublist elements:
apt
Airport ICAO code (string).
day
Day of METAR reading (numeric).
hour
Hour of METAR reading (numeric).
min
Minute of METAR reading (numeric).
wind_hdg
Wind heading in degrees (numeric).
wind_vrb
Boolean indicating variable wind heading (boolean).
wind_speed
Wind speed (numeric).
wind_gust
Gusting wind speed (numeric).
wind_unit
Unit of wind/gust speed (string).
wind_hdg_min
Minimum value of variable wind heading range (numeric), available when wind_vrb
is TRUE
wind_hdg_max
Maximum value of variable wind heading range (numeric), available when wind_vrb
is TRUE
vsby_dist
Distance of prevailing visibility (numeric).
vsby_dir_dist_*
Distance of corresponding prevailing visibility in a certain direction (numeric).
vsby_dir_hdg_*
Direction of corresponding prevailing visibility in a certain direction (string).
rvr_rwy_*
Runway of corresponding runway visual range (string).
rvr_code_*
Code indicating whether RVR is greater than measurable maximum value (P
) or is less than measurable minimum value (M
) of corresponding runway visual range (string).
rvr_vis_*
Visibility distance of corresponding runway visual range (string).
rvr_trend_*
Trend of visibility distance change of corresponding runway visual range (string), this is either increasing U
, decreasing D
or no change N
.
wx
All weather codes (string).
skyc_*
Cloud amount of corresponding cloud layer (string), this is either few FEW
, scattered SCT
, broken BKN
, overcast OVC
or code indicating "ceiling and visibility OK" CAVOK
or no sigificant cloud NSC
.
skyl_*
Cloud height in feet of corresponding cloud layer (numeric).
skyx_*
Extra code indicating significant convective cloud of corresponding cloud layer (string), this is either cumulonimbus CB
or towering cumulus TCU
.
vv
Vertical visibility in feet (numeric) when sky is obscured.
tmp
Air temperature in degrees Celsius (numeric).
dwp
Dew point in degrees Celsius (numeric).
qnh
QNH in millibar/hectopascal (numeric).
trend
Trend forecast (string).
ws
Currently unsupported.
unhandled
Contains tokens for which a type has been identified, but was not decoded for some reason (string).
unknown
Contains tokens for which a type has not been identified (string).
1 2 3 4 5 6 7 8 9 | x <- c(
"METAR ZZZZ 010825Z 18010KT CAVOK 05/02 Q1000 NOSIG",
"METAR ZZZZ 101455Z 09008KT 050V130 9999 FEW030 09/03 Q1027 NOSIG",
"METAR ZZZZ 200525Z VRB02KT 9999 R17L/1200D FEW040 15/14 Q1024 NOSIG"
)
parse_METAR(x[1], out_format = "list")
parse_METAR(x) # Returns data.frame by default
parse_METAR(x, out_format = "data.table")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.