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(...)
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
A tibble::tibble with one row by record and one column by field.
# \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: 1 × 72
#> code_station libelle_station uri_station statut_station date_modification_st…¹
#> <lgl> <lgl> <lgl> <lgl> <lgl>
#> 1 NA NA NA NA NA
#> # ℹ abbreviated name: ¹date_modification_station
#> # ℹ 67 more variables: coordonnee_x_station <lgl>, coordonnee_y_station <lgl>,
#> # code_epsg_projection_station <lgl>, code_projection_station <lgl>,
#> # libelle_projection_station <lgl>, localisation_precise_station <lgl>,
#> # pk_aval <lgl>, code_point_prelevement_aspe <chr>,
#> # code_point_prelevement <lgl>, statut_point_prelevement <lgl>,
#> # date_modification_point_prelevement_aspe <chr>, code_support <lgl>, …
# List the operations available in Brest
get_poisson_operations(libelle_commune = "Brest")
#> # A tibble: 1 × 199
#> code_operation date_operation etat_avancement_oper…¹ code_qualification_o…²
#> <int> <chr> <chr> <chr>
#> 1 6003 1995-10-12T14:30… En cours de saisie 4
#> # ℹ abbreviated names: ¹etat_avancement_operation,
#> # ²code_qualification_operation
#> # ℹ 195 more variables: libelle_qualification_operation <chr>,
#> # code_station <lgl>, libelle_station <lgl>, uri_station <lgl>,
#> # coordonnee_x_station <lgl>, coordonnee_y_station <lgl>,
#> # code_epsg_projection_station <lgl>, code_projection_station <lgl>,
#> # libelle_projection_station <lgl>, code_point_prelevement_aspe <chr>, …
# List the indicators available in Brest
get_poisson_indicateurs(libelle_commune = "Brest")
#> # A tibble: 0 × 0
# 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: 5 × 4
#> # Groups: code_operation, date_operation [1]
#> code_operation date_operation code_alternatif_taxon nb_individals
#> <chr> <chr> <chr> <int>
#> 1 6003 1995-10-12T14:30:00Z ANG 3
#> 2 6003 1995-10-12T14:30:00Z CHA 1
#> 3 6003 1995-10-12T14:30:00Z EPI 1
#> 4 6003 1995-10-12T14:30:00Z LOF 2
#> 5 6003 1995-10-12T14:30:00Z TRF 17
# }