The riem package allows to get weather data from ASOS stations (airports) via the awesome website of the Iowa Environment Mesonet.

Installation

Install the package with:

Or install the development version using devtools with:

library("devtools")
install_github("ropenscilabs/riem")

Get measures for one station

Possible variables are (copied from here, see also the ASOS user guide)

  • station: three or four character site identifier

  • valid: timestamp of the observation (UTC)

  • tmpf: Air Temperature in Fahrenheit, typically @ 2 meters

  • dwpf: Dew Point Temperature in Fahrenheit, typically @ 2 meters

  • relh: Relative Humidity in %

  • drct: Wind Direction in degrees from north

  • sknt: Wind Speed in knots

  • p01i: One hour precipitation for the period from the observation time to the time of the previous hourly precipitation reset. This varies slightly by site. Values are in inches. This value may or may not contain frozen precipitation melted by some device on the sensor or estimated by some other means. Unfortunately, we do not know of an authoritative database denoting which station has which sensor.

  • alti: Pressure altimeter in inches

  • mslp: Sea Level Pressure in millibar

  • vsby: Visibility in miles

  • gust: Wind Gust in knots

  • skyc1: Sky Level 1 Coverage

  • skyc2: Sky Level 2 Coverage

  • skyc3: Sky Level 3 Coverage

  • skyc4: Sky Level 4 Coverage

  • skyl1: Sky Level 1 Altitude in feet

  • skyl2: Sky Level 2 Altitude in feet

  • skyl3: Sky Level 3 Altitude in feet

  • skyl4: Sky Level 4 Altitude in feet

  • presentwx: Present Weather Codes (space seperated), see e.g. this manual for further explanations.

  • feel: Apparent Temperature (Wind Chill or Heat Index) in degF

  • ice_accretion_1hr: Ice Accretion over 1 Hour in inch

  • ice_accretion_3hr: Ice Accretion over 3 Hour in inch

  • ice_accretion_6hr: Ice Accretion over 6 Hour in inch

  • relh: Relative Humidity in %

  • metar: unprocessed reported observation in METAR format

  • peak_wind_gust: Wind gust in knots from the METAR PK WND remark, this value may be different than the value found in the gust field. The gust field is derived from the standard METAR wind report.

  • peak_wind_drct: The wind direction in degrees North denoted in the METAR PK WND remark.

  • peak_wind_time: The timestamp of the PK WND value in the same timezone as the valid field and controlled by the tz parameter.

For conversion of wind speed or temperature into other units, see this package.