-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME.Rmd
77 lines (58 loc) · 2.86 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r opts, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# hubeau an R package for the Hub'Eau APIs
<img src="man/figures/logo.png" align="right" style="float: right; height: 220px; margin: 15px;"/>
<!-- badges: start -->
[![CRAN](https://www.r-pkg.org/badges/version-ago/hubeau)](https://cran.r-project.org/package=hubeau)
[![Total downloads](https://cranlogs.r-pkg.org/badges/grand-total/hubeau)](https://cran.r-project.org/package=hubeau)
[![DOI: 10.57745/XKN6NC](https://img.shields.io/badge/doi-10.57745%2FXKN6NC-purple)](https://doi.org/10.57745/XKN6NC)
`r badger::badge_license(color = "orange")`
`r badger::badge_lifecycle("stable", color = "blue")`
[![R-CMD-check](https://github.com/inrae/hubeau/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/inrae/hubeau/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
'hubeau' is an R-package proposing a collection of function to help retrieve data from the French national databases on water: https://hubeau.eaufrance.fr
# Installation
``` r
# Install released version from CRAN
install.packages("hubeau")
# Install development version from GitHub:
# install.packages("remotes")
remotes::install_github("inrae/hubeau")
```
# Loading library
```{r library}
library(hubeau)
```
# Get started
```{r import_documentationchild, results='asis', echo=FALSE}
convert_link <- function(s) {
m <- gregexpr("\\[.*\\(\\)\\]", s)
if (m[[1]][1] == -1) return(s)
x <- regmatches(s, m)
x <- gsub("\\[|\\(|\\)|\\]", "", x)
x2 <- strsplit(x, "_", fixed = TRUE)[[1]]
x2 <- paste(x2[-length(x2)], collapse = "_")
apis <- list_apis()
x2 <- paste0("get_", apis[sapply(apis, grepl, x = x2, fixed = TRUE)])
x <- sprintf("[`%s`](https://inrae.github.io/hubeau/reference/%s.html)", x, x2)
regmatches(s, m) <- x
s
}
s <- readLines("man-roxygen/hubeau.md")
s2 <- lapply(s, convert_link)
cat(paste(s2, collapse = "\n"))
```
A complete documentation is available on the package website: https://inrae.github.io/hubeau/
# Acknowledgements
The authors would like to thank the European Commission and the French National Research Agency (ANR) for funding in the frame of the collaborative international consortium [IN-WOP](http://www.waterjpi.eu/joint-calls/joint-call-2018-waterworks-2017/booklet/in-wop) financed under the 2018 Joint call of the WaterWorks2017 ERA-NET Cofund. This ERA-NET is an integral part of the activities developed by the Water JPI.
<div style="display: flex; justify-content: space-between;">![Water JPI](man/figures/logo_water_jpi.png) ![Water Works 2017](man/figures/logo_water_works_2017.png) ![European Commission](man/figures/logo_european_commission.jpg) ![2018 Joint call](man/figures/logo_2018_joint_call.png)</div>