Available endpoint:

  • get_poisson_observations retrieves data of scientific fishery operations

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

get_poisson_observations(...)

get_poisson_indicateurs(...)

get_poisson_operations(...)

get_poisson_stations(...)

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.

Examples

# \dontrun{
# Get the endpoints available for the API "Poisson"
list_endpoints(api = "poisson")
#> [1] "indicateurs"  "observations" "operations"   "stations"    

# List the stations available in Brest
get_poisson_stations(libelle_commune = "Brest")
#> # A tibble: 4 × 80
#>   code_station libelle_station uri_station statut_station date_modification_st…¹
#>   <chr>        <chr>           <chr>       <lgl>          <chr>                 
#> 1 04177250     PENFELD à BOHA… http://id.… TRUE           2010-03-17T00:00:00Z  
#> 2 NA           NA              NA          NA             NA                    
#> 3 NA           NA              NA          NA             NA                    
#> 4 NA           NA              NA          NA             NA                    
#> # ℹ abbreviated name: ¹​date_modification_station
#> # ℹ 75 more variables: coordonnee_x_station <dbl>, coordonnee_y_station <dbl>,
#> #   code_epsg_projection_station <int>, code_projection_station <chr>,
#> #   libelle_projection_station <chr>, localisation_precise_station <chr>,
#> #   pk_aval <dbl>, code_point_prelevement_aspe <chr>,
#> #   code_point_prelevement <chr>, statut_point_prelevement <lgl>,
#> #   date_modification_point_prelevement_aspe <chr>, code_support <chr>, …

# List the operations available in Brest
get_poisson_operations(libelle_commune = "Brest")
#> # A tibble: 12 × 231
#>    code_operation date_operation   etat_avancement_oper…¹ code_qualification_o…²
#>             <int> <chr>            <chr>                  <chr>                 
#>  1          90510 2023-09-19T14:0… Validé niveau 2        1                     
#>  2          86296 2021-09-15T13:0… Validé niveau 2        1                     
#>  3          81904 2019-08-28T13:1… Validé niveau 2        1                     
#>  4           8191 2017-10-04T13:4… Validé niveau 2        1                     
#>  5           8192 2015-09-30T08:0… Validé niveau 2        1                     
#>  6           8193 2013-09-24T08:0… Validé niveau 2        1                     
#>  7           6741 2011-09-15T14:0… Validé niveau 2        1                     
#>  8           6608 2009-09-30T14:0… Validé niveau 2        1                     
#>  9           6469 2007-09-26T09:3… Validé niveau 2        1                     
#> 10           6003 1995-10-12T14:3… En cours de saisie     4                     
#> 11           5241 1987-11-05T00:0… En cours de saisie     4                     
#> 12           5243 1987-11-05T00:0… En cours de saisie     4                     
#> # ℹ abbreviated names: ¹​etat_avancement_operation,
#> #   ²​code_qualification_operation
#> # ℹ 227 more variables: libelle_qualification_operation <chr>,
#> #   code_station <chr>, libelle_station <chr>, uri_station <chr>,
#> #   coordonnee_x_station <dbl>, coordonnee_y_station <dbl>,
#> #   code_epsg_projection_station <int>, code_projection_station <chr>,
#> #   libelle_projection_station <chr>, code_point_prelevement_aspe <chr>, …

# List the indicators available in Brest
get_poisson_indicateurs(libelle_commune = "Brest")
#> # A tibble: 9 × 532
#>   code_operation date_operation    etat_avancement_oper…¹ code_qualification_o…²
#>   <chr>          <chr>             <chr>                  <chr>                 
#> 1 90510          2023-09-19T14:00… Validé niveau 2        1                     
#> 2 86296          2021-09-15T13:05… Validé niveau 2        1                     
#> 3 81904          2019-08-28T13:15… Validé niveau 2        1                     
#> 4 8191           2017-10-04T13:45… Validé niveau 2        1                     
#> 5 8192           2015-09-30T08:00… Validé niveau 2        1                     
#> 6 8193           2013-09-24T08:00… Validé niveau 2        1                     
#> 7 6741           2011-09-15T14:00… Validé niveau 2        1                     
#> 8 6608           2009-09-30T14:00… Validé niveau 2        1                     
#> 9 6469           2007-09-26T09:30… Validé niveau 2        1                     
#> # ℹ abbreviated names: ¹​etat_avancement_operation,
#> #   ²​code_qualification_operation
#> # ℹ 528 more variables: libelle_qualification_operation <chr>,
#> #   code_station <chr>, libelle_station <chr>, uri_station <chr>,
#> #   coordonnee_x_station <dbl>, coordonnee_y_station <dbl>,
#> #   code_epsg_projection_station <int>, code_projection_station <chr>,
#> #   libelle_projection_station <chr>, code_point_prelevement_aspe <chr>, …

