Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


hydroscoper (version 0.1.0)

get_coords: Get station's coordinates

Description

get_coords returns a dataframe with the coordinates and elevation from a station in a database of Hydroscope.

Usage

get_coords(subdomain = c("kyy", "ypaat", "emy"), stationID)

Arguments

subdomain

One of the subdomains of hydroscope.gr

stationID

A station ID

Value

If subdomain is one of "kyy" (Ministry of Environment and Energy), "ypaat" (Ministry of Rural Development and Food), "emy" (National Meteorological Service) and stationID is not NULL, returns a dataframe with station's coordinates and elevation from the corresponding database of hydroscope.gr. Otherwise gives an error message.

If the station ID does not exist in the database, or the url from hydroscope could not parsed, returns a dataframe with NA values.

The dataframe columns are:

StationID

The station's ID from the database

Long

The station's longitude in decimal degrees, ETRS89

Lat

The station's latitude in decimal degrees, ETRS89

Elevation

The station's altitude, meters above sea level

References

European Terrestrial Reference System 1989 (ETRS), http://bit.ly/2kJwFuf

Stations' data are retrieved from the Hydroscope's databases:

Examples

Run this code
# NOT RUN {
# get station 200171 coords from the Greek Ministry of Environment and Energy
get_coords("kyy", 200171)

# get station data from the Greek National Meteorological Service
get_coords("emy", 20035)

# }
# NOT RUN {
get_coords("emy")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab