fishobspgr is an R package that uses the pgfeatureserv package to query BC fish observation and fish passage web APIS.

Installation

You can install the development version of fishobspgr from GitHub with:

# install.packages("devtools")
devtools::install_github("poissonconsulting/fishobspgr")

Demonstration

Query fish observation events from ‘CLAY’ watershed group with species code ‘CO’.

collection_id <- "bcfishobs.fiss_fish_obsrvtn_events_sp"
filter <- list(species_code = "CO", watershed_group_code = "CLAY")

x <- fop_query_collection_observation(collection_id, filter = filter)
x[1:5, 1:5]
#>   agency_id           agency_name blue_line_key distance_to_stream
#> 1      <NA>                  <NA>     354088196           57.68213
#> 2      <NA>                  <NA>     354088366           12.00819
#> 3      <NA>                  <NA>     354088440          162.59549
#> 4      <NA> Consultants - General     354099135          249.54415
#> 5      <NA>                  <NA>     354099837           46.67525
#>   downstream_route_measure
#> 1                 78.33563
#> 2                  0.00000
#> 3                  0.00000
#> 4                  0.00000
#> 5                293.05660

Code of Conduct

Please note that the fishobspgr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.