CSHShydRology

Main package

https://github.com/CSHS-CWRA/CSHShydRology

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Main package

Basic Info
  • Host: GitHub
  • Owner: CSHS-CWRA
  • License: agpl-3.0
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 6.66 MB
Statistics
  • Stars: 36
  • Watchers: 17
  • Forks: 41
  • Open Issues: 6
  • Releases: 2
Created almost 9 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

lifecycle CRAN
status Travis build status license

CSHShydRology

Installing this package

The package may be downloaded directly from CRAN with: r install.packages("CSHShydRology")

Previous versions of the package and manuals can be found by clicking on releases. The latest version of the package may also be installed directly from this repository. The procedure is 1. Install the package "devtools" - you only have to do this once. Note that this will also install several dependancies 2. Load the devtools library 3. Install the package.

The commands are: R if (!require(devtools)) install.packages("devtools") library(devtools) install_github("CSHS-CWRA/CSHShydRology")

What is CSHS Hydrology?

This is an R package of functions used by Canadian hydrologists. The name is in recognition of the support provided by the Canadian Association Society for Hydrological Sciences (CSHS) which is an affiliated society of the Canadian Water Resources Association (CWRA). The CSHS website is https://cwra.org/en/affiliates-programs/cshs/.

Themes

This package contains functions which are grouped into themes. Currently the themes include: - Statistical hydrology (trend detection, data screening, frequency analysis, regionalization), - Basic data manipulations (input/conversion/adapter functions, missing data infilling), - Visualization (data visualization, standardized plotting functions), - Spatial hydrology (basin delineation, landscape data analysis, working with GIS), - Streamflow measurement analysis (rating curve analysis, velocity profiles, naturalization).

Other themes, such as Network design/analysis (homogeneity assessment), and Ecohydrology (fisheries and ecological analysis) will also be added if there is interest.

Coding standards

General standards

The general coding standards are as specified in the Google R coding guide at https://google.github.io/styleguide/Rguide.xml.

External packages

To reduce errors, it is a good idea to reduce reliance on other packages as much as is possible. Please check through the functions already referenced in the DESCRIPTION file before adding additional functions. When it is necessary to add a reference to an additional package, please do the following: Make the package suggested, rather than required. Make a note in the function’s Roxygen documentation that the function uses the package. Make sure that the version number of the package is referenced properly. When more than one function requires a given package, it can be made a required packages.

Devtools

To make package development easier, we will use the package devtools, which provides several tools. This package is explained at https://github.com/hadley/devtools.

Checking

The devtools check function will be used check each function for errors in syntax and style. Each function must pass the checks with zero warnings, errors or notes. Note that once you have loaded devtools, the check function can be accessed from a menu or from the build tab in Rstudio. It is also a good idea to manually run the check function from the command line, i.e. R R CMD check as this can catch other problems.

Documentation

All functions need to be documented using the Roxygen package, which allows you to create the help files and documentation using comments in your function. The package is explained at https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html. Rstudio has a very nice quick reference for Roxygen which you can access with Help|Roxygen Quick Reference. Each function must include the name of the authors(s). Please include your email address, and any publications that you want to reference. Note that the package itself also has a function. This contains documentation about the package as a whole, as well as settings which are used to create the package NAMESPACE file. Note that this means that the NAMESPACE file should never be edited directly by anyone. When the package is compiled and tested, Roxygen will create a .Rd file for each function, the package, and for the included data files. These files should never be edited manually. If you want to check how your .Rd file will look, you can load it into Rstudio, which can render it.

Vignettes

Vignettes are long form documentation which can be included in R packages. They can include long descriptions and worked examples, and are very useful to thoroughly explain functions to the users. The creation process is explained at http://r-pkgs.had.co.nz/vignettes.html. Even if you don’t write code, you can contribute to writing vignettes for functions.

Testing

The testthat package allows unit tests to be created for each function. The function is executed, using specified data, and the results are compared to specified values. Unit tests should be used whenever possible, as they will identify problems caused by changes in upstream packages. The testthat package is explained in detail in http://r-pkgs.had.co.nz/tests.html.

Test data

Each function is required to have an example, which should be executable code. The only exception should be for code which is intended to access data which may not be available, such as data downloaded from a server. The example, vignettes, and unit tests will all require test data sets. The data are stored in the /data folder of the package, and should be stored as .Rdata (binary) files, unless reading in data from another format is the point of the function. CRAN has a maximum limit of 1 MB for test data, so we will need to minimise the datasets we include. We should minimise the size of each test dataset and re-use the same data in as many functions as possible. If a function requires data output by another function, both functions can be included in the example. Each dataset needs to be documented in the same way as a function. The creation of datasets and their documentation is explained at http://r-pkgs.had.co.nz/data.html.

Working with GitHub

There is a lot of information available on using git and GitHub in R. The best starting point is https://support.rstudio.com/hc/en-us/articles/200532077-Version-Control-with-Git-and-SVN which shows how to integrate git and GitHub with RStudio.

Citation

The package citation may be generated with the following command in R. {r} citation("CSHShydRology")

Owner

  • Name: Canadian Society for Hydrological Sciences
  • Login: CSHS-CWRA
  • Kind: organization
  • Email: cshs@cwra.org

GitHub Events

Total
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 8
  • Pull request event: 3
  • Fork event: 2
  • Create event: 2
Last Year
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 8
  • Pull request event: 3
  • Fork event: 2
  • Create event: 2

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 295
  • Total Committers: 5
  • Avg Commits per committer: 59.0
  • Development Distribution Score (DDS): 0.285
Past Year
  • Commits: 10
  • Committers: 1
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Kevin Shook k****k@u****a 211
PaulWhitfield p****d@g****m 45
rchlumsk r****k@u****a 25
boshek s****s@g****m 10
Victor Muñoz S v****s@g****m 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 19
  • Total pull requests: 85
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 5
  • Total pull request authors: 10
  • Average comments per issue: 1.79
  • Average comments per pull request: 0.78
  • Merged pull requests: 60
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 10 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.67
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • KevinShook (14)
  • rchlumsk (2)
  • Jhydromet (1)
  • rywhale (1)
  • EAkomeah (1)
Pull Request Authors
  • KevinShook (39)
  • rchlumsk (22)
  • PaulWhitfield (15)
  • MIsmlAhmed (3)
  • vincenzocoia (2)
  • jwtrubil (2)
  • boshek (2)
  • vmunozs-zz (1)
  • floodnetProject16 (1)
  • JasonChiangIB (1)
Top Labels
Issue Labels
bug (3)
Pull Request Labels

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • Kendall * imports
  • datasets * imports
  • dplyr * imports
  • fields * imports
  • ggplot2 * imports
  • ggspatial * imports
  • here * imports
  • httr * imports
  • lubridate * imports
  • magrittr * imports
  • plotrix * imports
  • raster * imports
  • sf * imports
  • stats * imports
  • stringr * imports
  • tidyhydat * imports
  • timeDate * imports
  • whitebox * imports
  • knitr * suggests
  • readr * suggests
  • rmarkdown * suggests
  • testthat * suggests