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(...)

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 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_hydro"              
#>  [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_hydro"           
#> [29] "libelle_point_prelevement_aspe"  "libelle_qualification_operation"
#> [31] "libelle_region"                  "libelle_station"                
#> [33] "libelle_type_lot"                "libelles_dispositifs_collecte"  
#> [35] "longitude"                       "nom_commun_taxon"               
#> [37] "nom_latin_taxon"                 "nombre_points_max"              
#> [39] "nombre_points_min"               "numero_passage"                 
#> [41] "objectifs_operation"             "page"                           
#> [43] "poids_individu_mesure_max"       "poids_individu_mesure_min"      
#> [45] "poids_lot_mesure_max"            "poids_lot_mesure_min"           
#> [47] "protocole_peche"                 "size"                           
#> [49] "sort"                            "taille_individu_max"            
#> [51] "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 <- paste("code_operation",
                "date_operation",
                "libelle_point_prelevement_aspe",
                "effectif_lot",
                "code_alternatif_taxon",
                sep = ",")

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',
#> 'libelle_point_prelevement_aspe'. You can override using the `.groups`
#> argument.

brest_fishes
#> # A tibble: 5 × 5
#> # Groups:   code_operation, date_operation, libelle_point_prelevement_aspe [1]
#>   code_operation date_operation       libelle_point_prelevemen…¹ code_…² nb_in…³
#>   <chr>          <chr>                <chr>                      <chr>     <int>
#> 1 6003           1995-10-12T14:30:00Z La Penfeld à Brest         ANG           3
#> 2 6003           1995-10-12T14:30:00Z La Penfeld à Brest         CHA           1
#> 3 6003           1995-10-12T14:30:00Z La Penfeld à Brest         EPI           1
#> 4 6003           1995-10-12T14:30:00Z La Penfeld à Brest         LOF           2
#> 5 6003           1995-10-12T14:30:00Z La Penfeld à Brest         TRF          17
#> # … with abbreviated variable names ¹​libelle_point_prelevement_aspe,
#> #   ²​code_alternatif_taxon, ³​nb_individals
# }