The "Quality of rivers" API data comes from the Naïades database. Available for the whole of France (including the French overseas departments and territories), they relate to the results of measurements of the physico-chemical quality of rivers and water bodies transmitted by the Water Agencies.

Available endpoints are:

  • get_qualite_rivieres_station retrieves physico-chemical measuring stations

  • get_qualite_rivieres_operation retrieves physico-chemical operations

  • get_qualite_rivieres_analyse retrieves physico-chemical analyses

  • get_qualite_rivieres_condition_environnementale retrieves physico-chemical environmental conditions for analyses (please note that pagination is based on the number of analyses)

See the API documentation for available filter parameters: https://hubeau.eaufrance.fr/page/api-qualite-cours-deau

get_qualite_rivieres_analyse(...)

get_qualite_rivieres_analyse_pc(...)

get_qualite_rivieres_condition_environnementale(...)

get_qualite_rivieres_condition_environnementale_pc(...)

get_qualite_rivieres_operation(...)

get_qualite_rivieres_operation_pc(...)

get_qualite_rivieres_station(...)

get_qualite_rivieres_station_pc(...)

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

Value

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

Details

Endpoints ending by _pc are aliases of the functions without the suffix _pc.

Examples

# \dontrun{
# Tutorial provided by https://hubeau.eaufrance.fr/page/api-qualite-cours-deau-tuto

# List of stations in Longuyon
get_qualite_rivieres_station(libelle_commune="Longuyon")
#> # A tibble: 2 × 48
#>   code_station libelle_station      uri_station durete coordonnee_x coordonnee_y
#>   <chr>        <chr>                <chr>       <lgl>         <dbl>        <dbl>
#> 1 02115725     "LA CRUSNES \xc0 LO… https://id… NA           890006      6930024
#> 2 02115796     "L'OTHAIN \xc0 SAIN… https://id… NA           880332      6930499
#> # ℹ 42 more variables: code_projection <chr>, libelle_projection <chr>,
#> #   longitude <dbl>, latitude <dbl>, code_commune <chr>, libelle_commune <chr>,
#> #   code_departement <chr>, libelle_departement <chr>, code_region <chr>,
#> #   libelle_region <chr>, code_cours_eau <chr>, nom_cours_eau <chr>,
#> #   uri_cours_eau <chr>, code_masse_deau <chr>, code_eu_masse_deau <chr>,
#> #   nom_masse_deau <chr>, uri_masse_deau <chr>, code_eu_sous_bassin <chr>,
#> #   nom_sous_bassin <chr>, code_bassin <chr>, code_eu_bassin <chr>, …
# ... with field selection
get_qualite_rivieres_station(
  libelle_commune = "Longuyon",
  fields = c("code_station",
             "libelle_station",
             "localisation_precise",
             "code_commune",
             "libelle_commune",
             "code_cours_eau",
             "nom_cours_eau")
)
#> # A tibble: 2 × 7
#>   code_station libelle_station       code_commune libelle_commune code_cours_eau
#>   <chr>        <chr>                 <chr>        <chr>           <chr>         
#> 1 02115725     "LA CRUSNES \xc0 LON… 54322        Longuyon        B41-0200      
#> 2 02115796     "L'OTHAIN \xc0 SAINT… 54476        Saint-Jean-lès… NA            
#> # ℹ 2 more variables: nom_cours_eau <chr>, localisation_precise <chr>

# Query results of nitrate analyses at the station since 2013
get_qualite_rivieres_analyse(
  code_station = "02115725",
  libelle_parametre = "Nitrates",
  date_debut_prelevement = "2013-01-01",
  code_qualification = 1,
  fields = c("code_station",
             "libelle_station",
             "code_parametre",
             "libelle_parametre",
             "date_prelevement",
             "resultat",
             "symbole_unite",
             "code_remarque",
             "mnemo_remarque",
             "code_statut",
             "mnemo_statut",
             "code_qualification",
             "libelle_qualification")
)
#> # A tibble: 125 × 13
#>    code_station libelle_station            date_prelevement code_parametre
#>    <chr>        <chr>                      <chr>            <chr>         
#>  1 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-01-22       1340          
#>  2 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-02-19       1340          
#>  3 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-03-19       1340          
#>  4 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-04-16       1340          
#>  5 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-05-14       1340          
#>  6 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-06-11       1340          
#>  7 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-07-09       1340          
#>  8 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-08-06       1340          
#>  9 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-09-03       1340          
#> 10 02115725     "LA CRUSNES \xc0 LONGUYON" 2013-10-02       1340          
#> # ℹ 115 more rows
#> # ℹ 9 more variables: libelle_parametre <chr>, resultat <dbl>,
#> #   symbole_unite <chr>, code_remarque <chr>, mnemo_remarque <chr>,
#> #   code_statut <chr>, mnemo_statut <chr>, code_qualification <chr>,
#> #   libelle_qualification <chr>