# Get the query parameters for the requested API/endpoint
list_params(api = "poisson",
                     endpoint = "observations")
#>  [1] "bbox"                            "code_alternatif_taxon"          
#>  [3] "code_bassin"                     "code_commune"                   
#>  [5] "code_departement"                "code_entite_hydrographique"     
#>  [7] "code_operation"                  "code_point_prelevement"         
#>  [9] "code_point_prelevement_aspe"     "code_qualification_operation"   
#> [11] "code_region"                     "code_station"                   
#> [13] "code_taxon"                      "code_type_lot"                  
#> [15] "codes_dispositifs_collecte"      "codes_pathologies_individu"     
#> [17] "codes_pathologies_lot"           "date_operation_max"             
#> [19] "date_operation_min"              "distance"                       
#> [21] "etat_avancement_operation"       "fields"                         
#> [23] "format"                          "latitude"                       
#> [25] "libelle_bassin"                  "libelle_commune"                
#> [27] "libelle_departement"             "libelle_entite_hydrographique"  
#> [29] "libelle_qualification_operation" "libelle_region"                 
#> [31] "libelle_station"                 "libelle_type_lot"               
#> [33] "libelles_dispositifs_collecte"   "longitude"                      
#> [35] "nom_commun_taxon"                "nom_latin_taxon"                
#> [37] "nombre_points_max"               "nombre_points_min"              
#> [39] "numero_passage"                  "objectifs_operation"            
#> [41] "page"                            "poids_individu_mesure_max"      
#> [43] "poids_individu_mesure_min"       "poids_lot_mesure_max"           
#> [45] "poids_lot_mesure_min"            "protocole_peche"                
#> [47] "size"                            "sort"                           
#> [49] "taille_individu_max"             "taille_individu_min"            

# Retrieve selected fields on a river fish sampled in Brest
library(dplyr)
#> 
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#> 
#>     filter, lag
#> The following objects are masked from ‘package:base’:
#> 
#>     intersect, setdiff, setequal, union
fields <- c("code_operation",
                "date_operation",
                "libelle_point_prelevement_aspe",
                "effectif_lot",
                "code_alternatif_taxon")

brest_fishes <- get_poisson_observations(
  list(
    libelle_commune = "Brest",
    fields = fields
    )
 ) %>%
 group_by_at(vars(-effectif_lot)) %>%
   summarise(nb_individals = sum(effectif_lot))
#> `summarise()` has grouped output by 'code_operation', 'date_operation'. You can
#> override using the `.groups` argument.

brest_fishes
#> # A tibble: 65 × 4
#> # Groups:   code_operation, date_operation [12]
#>    code_operation date_operation       code_alternatif_taxon nb_individals
#>    <chr>          <chr>                <chr>                         <int>
#>  1 5241           1987-11-05T00:00:00Z ANG                               2
#>  2 5241           1987-11-05T00:00:00Z CHA                              64
#>  3 5241           1987-11-05T00:00:00Z EPI                               4
#>  4 5241           1987-11-05T00:00:00Z LOF                              86
#>  5 5241           1987-11-05T00:00:00Z TRF                              86
#>  6 5241           1987-11-05T00:00:00Z VAI                               8
#>  7 5243           1987-11-05T00:00:00Z ANG                               2
#>  8 5243           1987-11-05T00:00:00Z EPI                              67
#>  9 5243           1987-11-05T00:00:00Z LOF                             603
#> 10 5243           1987-11-05T00:00:00Z TRF                              67
#> # ℹ 55 more rows
# }