Title: | Processing METAR Weather Reports |
---|---|
Description: | Allows to download current and historical METAR weather reports extract and parse basic parameters and present main weather information. Current reports are downloaded from Aviation Weather Center <https://aviationweather.gov/data/metar/> and historical reports from Iowa Environmental Mesonet web page of Iowa State University ASOS-AWOS-METAR <http://mesonet.agron.iastate.edu/AWOS/>. |
Authors: | Pawel Cwiek [aut, cre], David Megginson [ctb] (Author of data set with airports list https://ourairports.com/data/), Greg Thompson [ctb] (Author of data set with airports list https://weather.ral.ucar.edu/surface/stations.txt) |
Maintainer: | Pawel Cwiek <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.5.01 |
Built: | 2024-11-14 23:33:10 UTC |
Source: | https://github.com/prcwiek/pmetar |
Extract an airport ICAO code from METAR weather report.
metar_airport(x)
metar_airport(x)
x |
character vector; METAR weather report or reports. |
a character vector with an airport ICAO code.
metar_airport("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_airport("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_airport("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_airport("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
metar_airport("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_airport("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_airport("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_airport("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
Extract and parse cloud coverage information from METAR weather report.
metar_cloud_coverage(x, sep = ";")
metar_cloud_coverage(x, sep = ";")
x |
character vector; a METAR weather report or reports. |
sep |
character; comma or semicolon, used for separating decoded elements of weather conditions information. |
a character vector with cloud coverage information.
metar_cloud_coverage("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_cloud_coverage("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_cloud_coverage("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_cloud_coverage("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014") metar_cloud_coverage("KEWR 011451Z 26015KT 10SM FEW030 FEW045 BKN065 04/M07 A2977", sep = ",")
metar_cloud_coverage("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_cloud_coverage("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_cloud_coverage("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_cloud_coverage("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014") metar_cloud_coverage("KEWR 011451Z 26015KT 10SM FEW030 FEW045 BKN065 04/M07 A2977", sep = ",")
Extract a day of a month from METAR weather report.
metar_day(x)
metar_day(x)
x |
character vector; a METAR weather report or reports. |
a numeric vector with a day of a month.
metar_day("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_day("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_day("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
metar_day("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_day("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_day("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
Extract and parse information from a single METAR weather report or several reports.
metar_decode( x, metric = TRUE, altimeter = FALSE, numeric_only = FALSE, check = TRUE, sep = ";" )
metar_decode( x, metric = TRUE, altimeter = FALSE, numeric_only = FALSE, check = TRUE, sep = ";" )
x |
character vector; a single METAR weather report or |
metric |
logical; if TRUE wind speeds returned in m/s, distances in meters. |
altimeter |
logical; if FLASE pressures returned in hPa, if TRUE in mmHg. |
numeric_only |
logical; if TRUE only numeric values are returned. |
check |
logical; if TRUE the syntax of METAR reports will be checked and incorrect reports will be omitted. If FALSE, the incorrect syntax of reports can cause errors and breakdown of decoding. The default value is TRUE. |
sep |
character; comma or semicolon, used for separating decoded elements of weather conditions information. The default value is ";". |
Decoded METAR weather report consists of:
Remark: Don't use for flight planning or navigation! or Incorrect METAR report! Please check the column Original_METAR.
Airport ICAO
Day of Month
Hour (HH:mm)
Time zone
Wind speed
Wind speed unit (m/s or kn)
Gust
Gust unit (m/s or kn)
Wind shear
Wind direction (degrees)
Temperature (Celsius degrees)
Dew point (Celsius degrees)
Pressure (hPa)
Pressure unit (hPa or mmHg)
Visibility
Visibility unit (m or miles)
Cloud coverage
Weather conditions information from WX codes
Runway visibility (m or feet)
Airport Name
Longitude
Latitude
Elevation
Decode Date
Original METAR text
a tibble with decoded METAR weather report or reports.
metar_decode("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_decode("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", altimeter = TRUE, metric = FALSE) metar_decode("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_decode("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_decode("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_decode("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
metar_decode("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_decode("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", altimeter = TRUE, metric = FALSE) metar_decode("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_decode("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_decode("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_decode("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
Extracts a dew point temperature value from a METAR weather report or reports.
metar_dew_point(x, check = FALSE)
metar_dew_point(x, check = FALSE)
x |
character vector; a METAR weather report or reports. |
check |
logical; if TRUE the syntax of METAR reports will be checked. |
a numeric vector with a dew point temperature in Celsius degrees.
metar_dew_point("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_dew_point("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_dew_point("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_dew_point("METAR KEWR 010851Z 27010KT 10SM FEW030 BKN070 BKN100 BKN210 04/M03 A2969") metar_dew_point("201905121244 METAR KDCA 121244Z 05010KT 14/12 A2978 RMK P0002 T01390122")
metar_dew_point("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_dew_point("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_dew_point("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_dew_point("METAR KEWR 010851Z 27010KT 10SM FEW030 BKN070 BKN100 BKN210 04/M03 A2969") metar_dew_point("201905121244 METAR KDCA 121244Z 05010KT 14/12 A2978 RMK P0002 T01390122")
Extract a wind direction value from METAR weather report.
metar_dir(x, numeric_only = FALSE, check = FALSE)
metar_dir(x, numeric_only = FALSE, check = FALSE)
x |
character vector; a METAR weather report or reports. |
numeric_only |
logical; the default value is FALSE and information about variability will be included. If TRUE only a numeric value of direction will be returned. |
check |
logical; if TRUE the syntax of METAR reports will be checked. |
a numeric vector with a wind direction in degrees.
metar_dir("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_dir("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", numeric_only = TRUE) metar_dir("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
metar_dir("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_dir("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", numeric_only = TRUE) metar_dir("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
A current METAR weather report is downloaded from the web page of NOAA National Weather Service https://aviationweather.gov/data/metar/ based on an airport four letters ICAO code, International Civil Aviation Organization, or three letters IATA code, International Air Transport Association.
metar_get(airport = "EPWA")
metar_get(airport = "EPWA")
airport |
character; ICAO or an IATA airport code. |
a character vector with a current METAR weather report.
metar_get("EPWA") metar_get("CYUL") metar_get("MAD") metar_get("WAW")
metar_get("EPWA") metar_get("CYUL") metar_get("MAD") metar_get("WAW")
Download a set of historical METAR weather reports.
The default source is the Iowa Environmental
Mesonet web page of Iowa State University ASOS-AWOS-METAR
https://mesonet.agron.iastate.edu/AWOS/
The secondary source of METAR reports is Weather Information Service provided by Ogimet
https://www.ogimet.com/. However for this source
the requested period is limited to 31 days. METAR reports are available from
the year 2005.
metar_get_historical( airport = "EPWA", start_date = "2020-01-01", end_date = "2020-01-10", from = "iastate" )
metar_get_historical( airport = "EPWA", start_date = "2020-01-01", end_date = "2020-01-10", from = "iastate" )
airport |
character; ICAO or IATA airport code. |
start_date |
character; start date in the format YYYY-MM-DD. |
end_date |
character; end date in the format YYYY-MM-DD. |
from |
character; selection of online METAR database, |
a data frame character vectors with historical METAR weather report.
metar_get_historical("EPWA", start_date = "2017-11-20", end_date = "2017-11-25") metar_get_historical("MAD", start_date = "2015-06-01", end_date = "2015-06-02", from = "iastate") metar_get_historical("CYUL", start_date = "2016-07-01", end_date = "2016-07-05", from = "ogimet")
metar_get_historical("EPWA", start_date = "2017-11-20", end_date = "2017-11-25") metar_get_historical("MAD", start_date = "2015-06-01", end_date = "2015-06-02", from = "iastate") metar_get_historical("CYUL", start_date = "2016-07-01", end_date = "2016-07-05", from = "ogimet")
Extract a gust speed from METAR weather report.
metar_gust(x, metric = TRUE)
metar_gust(x, metric = TRUE)
x |
Input character vector; a METAR weather report or reports. |
metric |
For the default metric = TRUE a returned gust wind speed is in m/s. If it's FALSE, in knots. |
a numeric vector with a gust speed in m/s or in knots.
metar_gust("METAR EPWA 141200Z 30011G22KT 270V340 9999 -SHRA SCT007 BKN015CB 18/17 Q1011") metar_gust("CYUL 101900Z 27015G25KT 15SM DRSN SCT028 BKN090 OVC110 M04/M10 A2973 RMK") metar_gust("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
metar_gust("METAR EPWA 141200Z 30011G22KT 270V340 9999 -SHRA SCT007 BKN015CB 18/17 Q1011") metar_gust("CYUL 101900Z 27015G25KT 15SM DRSN SCT028 BKN090 OVC110 M04/M10 A2973 RMK") metar_gust("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
Extract and parse hour and minutes from METAR weather report.
metar_hour(x)
metar_hour(x)
x |
character; a METAR weather report or reports. |
a character vector with the METAR time in the format HH:mm.
metar_hour("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_hour("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_hour("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
metar_hour("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_hour("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_hour("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
Convert between IATA (International Air Transport Association) airport code to ICAO (International Civil Aviation Organization) airport code or vice versa.
metar_iata_icao(code = "WAW")
metar_iata_icao(code = "WAW")
code |
character vector; an airport ICAO four letters code or an IATA three letters code. |
a character vector with an IATA code an ICAO input code or an ICAO code an IATA input code.
metar_iata_icao("EPWA") metar_iata_icao("CYUL") metar_iata_icao("LEMD") metar_iata_icao("WAW") metar_iata_icao("FRA") metar_iata_icao("KRK")
metar_iata_icao("EPWA") metar_iata_icao("CYUL") metar_iata_icao("LEMD") metar_iata_icao("WAW") metar_iata_icao("FRA") metar_iata_icao("KRK")
Function checks METRAR reports syntax.
metar_is_correct(x, verbose = FALSE)
metar_is_correct(x, verbose = FALSE)
x |
character vector; METAR weather report or reports. |
verbose |
logical; default FALSE |
It checks:
appearance of not allowed characters: ! \ ? . , ; : * # & ' " ) and
multiple slash characters
wind speed syntax
wind direction syntax
pressure syntax
air and dew point temperature syntax
if an airport code is the first element or appear
immediately after METAR, SPECI, METAR COR ro SPECI COR.
if verbose = FALSE, TRUE if a METAR is correct, FALSE if not.
if verbose = TRUE, all incorrect METAR reports will be printed
metar_is_correct("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_is_correct("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5! SLP180") metar_is_correct("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04//M03 Q1025")
metar_is_correct("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_is_correct("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5! SLP180") metar_is_correct("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04//M03 Q1025")
Find approximated latitude, longitude and elevation of an airport according to
IATA, International Air Transport Association, or
ICAO, International Civil Aviation Organization, airport code. Two source of
information about airports are used. First the function search in the list of
airports available at
https://ourairports.com/data/
created by David Megginson.
If an airport cannot be found there, the second list of airports is searched, from
https://weather.ral.ucar.edu/surface/stations.txt
prepared by Greg Thompson from
National Weather Service NCAR/RAP.
metar_location(x = "EPWA")
metar_location(x = "EPWA")
x |
character vector; an airport ICAO four letters code or an IATA three letters code. |
a tibble with columns with an airport information as below:
ICAO code
IATA Code
Airport name
Longitude, in degress
Latitude, in degress
Elevation, above see elevel in meters
Source of information
metar_location("EPWA") metar_location("CYUL") metar_location("LEMD") metar_location("NCRK") metar_location("WAW") metar_location("FRA")
metar_location("EPWA") metar_location("CYUL") metar_location("LEMD") metar_location("NCRK") metar_location("WAW") metar_location("FRA")
Extract and parse an air pressure value from METAR weather report.
metar_pressure(x, altimeter = FALSE, check = FALSE)
metar_pressure(x, altimeter = FALSE, check = FALSE)
x |
character vector; a METAR weather report or reports. |
altimeter |
boolean; if FALSE, the default value, a pressure is returned in hPa, if TRUE a pressure is returned in inHg (inch of mercury). |
check |
logical; if TRUE the syntax of METAR reports will be checked. |
a numeric vector with air pressure in inHg or hPa.
metar_pressure("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_pressure("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_pressure("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG= NOSIG=")
metar_pressure("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_pressure("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_pressure("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG= NOSIG=")
Extract, parse and print information from a single METAR weather report.
metar_print( x, metric = TRUE, altimeter = FALSE, numeric_only = FALSE, check = TRUE, sep = ";" )
metar_print( x, metric = TRUE, altimeter = FALSE, numeric_only = FALSE, check = TRUE, sep = ";" )
x |
character vector; a single METAR weather report. |
metric |
logical; if TRUE wind speeds returned in m/s, distances in meters. |
altimeter |
logical; if FLASE pressures returned in hPa, if TRUE in mmHg. |
numeric_only |
logical; if TRUE only numeric values are returned. |
check |
logical; if TRUE the syntax of METAR reports will be checked and incorrect reports will be omitted. If FALSE, the incorrect syntax of reports can cause errors and breakdown of decoding. The default value is TRUE. |
sep |
character; comma or semicolon, used for separating decoded elements of weather conditions information. The default value is ";". |
Function prints below decoded METAR weather report elements:
Remark: Don't use for flight planning or navigation! or Incorrect METAR report! Please check the column Original_METAR.
Airport ICAO
Day of Month
Hour (HH:mm)
Time zone
Wind speed (m/s or kn)
Gust (m/s or kn)
Wind shear
Wind direction (degrees)
Temperature (Celsius degrees)
Dew point (Celsius degrees)
Pressure (hPa or mmHg)
Pressure unit (hPa or mmHg)
Visibility (m or miles)
Cloud coverage
Weather conditions information from WX codes
Runway visibility (m or feet)
Airport Name
Longitude
Latitude
Elevation
Decode Date
Original METAR text
metar_print("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_print("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", altimeter = TRUE, metric = FALSE) metar_print("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_print("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_print("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_print("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
metar_print("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_print("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", altimeter = TRUE, metric = FALSE) metar_print("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_print("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005", altimeter = TRUE) metar_print("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_print("202103251800 METAR COR NFTL 251800Z 00000KT SCT017TCU BKN290 25/25 Q1014")
Function extracts runway(s) visibility value(s) from METAR weather report.
metar_rwy_visibility(x, metric = TRUE, sep = ";")
metar_rwy_visibility(x, metric = TRUE, sep = ";")
x |
Input character vector |
metric |
logical; if TRUE, the default value, runway(s) visibility is returned in meters, if FALSE then in feet. |
sep |
character; comma or semicolon, used for separating decoded elements of weather conditions information. |
A numeric vector. A visibility in m/s or feet.
metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25L/1200N R02/P1500 07/06 Q1017") metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25R/0600FT R02/P1500 07/06 Q1017") metar_rwy_visibility("EDDF 220520Z 26003KT 0500 R25R/0400N R18/0650V1100N FZFG", sep = ",") metar_rwy_visibility("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25L/1200N R26R/1000 R36/4000FT/D -SN")
metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25L/1200N R02/P1500 07/06 Q1017") metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25R/0600FT R02/P1500 07/06 Q1017") metar_rwy_visibility("EDDF 220520Z 26003KT 0500 R25R/0400N R18/0650V1100N FZFG", sep = ",") metar_rwy_visibility("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D -SN M05/M08 A2992") metar_rwy_visibility("EBBR 040220Z VRB01KT 0150 R25L/1200N R26R/1000 R36/4000FT/D -SN")
Extract a wind speed value from METAR weather report.
metar_speed(x, metric = TRUE, check = FALSE)
metar_speed(x, metric = TRUE, check = FALSE)
x |
character vector; METAR weather report or reports. |
metric |
logical; the default value is TRUE and a returned wind speed is in m/s; if it's FALSE then in knots. |
check |
logical; the default value is FALSE, if METAR report fails the syntax check, NA value will be returned. If FALSE, zero values will be returned for METAR reports with incorrect syntax. |
a numeric vector. A wind speed in m/s or in knots.
metar_speed("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_speed("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", metric = FALSE) metar_speed("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG= NOSIG=") metar_speed("EPKK 141730Z VRB01KT CAVOK 21/16 Q1028")
metar_speed("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_speed("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", metric = FALSE) metar_speed("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG= NOSIG=") metar_speed("EPKK 141730Z VRB01KT CAVOK 21/16 Q1028")
Extract a temperature value from METAR weather report.
metar_temp(x, check = FALSE)
metar_temp(x, check = FALSE)
x |
character vector; a METAR weather report or reports. |
check |
logical; if TRUE the syntax of METAR reports will be checked. |
a numeric vector with temperature in degrees Celsius.
metar_temp("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_temp("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_temp("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG=") metar_temp("METAR KEWR 010851Z 27010KT 10SM BKN210 04/M03 A2969 RMK SLP054 T00391033 52012")
metar_temp("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_temp("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_temp("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG=") metar_temp("METAR KEWR 010851Z 27010KT 10SM BKN210 04/M03 A2969 RMK SLP054 T00391033 52012")
Extract a time zone of METAR weather report.
metar_time_zone(x)
metar_time_zone(x)
x |
character; a METAR weather report or reports. |
a character vector with time zone.
metar_time_zone("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_time_zone("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_time_zone("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
metar_time_zone("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_time_zone("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_time_zone("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025")
Extract and parse visibility information from METAR weather report.
metar_visibility(x, metric = TRUE, numeric_only = FALSE)
metar_visibility(x, metric = TRUE, numeric_only = FALSE)
x |
character vector; a METAR weather report or reports. |
metric |
For the default metric = TRUE returned distances are in meters. If it's FALSE, in miles. |
numeric_only |
logical; if TRUE only a numeric value will be returned |
a numeric vector with visibility information, in meters or miles.
metar_visibility("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_visibility("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_visibility("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_visibility("KBLV 011657Z AUTO 25015G30KT 210V290 3/8SM R32L/1000FT FG BKN005 01/M01 A2984")
metar_visibility("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG") metar_visibility("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180") metar_visibility("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025") metar_visibility("KBLV 011657Z AUTO 25015G30KT 210V290 3/8SM R32L/1000FT FG BKN005 01/M01 A2984")
Function extracts information about wind shear from METAR weather report.
metar_windshear(x, metric = TRUE)
metar_windshear(x, metric = TRUE)
x |
character vector; METAR weather report or reports. |
metric |
For the default metric = TRUE a returned wind speed is in m/s. If it's FALSE, in knots. |
A character vector with information about wind shear.
metar_windshear("METAR VHHH 180800Z 12009KT 060V150 FEW010 SCT045 22/18 Q1012 WS R07R") metar_windshear("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D M05/M08 A2992 WS RWY36") metar_windshear("KPIT 091730Z 091818 22020KT 3SM -SHRA BKN020 WS015/30045KT", metric = FALSE)
metar_windshear("METAR VHHH 180800Z 12009KT 060V150 FEW010 SCT045 22/18 Q1012 WS R07R") metar_windshear("CYWG 172000Z 30015G25KT 3/4SM R36/4000FT/D M05/M08 A2992 WS RWY36") metar_windshear("KPIT 091730Z 091818 22020KT 3SM -SHRA BKN020 WS015/30045KT", metric = FALSE)
Extract and parse weather conditions information METAR WX codes.
metar_wx_codes(x, sep = ";")
metar_wx_codes(x, sep = ";")
x |
Input character vector |
sep |
character; comma or semicolon, used for separating decoded elements of weather conditions information. |
A character vector. with METAR WX codes.
metar_wx_codes("METAR EPWA 132100Z 29006KT 260V320 8000 SHRA SCT009 BKN025CB 18/17 Q1011") metar_wx_codes("CYUL 101900Z 27015G25KT 15SM DRSN SCT028 BKN090 OVC110 M04/M10 A2973 RMK") metar_wx_codes("METAR EPKK 200300Z 23014KT 9999 -SHSN SCT009CB BKN012 01/M00 Q1008", sep = ",") metar_wx_codes("202001190045 METAR KEWR 190045Z 19008KT 4SM -RA -PL BR FEW007 01/M01 A2995")
metar_wx_codes("METAR EPWA 132100Z 29006KT 260V320 8000 SHRA SCT009 BKN025CB 18/17 Q1011") metar_wx_codes("CYUL 101900Z 27015G25KT 15SM DRSN SCT028 BKN090 OVC110 M04/M10 A2973 RMK") metar_wx_codes("METAR EPKK 200300Z 23014KT 9999 -SHSN SCT009CB BKN012 01/M00 Q1008", sep = ",") metar_wx_codes("202001190045 METAR KEWR 190045Z 19008KT 4SM -RA -PL BR FEW007 01/M01 A2995")
A dataset containing the explanations for METAR WX weather conditions codes. The variables are as follows:
A data frame with 39 rows and 3 variables
Type; type of the codes
Abbreviation; the codes which are included in METAR reports
Meaning; description of the codes
https://en.wikipedia.org/wiki/METAR#METAR_WX_codes
A character vector containing the list of airports.
A character vector with the length of 10113 items
From https://www.aviationweather.gov/ A data set is in the public domain according to https://www.weather.gov/disclaimer
Greg Thompson from National Weather Service NCAR/RAP, NOAA National Weather Service
https://weather.ral.ucar.edu/surface/stations.txt,
#' A dataset containing the list of airports
A data frame with 28935 rows and 12 variables
From https://ourairports.com A data set is in the public domain according to https://ourairports.com/data/
id; identification number
ident; airport ICAO code
type; airport type
name; airport name
latitude_deg; geographical latitude
longitude_deg; geographical longitude
elevation_ft; airport elevation in feet
elevation_m; airport elevation in meters
iso_country; ISO country code
iso_region; ISO region code
municipality;
iata_code; airport IATA code
David Megginson