Learn R Programming

hydroscoper (version 0.1.0)

get_data: Get time series values in a tidy dataframe

Description

get_data returns a tidy dataframe with the available data from a time series in a database of Hydroscope.

Usage

get_data(subdomain = c("kyy", "ypaat", "emy"), timeID)

Arguments

subdomain

One of the subdomains of hydroscope.gr

timeID

A time series 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 timeID is not NULL, returns a tidy dataframe with the time series values from the corresponding time series and database of hydroscope.gr. Otherwise gives an error message.

If the time series 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:

Date

The time series Dates (POSIXct)

Value

The time series values (numeric)

Comment

Comments from Hydroscope (character)

References

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

Examples

Run this code
# NOT RUN {
# get time series 912 from the Greek Ministry of Environment and Energy
df <-get_data("kyy", 912)

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

Run the code above in your browser using DataLab