dataesr/scientific-paragraphs-categorization huggingface dataset:
Dashboards are interfaces that may include a group of related data visualizations such as charts,   graphs, tables, and maps (e. g. Fig. 6 ). They can be fixed (e. g. a non-interactive web page) or dynamic (e. g. allowing users to alter input values and see how outputs change virtually in real time). Hydrologists have increasingly employed dashboards to display their analyses in an interactive, user-friendly manner, using packages such as plotly, a graphing library that makes publication-quality graphs online  (Sievert, 2018) , the shiny web application framework  (Chang et al. , 2015) , shinydashboard  (Chang and Borges Ribeiro, 2018) , or the flexdashboard package  (Iannone et al. , 2018). Additionally, free services such as RPubs (a free web-publishing platform; https://rpubs. com) and the aforementioned plotly enable the publishing of these static or interactive documents and visualizations online.
, 2017). The open-source nature of R packages and the CRAN repository set-up are one key added value of R to reproducible geoscientific research  (Pebesma et al. , 2012). The CRAN repository ensures the traceability of past analyses by archiving former versions of the packages compiled on any platform (https://cran. r-project. org). In addition, packages are citeable in reports and papers together with their version number, allowing the user to track which code was used. The package developers are also "trace- able" on the CRAN via their ORCID (Open Research and Contributor ID) number, which provides an indication of whether they also authored any corresponding scientific papers. The CRAN Task Views provide guides to the packages and tools that exist on CRAN for the different disciplines. Note that many packages are submitted to online repositories such as GitHub that never make it to CRAN for a range of reasons, but this does not necessarily make them less reliable.
Hydrological tutorials, vignettes, or teaching documents increasingly implement literate programming (Sect. 2. 1), where the code and results are described in plain English within the same document or web page. In the hydrological sciences, several ongoing open scientific initiatives can be noted other than the R packages that www. hydrol-earth-syst-sci. net/23/2939/2019/ Hydrol. Earth Syst. Sci. , 23, 2939-2963, 2019 Figure  5. Use-case scenario for implementation of APIs developed within hydrological sciences. Group A collates the most recent earthand ground-based observations of land cover, topography, and climate data for an in-house project yet allows an API to interact with an analysis-ready, spatially explicit dataset for their region of interest. Group B is interested in geomorphological processes and has developed a model to predict likely occurrence of mass movements, which they also provide access to via an API.
Providing statistical tools for hydrology There are many different types of software for statistical analysis, but R is still considered the most powerful and popular language and environment for statistical computing. For example, a search for the word "statistics" on Stack Over-flow, the question and answer website for programmers, on 18 May 2019 generated 12 339 results with the tag "R", 9582 results with Python, 4916 with Java, 2623 with C#, and 48 with Fortran. R is GNU S, a language which can be described as the modern implementation of the S language  (Becker and Chambers, 1984; Chambers, 1998) , and is specifically optimized for statistical computing. In addition to the standard statistical techniques within base-R (i. e. the inbuilt basic functions that define R as a language), R also provides access to a large variety of advanced and recent statistical packages, which have been developed by its user community of statisticians and statistically minded scientists working in a range of research fields.
For example, C and Fortran are both efficient in performing loop tasks. This is the reason why the apply function loops are coded in C. The airGR hydrological models  (Coron et al. , 2017 (Coron et al. , , 2018 ) also make use of Fortran in order to take advantage of its CPU efficiency. R can also be connected to different languages using a range of packages, e. g. C++ (package Rcpp; Eddelbuettel and Balamuta, 2017) and Java (package rJava;  Urbanek, 2018). Connections to Python can be achieved with the packages reticulate  (Allaire et al. , 2018b) , rPython  (Bellosta, 2015) , rJython  (Grothendieck and Bellosta, 2012) , and XRPython  (Chambers, 2017). Additionally, R can also be connected to JavaScript (e. g. package V8; Ooms, 2017), MATLAB (e. g. package R. matlab;  Bengtsson, 2018) , or Julia (packages JuliaCall and XRJulia;  Chambers, 2018; Li, 2018).
Conversely, connecting other languages to R is also possible. For example, rpy2  (Gautier, 2018)  is the Python interface to the R language and runs an embedded R, providing access from Python using R's own C application programming interface (API). The Python library pyRserve  (Heinkel, 2017 ) also connects Python with R using Rserve (a TCP/IP server which allows other programs to use facilities of R). The RCall package allows users to call R from Julia  (Bates et al. , 2015).
html), relating to usage (R-help), package development (R-package-devel), and language development (R-devel), in order to help others, report bugs, or propose solutions. More recent but already extremely active is the RStudio Community forum (https://community. rstudio. com), which includes users interested in RStudio-developed applications and packages. A wide range of scientific resources, including online manuals and tutorials in several languages, have been developed by the community. The rOpenSci project (https: //ropensci. org) brings together a community of volunteers who promote the open development of packages in a nonprofit initiative by reviewing scientific R packages before they are uploaded to CRAN. rOpenSci has contributed notably to the development of best practice through free code reviews and targeted or invited blog posts.
Recent advances in R for hydrology applications are demonstrated during the short course, and a platform for open discussion between guest speakers and course participants is provided. By rotating topics each year, a valuable repository of slides, code examples, and follow-up material is provided to the community on GitHub (https://github. com/hydrosoc; see Sect. 5. 6 for further information). It is also worth noting that a regular short course is also run at the EGU on R package development. In addition to the EGU, other regular conferences and meetings such as those run by the International Association of Hydrological Sciences (IAHS) and the Prediction in Ungauged Basins (PUB; PUB Summer School) also organize R courses during their meetings. The IAHS Statistical Hydrology (STAHY) commission regularly organizes workshops and short courses on various statistical topics, which typically come with a computer-based component in R.
e. save) their code together with a very brief summary of the changes made. These changes can then be uploaded, updating and synchronizing the online repository with labelled annotations (username and timestamp). The repository can be public or private, with different levels of administrator access for users. Many tutorials on how to set up a repository in R can be found online. One example is the Software Carpentry course on R for Reproducible Scientific Analysis (https://swcarpentry. github. io/ r-novice-gapminder/), which also provides valuable suggestions on how to structure a project repository (e. g. with readonly source data, disposable generated data, and folders such as "scr" for scripts and "doc" for documentation). Once a project folder or repository has been set up, one might need to identify the most useful R packages and functions for the task at hand.
Packages for retrieving hydro-meteorological data One of the most useful computational advances in recent years has been the development of packages designed specifically to retrieve data from online hydrological archives. Different packages have been designed for importing hydrometric data from repositories such as dataRetrieval for the US Geological Survey (USGS) National Water Information System  (Hirsch and De Cicco, 2015)  or rnrfa for the UK's National River Flow Archive  (Vitolo et al. , 2016a). Many of these packages provide vignettes that illustrate how to use the functions. For example, the USGS's waterData package allows the user to import USGS daily hydrological data from the USGS web services, plot timeseries data, fill in missing values, or visualize anomalies over a range of timescales (e.
g. 1 year, 30 d, or 1 d) in just a few lines of code (see the waterData package vignette on the CRAN;  Ryberg and Vecchia, 2017). Other relevant packages are listed in Table  1. Additionally, many data retrieval packages that are relevant to hydrological analyses have been developed by related scientific disciplines, such as meteorology and climatology. In the future it seems likely that most water and meteorological agencies around the world will facilitate access to these data via APIs and open-source packages (see Sect. 5. 4 for further information on APIs and the possible future of hydro-meteorological data provision). Table  1  is far from exhaustive, and there are many other relevant packages that are available on CRAN. For example, the new ecmwfr package provides a straightforward interface to the public ECMWF Web API Services and the Copernicus Climate Data Store  (CDS) , where open datasets such as the ERA5 reanalysis are openly available  (Hufkens, 2018).
Package Description Hydrological data dataRetrieval Retrieve USGS and EPA hydrologic and water quality data  (Hirsch and De Cicco, 2015)  hddtools Hydrological data discovery tools  (Vitolo, 2017)  hydroscoper Interface to the Greek national data bank for hydrometeorological information  (Vantas, 2018)  rnrfa Retrieve, filter, and visualize data from the UK National River Flow Archive  (Vitolo et al. , 2016a)  tidyhydat Extract and tidy Canadian hydrometric data  (Albers, 2017)  waterData Retrieve, analyse, and calculate anomalies of daily hydrologic time-series data  (Ryberg and Vecchia, 2017)  Climatological data daymetr Interface to the Daymet web services: NASA daily surface weather and climatological summaries over North America, Hawaii, and Puerto Rico  (Hufkens et al. , 2018)  ecmwfr Interface to the public ECMWF API web services  (Hufkens, 2018)  getMet Get meteorological data for hydrologic models  (Sommerlot et al.
, 2016)  prism Access the Oregon State PRISM climate data using the web service API data  (Hart and Bell, 2015)  rnoaa Interface to NOAA weather data  (Chamberlain, 2019)  3. 4 Packages for extracting driving data, spatial analysis, and cartography In the past, R may have been a less powerful alternative to the more established spatial software for processing large datasets and extracting information. Now, however, R can be parallelized more easily than other software (harnessing the power of multiple processor cores to handle large datasets) and can integrate GIS analyses within a complete, automated hydrological workflow, which includes data processing steps (before or after any GIS analyses) and any subsequent statistical analyses. It is this integration of GIS as one step within the hydrological workflow that makes R extremely attractive.
4 (Urbanek, 2012) library, package rgeos  (Bivand and Rundel, 2018) , which provides an interface to the Geometry Engine Open Source (GEOS) library for geometrical operations, or package sf  (Pebesma, 2018a) , which provides support for simple features to encode spatial vector data. Version 3. 0 of ggplot2 offers support for visualizing sf objects directly with a specific geometric object (geom_sf), which allows users to visualize spatial data (raster and shape files) easily. There is also a range of packages for handling raster data, like raster  (Hijmans, 2017) , which can be used to read, write, manipulate, analyse, and model gridded spatial data, and stars  (Pebesma, 2018b)  for reading, manipulating, writing, and plotting spatio-temporal arrays. With all these packages, R now has full cartography and mapping functionality and can produce sophisticated maps that are either static or interactive.
Packages such as cartography (Giraud and Lambert, 2016) or tmap (Tennekes, 2018) can both be used for creating symbols, choropleth, or other types of maps and for facilitating the visualization of spatial data distributions in thematic maps. These two packages are quite similar in content but not in form: cartography uses the painter's model, while tmap uses The Grammar of Graphics and allows users to draw static and dynamic maps with the same code. Additionally, ggmap  (Kahle and Wickham, 2013)  is commonly used for visualizing, geolocating, and routing spatial data on top of static maps such as Google Maps; RgoogleMaps is used to interact with Google Maps, while the JavaScript leaflet  (Cheng et al. , 2018)  library can be used for creating interactive web maps. R software can also be linked to a range of other GIS software to take advantage of specific capa-bilities.
Several well-known hydrological models are provided in these packages, such as the HBV model in the TUWmodel package  (Viglione and Parajka, 2019) , TOP-MODEL in the packages topmodel  (Buytaert, 2018)  and dynatopmodel  (Metcalfe et al. , 2015 (Metcalfe et al. , , 2018)) , SWAT in SWATmodel  (Fuka et al. , 2014) , GR4J in airGR  (Coron et al. , 2017 (Coron et al. , , 2018)) , and hydromad  (Andrews et al. , 2011; Andrews and Guillaume, 2018). Some packages also include degree-day snow models (e. g. airGR, hydromad, and TUWmodel) that are used in nival basins to simulate the accumulation and melt of the snowpack, which greatly impacts the flow regimes. Many of the models included in these packages are lumped (i. e. consider the catchment as a single unit with area-averaged variables) or conceptual (i.
e. provide a simplified representation of the physical processes with empirical equations describing the interactions between the processes) models. Some packages, such as TUWmodel and topmodel, allow a spatial distribution of the hydrological processes. TUWmodel, for instance, allows the user to implement a semi-distributed application with differentiation into elevation zones, while topmodel allows the user to make topographic index classes from a topographic index map. The FUSE model  (Clark et al. , 2008) , originally implemented in Fortran, is still actively developed and also has a dedicated R package called fuse  (Vitolo et al. , 2016b)  that is a re-implementation of the FUSE 2011 model. The vast majority of the models in the above packages are deterministic; however, the fuse package can also provide ensembles of conceptual lumped hydrological models, and the hydromad package is intended to provide a flexible framework for assembling different soil moisture accounting and routing schemes.
Packages for hydrological statistics R was initially developed as a statistical computing language and is still the primary language in which novel statistical methods are coded and distributed. Statistical approaches are employed for an extremely wide range of tasks in hydrology, and it is virtually impossible to give complete coverage of all possible packages that might be useful to hydrologists. The skimr package provides compact and flexible summaries of data; it can be used with pipes and displays nicely in the console. Many estimating procedures can be carried out using the base-R stats package, which includes, for example, correlation analysis and Mann-Kendall testing, linear regression, Poisson regression, and Gamma regression. There are also generalist packages for non-parametric trend tests such as trend  (Pohlert, 2018) , which includes a broad range of tests for trend detection, correlation, and detection of change points or non-randomness.
Many general modelling packages have been found to be useful by hydrologists, for example mgcv  (Wood, 2017) , VGAM  (Yee et al. , 2015) , and GAMLSS  (Rigby and Stasinopoulos, 2005) , which implements generalized additive regression models for a large number of distributional families. While mgcv can be useful for more complex smoothing approaches (e. g. tensor product smooths or varying coefficient models), the focus of GAMLSS is to develop flexible models for a large class of distributions which are not part of the exponential family of distributions, allowing for parameters other than the location to be modelled as a smooth function of the covariates of interest. A hydrologist might therefore choose which package to use depending on the most likely distribution of the data which are being analysed and the complexity of the analysis.
g. neural networks, deep learning, and decision trees). There are many packages available for common hydrological tasks. A comprehensive set of functions for carrying out extreme value analysis  (Coles, 2001 ) can be found in the extRemes package  (Gilleland and Katz, 2016) , and a more complete overview can be found in the CRAN Extreme Value Analysis Task View. nsRFA consists of a collection of statistical tools for objective (unsupervised) applications of the regional frequency analysis methods in hydrology  (Viglione, 2018). L-moments can be implemented using the lmom Hosking (2019b) package, while the lmomRFA package (Hosking, 2019a) enables regional frequency analysis. The lfstat  (Koffler et al. , 2016)  package provides functions to compute statistics and plots for low flows similar to those in the manual on low-flow estimation and prediction  (WMO, 2009).
Many of the standard model evaluation metrics are provided directly within these packages. The caret package, for instance, imports other packages, such as ModelMetrics  (Hunt, 2018) , to facilitate model evaluation directly. A range of packages have also been developed specifically for model evaluation. The hydroGOF package (Zambrano-Bigiarini, 2017a) provides goodness-offit functions specifically for comparison of simulated and observed hydrological time series. In Table  3  we present a brief overview of some other packages for hydrological statistics. For a broader overview of available packages and further examples, we point the reader to the CRAN Task View on machine learning and statistical learning (https://cran. r-project. org/web/views/MachineLearning. html).
Packages for static and dynamic hydrological data visualization Data visualizations play an important role in hydrological analysis: R makes them straightforward to implement and allows considerable flexibility. R includes three main families of graphics packages: a painter model, natively present in R and based on the S language's GR-Z model  (Becker and Chambers, 1977) , the trellis graphs (e. g. the lattice package;  Sarkar, 2008)  initially implemented in S, and The Grammar of Graphics  (Wilkinson, 1999). The last two families are both based on the grid package (R Core Team, 2018), a low-level abstraction layer that allows the development of graphical packages with different philosophies, which means that the created graphics can be stored in objects to be updated and plotted again later.
base-R can produce publication-quality figures; it includes a series of functions and methods that allow the user to plot various types of visualizations and the output of statistical models. Visualizations are produced in base-R using the graphics package (R Core Team, 2018), which relies on the philosophy of superimposing elements of the graphics (with no provision for deleting an element once it is drawn) and includes a range of functions to add straight lines, arrows, axes, boxes, grids, legends, or annotation to a plot. While visualizations produced in base-R are highly customizable, other packages provide more consistent interactions and a suite of highly useful functions to summarize, highlight, and split and/or layer data with a minimal amount of code. A community favourite is the package ggplot2, created by  Wickham (2016b) , which allows a high level of flexibility and "tuning" of the graphs depending on the users' needs.
Package Description berryFunctions Function collection related to plotting and hydrology  (Boessenkool, 2018)  hydroGOF Goodness-of-fit functions for comparison of simulated and observed hydrological time series (Zambrano-Bigiarini, 2017a) hydrolinks Hydrologic network linking data and tools  (Winslow et al. , 2018)  hydrostats Hydrologic indices for daily time-series data  (Bond, 2018)  hydroTSM Time-series management, analysis and interpolation for hydrological modelling (Zambrano-Bigiarini, 2017b) lfstat Calculation of Low Flow Statistics for daily stream flow data  (Koffler et al. , 2016)  https://www. r-graph-gallery. com). ggplot2 also contains functions like "facets" (https://plot. ly/ggplot2/facet), which allow the user to split and plot the data by categories in many different rows or columns.
A number of JavaScript-based visualization libraries can also help achieve dynamic graphics. For interactive time-series data requiring axis display features such as zooming and panning and highlighting of series and points, the dygraphs package  (Vanderkam et al. , 2018)  provides an interface to the JavaScript charting library. The manipulate package  (Allaire, 2014)  allows the user to easily add sliders and other control tools to otherwise static plots. Other JavaScript-based packages include rbokeh  (Hafen and Continuum Analytics, Inc. , 2016) , which provides an interface to Bokeh, allowing the user to create web-based plots with hover and dynamic functionalities. rAmCharts  (Thieurmel et al. , 2018)  creates interactive charts based on the amCharts JavaScript library, while the highcharter  (Kunst, 2017)  package is based on the Highcharts JavaScript library of graphics.
The R language is strong in the area of colour gradients, and there are many colourblindfriendly palettes available for hydrology that follow effective data visualization guidelines  (Kelleher and Wagener, 2011). There are both manually defined and predefined palettes using packages such as RColourBrewer  (Neuwirth, 2014) , colorspace  (Zeileis et al. , 2019) , colorRamps  (Keitt, 2012) , or viridis  (Garnier, 2018). For example, the colorspace package can be used for colour palettes based on hue chroma luminance (HCL colour palettes are based on how humans perceive colour, in contrast to the RGB colour space, which is based on technical demands of TV/computer screens) in meteorological visualizations  (Stauffer et al. , 2015).
Hydrological libraries, documentation, and vignettes For most hydrologists who are new to R, the initial hurdle is understanding how to install libraries and use packages to explore their own datasets. The book R packages  (Wickham, 2015)  is freely available online and explains everything from the basic installation of packages to the role of metadata, understanding documentation, the role of vignettes, and best practice on GitHub (one common collaboration and version control platform). R packages centralized on CRAN are structured similarly, with a reference manual, source code, a license file, and other common elements. The code and documentation of all packages is verified before they are uploaded to CRAN. R packages ideally provide two forms of documentation: a short form (help pages) and a long form (vignettes), which are both complementary and serve different purposes  (Wickham, 2015).