
Map a group's segments under two rules, by grade, and its floodplain by the grade beside it
Source:R/compare_map.R
knw_compare_map.RdThree readings of one group for one species and stage, each as a static
figure (tmap, lakes and rivers styled through gq's registry) and, when
html is given, an interactive page (knw_compare_mapgl(), saved
self-contained):
rules: accessible segments coloured kept (habitat under both rules), lost (
defaultonly), gained (tuned only), neither;grade: accessible segments shaded by grade class;
floodplain: the floodplain cells shaded by the grade of the segment that owns them (
fp_cells, fromknw_floodplain_ha()'s join), where given.
Arguments
- segments
an
sfin EPSG:3005 withaccessible,stream_order,grade_classand the two logical rule columnsflag_defaultandflag_tuned.- water
an
sfof lake and river polygons for the group, orNULL.- title
character(1)names the figure in the message when nothing is drawn, and is the interactive page's title and legend title; the static figure draws no title (that belongs in the caption).- png
character(1)path for the static figure, orNULL: one panel for each ofpanelsthat can be drawn ("floodplain"needsfp_cells),ncolto a row.- html
character(1)path for the interactive page, orNULL.- fp_cells
NULL, or aSpatRasterof grade per floodplain cell.- ncol
integer(1)panels per row in the static figure, orNULLfor all panels side by side; each panel is 4 in by 4.6 in, soncol = 1stacks them for a narrow column.- panels
characterwhich static panels to draw, any of"rules","grade"and"floodplain"(drawn only wherefp_cellsis given).- mark
NULL, or ansfpolygon outlined on every static panel, such as the window of a zoomed map drawn by a second call on cropped segments.- lwd
numeric(1)multiplier on the static panels' line widths, for a zoomed window where stream-order widths read too thin.- legend
logical(1)draw the static panels' legends;FALSEfor a zoomed panel beside an overview that carries them.- labels
NULL, or ansfof points with alabelcolumn, drawn as numbered markers on every static panel (examples a table beside the map describes).- background
passed to
knw_compare_mapgl()for the interactive page.