fishobspgr
is an R package that uses the pgfeatureserv
package to
query BC fish observation
and fish passage web
APIS.
You can install the development version of fishobspgr from GitHub with:
# install.packages("devtools")
devtools::install_github("poissonconsulting/fishobspgr")
Get information about the observation collections, passage collections or a collection’s properties:
fop_collections_observation()
fop_collections_passage()
fop_collection_observation_properties()
fop_collection_passage_properties()
Query features from a observation collection or passage collection:
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
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.