# dates sorted from most recent to oldest
get_qualite_rivieres_analyse(
  code_station = "02115725",
  libelle_parametre = "Nitrates",
  date_debut_prelevement = "2013-01-01",
  code_qualification = 1,
  fields = c("code_station",
             "libelle_station",
             "code_parametre",
             "libelle_parametre",
             "date_prelevement",
             "resultat",
             "symbole_unite",
             "code_remarque",
             "mnemo_remarque",
             "code_statut",
             "mnemo_statut",
             "code_qualification",
             "libelle_qualification"),
 sort = "desc"
)
#> # A tibble: 125 × 13
#>    code_station libelle_station            date_prelevement code_parametre
#>    <chr>        <chr>                      <chr>            <chr>         
#>  1 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-12-28       1340          
#>  2 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-11-29       1340          
#>  3 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-11-02       1340          
#>  4 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-10-04       1340          
#>  5 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-09-06       1340          
#>  6 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-08-08       1340          
#>  7 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-07-11       1340          
#>  8 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-06-14       1340          
#>  9 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-05-16       1340          
#> 10 02115725     "LA CRUSNES \xc0 LONGUYON" 2023-04-19       1340          
#> # ℹ 115 more rows
#> # ℹ 9 more variables: libelle_parametre <chr>, resultat <dbl>,
#> #   symbole_unite <chr>, code_remarque <chr>, mnemo_remarque <chr>,
#> #   code_statut <chr>, mnemo_statut <chr>, code_qualification <chr>,
#> #   libelle_qualification <chr>

# Nitrate analysis results since 1 August 2016 for 5 stations
get_qualite_rivieres_analyse(
  code_station = c("02115725",
                   "02115650",
                   "02115685",
                   "02115700",
                   "02115715"),
  libelle_parametre = "Nitrates",
  date_debut_prelevement = "2016-08-01",
  code_qualification = 1,
  fields = c("code_station",
             "libelle_station",
             "libelle_parametre",
             "date_prelevement",
             "resultat",
             "symbole_unite",
             "code_remarque"),
 sort = "desc"
)
#> # A tibble: 257 × 7
#>    code_station libelle_station      date_prelevement libelle_parametre resultat
#>    <chr>        <chr>                <chr>            <chr>                <dbl>
#>  1 02115725     "LA CRUSNES \xc0 LO… 2023-12-28       Nitrates                24
#>  2 02115650     "LA CHIERS \xc0 CON… 2023-12-28       Nitrates                14
#>  3 02115685     "LE RUISSEAU DE NAN… 2023-12-28       Nitrates                24
#>  4 02115685     "LE RUISSEAU DE NAN… 2023-11-29       Nitrates                25
#>  5 02115650     "LA CHIERS \xc0 CON… 2023-11-29       Nitrates                12
#>  6 02115725     "LA CRUSNES \xc0 LO… 2023-11-29       Nitrates                23
#>  7 02115650     "LA CHIERS \xc0 CON… 2023-11-02       Nitrates                11
#>  8 02115685     "LE RUISSEAU DE NAN… 2023-11-02       Nitrates                30
#>  9 02115725     "LA CRUSNES \xc0 LO… 2023-11-02       Nitrates                28
#> 10 02115650     "LA CHIERS \xc0 CON… 2023-10-04       Nitrates                16
#> # ℹ 247 more rows
#> # ℹ 2 more variables: symbole_unite <chr>, code_remarque <chr>

# Geographical search by distance
get_qualite_rivieres_station(longitude = 5.62,
                             latitude = 49.44,
                             distance = 8,
                             fields = c("code_station", "libelle_station"))
#> # A tibble: 5 × 2
#>   code_station libelle_station                                    
#>   <chr>        <chr>                                              
#> 1 02115650     "LA CHIERS \xc0 CONS-LA-GRANDVILLE"                
#> 2 02115685     "LE RUISSEAU DE NANHEUL \xc0 PIERREPONT"           
#> 3 02115700     "LA CRUSNES \xc0 PIERREPONT"                       
#> 4 02115715     "LE RUISSEAU DES EURANTES \xc0 ARRANCY-SUR-CRUSNES"
#> 5 02115725     "LA CRUSNES \xc0 LONGUYON"                         

# }