Title: | Detailed Meteorological Data from Stations All Over the World |
---|---|
Description: | Acquire hourly meteorological data from stations located all over the world. There is a wealth of data available, with historic weather data accessible from nearly 30,000 stations. The available data is automatically downloaded from a data repository and processed into a 'tibble' for the exact range of years requested. A relative humidity approximation is provided using the 'August-Roche-Magnus' formula, which was adapted from Alduchov and Eskridge (1996) <doi:10.1175%2F1520-0450%281996%29035%3C0601%3AIMFAOS%3E2.0.CO%3B2>. |
Authors: | Richard Iannone [aut, cre] |
Maintainer: | Richard Iannone <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.5.1 |
Built: | 2024-11-07 02:56:16 UTC |
Source: | https://github.com/rich-iannone/stationary |
Obtain one or more years of meteorological data for a particular station.
get_met_data( station_id, years = NULL, full_data = FALSE, add_fields = NULL, make_hourly = TRUE, local_file_dir = NULL )
get_met_data( station_id, years = NULL, full_data = FALSE, add_fields = NULL, make_hourly = TRUE, local_file_dir = NULL )
station_id |
A station identifier composed of the station's USAF and WBAN numbers, separated by a hyphen. |
years |
The years for which station met data will be collected. If not specified then all records for all available years will be obtained for the station. |
full_data |
Include all additional meteorological data found in the dataset's additional data section? |
add_fields |
A vector of categories for additional meteorological data to include (instead of all available categories). |
make_hourly |
Transforms data to force values to the start of each hour.
All data is bucketed by hour and all missing hours are filled with |
local_file_dir |
Path to local meteorological data files. If specified, then data files will be downloaded to and retrieved from this location and not from the remote data store. |
Returns a tibble with at least 10 variables. While times are recorded using the Universal Time Code (UTC) in the source data, they are adjusted here to local standard time for the station's locale.
A character string identifying the fixed weather station from the USAF Master Station Catalog identifier and the WBAN identifier.
A datetime value representing the observation time.
Air temperature measured in degrees Celsius. Conversions to
degrees Fahrenheit may be calculated with (temp * 9) / 5 + 32
.
The angle of wind direction, measured in a clockwise direction,
between true north and the direction from which the wind is blowing. For
example, wd = 90
indicates the wind is blowing from due east. wd = 225
indicates the wind is blowing from the south west. The minimum value is 1
,
and the maximum value is 360
.
Wind speed in meters per second. Wind speed in feet per second can
be estimated by ws * 3.28084
.
The air pressure in hectopascals relative to Mean Sea Level (MSL).
The temperature in degrees Celsius to which a given parcel of air must be cooled at constant pressure and water vapor content in order for saturation to occur.
Relative humidity, measured as a percentage, as calculated using the August-Roche-Magnus approximation.
The height above ground level of the lowest cloud cover or
other obscuring phenomena amounting to at least 5/8 sky coverage. Measured in
meters. Unlimited height (no obstruction) is denoted by the value 22000
.
The horizontal distance at which an object can be seen and
identified. Measured in meters. Values greater than 16000
are entered as
16000
(which constitutes 10 mile visibility).
## Not run: # Obtain two years of data from the # met station with the ID value of # "999999-63897" met_data <- get_met_data( station_id = "999999-63897", years = 2013:2014 ) ## End(Not run)
## Not run: # Obtain two years of data from the # met station with the ID value of # "999999-63897" met_data <- get_met_data( station_id = "999999-63897", years = 2013:2014 ) ## End(Not run)
Obtain a tibble containing information on all of the stations that have data.
get_station_metadata()
get_station_metadata()
Returns a tibble with 16 columns.
A character string that is a unique identifier for the weather station.
A character string identifying the fixed weather station from the USAF Master Station Catalog. USAF is an acronym for United States Air Force.
A character string for the fixed weather station NCDC WBAN identifier. NCDC is an acronym for National Climatic Data Center. WBAN is an acronym for Weather Bureau, Air Force and Navy.
A character string with the station name.
A character string with the two character country
code where the station is located. Not identical to country_code
.
Character string of the two character abbreviation of a US state (when applicable).
The ICAO identifier for the station.
Latitude (degrees) rounded to three decimal places.
Longitude (degrees) rounded to three decimal places.
Numeric value for the elevation as measured in meters.
The minimum value is -400 with a maximum of 8850. Elevation in feet
can be approximated by elev * 3.28084
The earliest date for which data are available.
The latest date for which data are available.
The earliest year for which data are available.
The latest year for which data are available.
The time zone name.
# Obtain a data frame with all available met stations get_station_metadata()
# Obtain a data frame with all available met stations get_station_metadata()
Get a tibble of information on which additional data fields a particular station has during a specified year range.
station_coverage( station_id, years = NULL, wide_tbl = FALSE, grouping = NULL, local_file_dir = NULL )
station_coverage( station_id, years = NULL, wide_tbl = FALSE, grouping = NULL, local_file_dir = NULL )
station_id |
A station identifier composed of the station's USAF and WBAN numbers, separated by a hyphen. |
years |
The years for which station met data will be collected. If not specified then all records for all available years will be obtained for the station. |
wide_tbl |
A wide table of a single row for the station can be generated
by setting this to |
grouping |
An option to group and summarize counts of observations by
|
local_file_dir |
Path to local meteorological data files. If specified, then data files will be downloaded to and retrieved from this location and not from the remote data store. |
A tibble.
## Not run: # Obtain a coverage report of the # additional data that the met # station with the ID value of # "999999-63897" has over a two- # year period met_data <- station_coverage( station_id = "999999-63897", years = 2013:2014 ) ## End(Not run)
## Not run: # Obtain a coverage report of the # additional data that the met # station with the ID value of # "999999-63897" has over a two- # year period met_data <- station_coverage( station_id = "999999-63897", years = 2013:2014 ) ## End(Not run)