get_hydrometrie_obs_elab {hubeau}R Documentation

Retrieve data from API "Hydrométrie"

Description

Available endpoints are:

See the API documentation of each endpoint for available filter parameters: https://hubeau.eaufrance.fr/page/api-hydrometrie

Usage

get_hydrometrie_obs_elab(...)

get_hydrometrie_observations_tr(..., entities = "station")

get_hydrometrie_sites(..., unique_site = TRUE)

get_hydrometrie_stations(..., code_sandre_reseau_station = FALSE)

Arguments

...

parameters of the queries and their values in the format ⁠Param1_Name = "Param1 value", Param2_Name = "Param2 value"⁠, use the function list_params for a list of the available filter parameters for a given API endpoint and see the API documentation for their description

entities

1-length character string filtering the rows of the returned value, possible values are: "station" for filtering on station rows, "site" for filtering on site rows, "both" for keeping all the rows

unique_site

optional logical, if set to FALSE sites with several different locations produce one row by different location otherwise the first location found is used for fields code_commune_site, libelle_commune, code_departement, code_region, libelle_region, libelle_departement

code_sandre_reseau_station

optional logical indicating if code_sandre_reseau_station field is included in the result; if so, one line is added by item and other fields are repeated

Value

A tibble::tibble with one row by record and one column by field.

Examples

## Not run: 
# Retrieve the hydrometric sites in the department of Aube
get_hydrometrie_sites(code_departement = "10")

# The same operation returning 2 rows for the site 'H0203020' which has 2 different locations
get_hydrometrie_sites(code_departement = "10", unique_site = FALSE)

# Retrieve the hydrometric stations in the department of Aube
get_hydrometrie_stations(code_departement = "10")

# Which parameters are available for endpoint "obs_elab" of API "hydrometrie"?
list_params("hydrometrie", "obs_elab")

# Retrieve the hydrometric monthly mean flow at site 'H0203020'
get_hydrometrie_obs_elab(code_entite = "H0203020", grandeur_hydro_elab = "QmM")

# Retrieve the hydrometric daily mean flow at site 'H0203020' of the last 30 days
get_hydrometrie_obs_elab(code_entite = "H0203020",
                         date_debut_obs_elab = format(Sys.Date() -30, "%Y-%m-%d"),
                         grandeur_hydro_elab = "QmJ")

## End(Not run)

[Package hubeau version 0.5.0 Index]