Learn R Programming

hydroscoper (version 0.1.0)

get_timeseries: Get time series corresponding to a station

Description

get_timeseries returns a dataframe with the available time series from a station in a database of Hydroscope.

Usage

get_timeseries(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) or "emy" (National Meteorological Service) and stationID is not NULL, returns a dataframe with time series data from the corresponding station and 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:

TimeSeriesID

The time series ID from the database

Name

The time series name

Variable

The time series variable type

TimeStep

The timestep of time series

Unit

The units of the time series

Remarks

Remarks from Hydroscope

Instrument

The instrument ID

StartDate

The starting date of time series values

EndDate

The ending date of time series values

StationID

The corresponding station's ID

References

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

Examples

Run this code
# NOT RUN {
# get station's time series from the Greek Ministry of Environment and Energy
get_timeseries("kyy", 200171)

# }
# NOT RUN {
get_timeseries("ypaat")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab