Learn R Programming

pmetar

Package allows to download current and historical METAR weather reports and decode basic parameters.

METAR weather reports source web pages

The main functions scrap data from the below web pages:

  1. For current reports, the function metar_get:
  1. For historical reports, the function metar_get_historical:

Please take into consideration that the http://www.ogimet.com/ can block too frequent requests for data due to the server overload.

Locations of METAR stations

Information about the locations of the METAR stations / ariports were taken from two sources:

  1. The first choice is the file from https://ourairports.com/data/ created by David Megginson.
  2. If information can’t be found, the second source is searched, the ADDS Station Table prepared by Greg Thompson NCAR/RAP. The file is available on the web page of Aviation Weather Center https://weather.ral.ucar.edu/surface/stations.txt from NOAA National Weather Service https://www.weather.gov/

The both above data sources are in the public domain.

Package pmetar is for extracting and parsing information, from current or historical METAR reports, only.

Don’t use it for flight planning or navigation!

Installation

CRAN version

install.packages("pmetar")

Get the development version 0.5.1 from github:

# install.packages("devtools")
devtools::install_github("prcwiek/pmetar")
library('pmetar')

Contributors

Copy Link

Version

Install

install.packages('pmetar')

Monthly Downloads

369

Version

0.5.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Pawel Cwiek

Last Published

March 2nd, 2025

Functions in pmetar (0.5.1)

metar_is_correct

Check if METAR report is correct.
metar_visibility

Get visibility information.
metar_windshear

Get wind shear information.
metar_print

Decode and print METAR report
metar_location

Get approximated airport location.
mst

Secondary airport list
metar_wx_codes

Get weather conditions information.
metar_get_historical

Get historical METAR reports.
metar_dir

Get wind direction.
metar_gust

Get gust speed.
metar_airport

Get airport ICAO, International Civil Aviation Organization, code.
metar_get

Get a current METAR report for an airport.
metarWXcodes

METAR WX weather conditions codes
metar_decode

Decode METAR report.
metar_day

Get day of month.
metar_dew_point

Get dew point temperature.
metar_cloud_coverage

Get cloud coverage information.
metar_time_zone

Get time zone.
metar_rwy_visibility

Get runway(s) visibility.
metar_pressure

Get atmospheric pressure.
metar_hour

Get hour and minutes.
metar_iata_icao

Convert between IATA (International Air Transport Association) airport code to ICAO (International Civil Aviation Organization) airport code or vice versa.
metar_temp

Get temperature.
metar_speed

Get wind speed
ourairports

Main list of airports
pmetar-package

pmetar: Processing METAR Weather Reports