Interface to the Greek National Data Bank for Hydrometeorological Information

R interface to the Greek National Data Bank for Hydrological and Meteorological Information < http://www.hydroscope.gr/>. It covers Hydroscope's data sources and provides functions to transliterate, translate and download them into tidy dataframes.


Travis-CI BuildStatus AppVeyor BuildStatus codecov minimal Rversion CRAN_Status_Badge packageversion ropensci DOI DOI

hydroscoper is an R interface to the Greek National Data Bank for Hydrological and Meteorological Information, Hydroscope. For more details checkout the package’s website and the vignettes:

Install the stable release from CRAN with:

install.packages("hydroscoper")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ropensci/hydroscoper")

Using hydroscoper

The functions that are provided by hydroscoper are:

  • get_stations, get_timeseries, ..., etc. family functions, to retrieve tibbles with Hydroscope’s data for a given data source.
  • get_data, to retrieve a tibble with time series’ values.
  • hydro_coords, to convert Hydroscope’s points’ raw format to a tibble.
  • hydro_translate to translate various terms and names from Greek to English.

The data sets that are provided by hydroscoper are:

  • stations a tibble with stations’ data from Hydroscope.
  • timeseries a tibble with time series’ data from Hydroscope.
  • greece_borders a tibble with the borders of Greece.

Example

This is a minimal example which shows how to get the station’s 200200 precipitation time series 56 from the kyy sub-domain.

Load libraries and get data:

library(hydroscoper)
library(tibble)
library(ggplot2)
 
ts_raw <- get_data(subdomain = "kyy", time_id = 56)
ts_raw
#> # A tibble: 147,519 x 3
#>    date                value comment
#>    <dttm>              <dbl> <chr>  
#>  1 1985-05-06 08:00:00     0 1      
#>  2 1985-05-06 08:30:00     0 1      
#>  3 1985-05-06 09:00:00     0 1      
#>  4 1985-05-06 09:30:00     0 1      
#>  5 1985-05-06 10:00:00     0 1      
#>  6 1985-05-06 10:30:00     0 1      
#>  7 1985-05-06 11:00:00     0 1      
#>  8 1985-05-06 11:30:00     0 1      
#>  9 1985-05-06 12:00:00     0 1      
#> 10 1985-05-06 12:30:00     0 1      
#> # ... with 147,509 more rows

Let’s create a plot:

ggplot(data = ts_raw, aes(x = date, y = value))+
  geom_line()+
  labs(title= "30 min precipitation for station 200200",
       x="Date", y = "Rain height (mm)")+
  theme_classic()

Meta

  • Bug reports, suggestions, and code are welcome. Please see Contributing.
  • Licence:
  • To cite hydroscoper please use:
Vantas Konstantinos, (2018). hydroscoper: R interface to the Greek National Data Bank for
Hydrological and Meteorological Information. Journal of Open Source Software,
3(23), 625 DOI:10.21105/joss.00625

or the BibTeX entry:

@Article{kvantas2018,
author = {Konstantinos Vantas},
title = {{hydroscoper}: R interface to the Greek National Data Bank for Hydrological and Meteorological Information},
doi = {10.21105/joss.00625},
year = {2018},
month = {mar},
publisher = {The Open Journal},
volume = {2},
number = {23},
journal = {The Journal of Open Source Software}
}

References

Hydroscope

ropensci_footer

News

hydroscoper 1.1.1 (Release date: 2018-08-25)

  • This version fixes the errors found in CRAN Package Check Results.

hydroscoper 1.1.0 (Release date: 2018-07-06)

  • New functionality:

    • find_stations() returns a tibble with the nearest hydroscope's stations' distances using a given point coordinates.

hydroscoper 1.0.0 (Release date: 2018-03-16)

  • hydroscoper was transfered to rOpenSci: https://github.com/ropensci/hydroscoper

  • General

    • This is a major update. All the functions are rewritten utilizing the Enhydris API.
    • The included data in the package cover all Hydroscope's databases.
    • Add vignettes "An introduction to hydroscoper" and "Using hydroscoper's data".
    • Add package documentation site.
    • Use pingr package to check if a sub-domain is alive.
    • All the functions return tibbles.
    • Add greece_borders dataset.
  • New functionality:

    • get_instruments() returns a tibble with the instruments' data.
    • get_water_basins() returns a tibble with the Water Basins' data.
    • get_water_divisions() returns a tibble with the Water Divisions' data.
    • get_political_divisions() returns a tibble with the Political Divisions' data.
    • get_variables() returns a tibble with the Variables' data.
    • get_units_of_measurement() returns a tibble with the Units' data.
    • get_time_steps() returns a tibble with the Time Steps' data.
    • get_owners() returns a tibble with the Owners' data.
    • get_instruments_type()returns a tibble with the Instruments' type data.
    • get_station_type() returns a tibble with the Water Basins data.
    • get_database() returns a tibble with the Water Basins data.
    • hydro_coords returns a tibble with the stations' longitudes and latitudes using as input the variable point from get_stations function.
    • hydro_translate() translates various Greek terms to English.
  • Changes

    • get_stations and get_timeseries use the Enhydris API and are considerably faster.
    • get_data uses lower case variable naming: date, value, comment
  • Defuncs

    • get_coords has been removed from the package. Please use hydro_coords to convert Hydroscope's points' raw format to a tibble.

hydroscoper 0.1.0 (Release date: 2017-12-22)

  • Initial submission to CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("hydroscoper")

1.2 by Konstantinos Vantas, 3 months ago


https://github.com/ropensci/hydroscoper, https://ropensci.github.io/hydroscoper/


Report a bug at https://github.com/ropensci/hydroscoper/issues


Browse source code at https://github.com/cran/hydroscoper


Authors: Konstantinos Vantas [aut, cre] , Sharla Gelfand [ctb, rev] (Sharla Gelfand reviewed the package for rOpenSci , see https://github.com/ropensci/onboarding/issues/185) , Tim Trice [rev] (Tim Trice reviewed the package for rOpenSci , see https://github.com/ropensci/onboarding/issues/185)


Documentation:   PDF Manual  


Task views: Hydrological Data and Modeling


MIT + file LICENSE license


Imports stringi, stringr, tibble, pingr, readr, jsonlite

Suggests ggplot2, knitr, rmarkdown, testthat


See at CRAN