Commit 4ba44b6a authored by Dorchies David's avatar Dorchies David
Browse files

Merge branch '14-add-french-gauging-station-daily-data' into 'master'

Resolve "Add French gauging station daily data"

Closes #14

See merge request !2
1 merge request!2Resolve "Add French gauging station daily data"
Pipeline #30371 passed with stages
in 1 minute and 28 seconds
Showing with 66 additions and 0 deletions
+66 -0
......@@ -2,6 +2,7 @@
export(doApiQuery)
export(get_available_params)
export(get_hydrometrie_obs_elab)
export(get_hydrometrie_observations_tr)
export(get_hydrometrie_sites)
export(get_hydrometrie_stations)
......
#' Retrieve hydrometric elaborate observations from API "Hydrométrie"
#'
#' See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie#operations-hydrometrie-observationsElaborees}
#'
#' @template param_get_common
#'
#' @return a [tibble::tibble] with all available parameters in columns and one row by time step and by station.
#' @export
#'
#' @examples
#' # Retrieve the hydrometric last real time observed discharge at station 'H020302002'
#' get_hydrometrie_obs_elab(list(code_entite = "H0203020", grandeur_hydro_elab = "QmM"))
get_hydrometrie_obs_elab <- function(params,
cfg = config::get(file = system.file("config.yml",
package = "hubeau"))) {
l <- doApiQuery(
api = "hydrometrie",
operation = "obs_elab",
params = params,
cfg = cfg
)
convert_list_to_tibble(l)
}
......@@ -150,6 +150,21 @@ default:
- latitude
- longitude
- timestep
obs_elab:
path: obs_elab
fields:
- bbox
- code_entite
- cursor
- date_debut_obs_elab
- date_fin_obs_elab
- distance
- fields
- grandeur_hydro_elab
- latitude
- longitude
- resultat_max
- resultat_min
niveaux_nappes:
path: v1/niveaux_nappes
operations:
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_hydrometrie_obs_elab.R
\name{get_hydrometrie_obs_elab}
\alias{get_hydrometrie_obs_elab}
\title{Retrieve hydrometric elaborate observations from API "Hydrométrie"}
\usage{
get_hydrometrie_obs_elab(
params,
cfg = config::get(file = system.file("config.yml", package = "hubeau"))
)
}
\arguments{
\item{params}{a \link{list} the list of parameters of the queries and their values in the format \code{list(ParamName = "Param value", ...)}, use the function \link{get_available_params} for a list of the available parameters for a given operation in an API and see the API documentation for the complete list of available filter parameters}
\item{cfg}{a \link{config} object Configuration of the communication. Use by default the internal package
configuration}
}
\value{
a \link[tibble:tibble]{tibble::tibble} with all available parameters in columns and one row by time step and by station.
}
\description{
See the API documentation for available filter parameters: \url{https://hubeau.eaufrance.fr/page/api-hydrometrie#operations-hydrometrie-observationsElaborees}
}
\examples{
# Retrieve the hydrometric last real time observed discharge at station 'H020302002'
get_hydrometrie_obs_elab(list(code_entite = "H0203020", grandeur_hydro_elab = "QmM"))
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment