Skip to contents

Habitat evidence

Read and validate the cited literature evidence and the intrinsic-potential model registry, and list their controlled vocabularies.

knw_literature_read()
Read the literature evidence table, filtered by species and variable
knw_literature_vocab()
Controlled vocabularies of the literature evidence table
knw_ip_read()
Read the intrinsic-potential model registry, filtered by species
knw_ip_vocab()
Controlled vocabularies of the intrinsic-potential model registry

Life-history timing

knw_timing_read()
Read the life-history timing table, filtered by group and species
knw_timing_stages()
Life stages in the life-history timing table

Fish records

knw_size_class()
Size class of each fish from a table of length breaks
knw_species()
The species the habitat evidence is built for
knw_fdis_place()
Pick each FDIS site visit's stream from the nearest snap and the streams its 1:50k code names
knw_fdis_quality()
Drop the FDIS site visits that cannot carry evidence, and count every drop
knw_fdis_species()
Catch, presence and absence per FDIS site visit and species
knw_spawner_evidence()
Spawner evidence per visit for the char species, from maturity codes
knw_fiss_visits()
Fish Data Submission workbook sites as visits, with the effort they recorded
knw_bcfishobs_match()
Match bcfishobs records to the FDIS site visits they came from

Place site visits on link’s segments with every species’ access and habitat flags; read a species’ segments, flow, width, regulated reaches, natural barriers downstream and the walks to rivers; count where link’s two access columns disagree; carry each segment’s minimal-network parent; and check that a database-bound run is on the database’s host.

knw_link_place()
Place site visits on link's segments, with access and habitat for every species
knw_parent_join()
Carry each visit's minimal-network parent onto its full-network segment
knw_link_segments()
link's segments for one species in a set of groups, with flow and access, for grading
knw_link_flow()
wet's annual flow on FWA segments, with a parent fallback
knw_link_width()
The channel width link reads on a stream nobody measured, and the waterbody tests
knw_link_regulated()
Points on the FWA network downstream of a regulating dam
knw_link_barrier_dnstr()
Whether a natural barrier to a species lies downstream of each point
knw_link_walks()
Network distance downstream to the first river of each size, on each flow source
knw_walk_md5()
The walk's code, by its md5
knw_discharge_load()
The flow load the database serves, by its table comment
knw_build_record()
The database build a run reads, and the check that it is the evidence's
knw_db_latency() knw_db_latency_check()
The database's round trip, and the check that a database-bound run is on its host
knw_link_access_check()
How link's two access columns disagree, per species

Tuning

Build candidate rules around link’s thresholds and score them on held-out watershed groups, fit the joint use curve at the pick, and grade every segment by expected use. The building, scoring and fitting run in one call for every species and stage the evidence can speak to.

knw_tune_grid()
The candidate rules for one species and stage, around link's own thresholds
knw_walk_index()
Index the walks by source and river size, for the exception test
knw_rule_in()
Whether each visit is in under one rule, on the stream branch
knw_tune_score()
Score candidate rules on held-out watershed groups
knw_tune_repick()
Pick a rule again from a tuning table, at another width of the region
knw_tune_pick_report()
Set a tuning run's pick beside the published one
knw_tune_anchor()
How far each starting point moved the pick from the best-scoring rule
knw_tune_curve()
One curve per species and stage: use against size, gradient and distance to a river, together
knw_grade()
Grade segments by expected use, 0 to 1
knw_grade_species()
Grade every segment of a species' groups by its tuned curve
knw_tune_smoke()
Score a handful of rules and gate the scorer before a full tuning run
knw_tune_run()
Tune every species and stage the evidence can speak to, in one run

Published results and comparison

knw_thresholds_table()
The published thresholds table, from a tuning run's outputs
knw_tune_promote()
Promote a candidate tuning run into the tracked tables
knw_grade_record_write() knw_grade_record_read() knw_grade_record_check()
A grade table's record: what the run made, in one tracked row
knw_archive_setup()
Where the archive keeps a run: its setup folder
knw_archive_plan()
What the archive stores for a run, and where
knw_archive_put()
Store a run in the archive, and record where
knw_archive_pull()
Restore a run from the archive into a tree's ignored data/
knw_archive_undo()
Record an undone promotion in the archive's index
knw_archive_index_read()
The archive's index: what is stored where
knw_site_gradient_visits() knw_site_gradient_population() knw_gradient_agree() knw_gradient_flips()
How a measured site gradient compares with a modelled one
knw_run_ledger()
The evidence ledger a set of tuning tables was scored on
knw_publish()
Write a set of tables as Parquet with a manifest, and upload them
knw_compare_rules()
Set a tuned rule beside link's default on link's own segments
knw_floodplain_ha()
Floodplain hectares beside each segment, from a catalog item's floodplain
knw_compare_map()
Map a group's segments under two rules, by grade, and its floodplain by the grade beside it
knw_compare_mapgl()
The interactive map of a group's segments under two rules

Crossings and past reports

Pull PSCIS crossing layers for a watershed group and derive the crossing and past-report tables; check stream names before searching by name.

knw_pscis_layers()
Provincial PSCIS layers, by phase
knw_pscis_pull()
Pull PSCIS layers clipped to a watershed group
knw_pscis_crossings()
Crossings table from the PSCIS assessment layer
knw_pscis_reports()
Past reports referenced by PSCIS records
knw_gnis_collisions()
Which GNIS stream names collide across watershed groups?

Package

knowledge knowledge-package
knowledge: Fisheries Evidence and Tuned Habitat Thresholds for BC Watershed Groups