Skip to contents

Returns available form types from the package registry. Each type corresponds to a field data collection form (GPKG) that can be included in a project. The type value is the shared key used across all form lifecycle functions.

Usage

rfp_form_types(type = NULL)

Arguments

type

Character. Optional filter - return only this form type. If NULL (default), returns all available types.

Value

A tibble with columns:

type

form type - the shared key across form functions

description

human-readable form name

label

short display name used in a QGIS layer name, e.g. PSCIS, eDNA. Not derivable - the description is a sentence and the type is a slug, while the field projects have used these exact spellings for years

template_source

upstream spreadsheet, for template-derived forms

schema_source

schema CSV under inst/extdata/forms/, for schema-built forms

geometry

layer geometry type (currently point for every form)

symbol

symbol template in inst/extdata/forms/symbols/

color

hex marker colour, e.g. #E31AC8

has_spatial

whether the form carries a geometry column

Details

The registry is also the per-form build config read by rfp_form_build(). A form is either template-derived (schema lives in an upstream RISC/MoTi spreadsheet named by template_source) or schema-built (schema lives in the CSV named by schema_source, and the GPKG + QML are generated). Exactly one of the two is populated for any given row.

See also

Examples

# List all form types
rfp_form_types()
#> # A tibble: 16 × 11
#>    type    description label template_source schema_source geometry symbol color
#>    <chr>   <chr>       <chr> <chr>           <chr>         <chr>    <chr>  <chr>
#>  1 pscis   Fish Passa… PSCIS "pscis_assessm… "schema/psci… "point"  "mark… "#B8…
#>  2 fiss_s… Fish Habit… FISS… "FDS_Template2… "schema/fiss… "point"  "mark… "#33…
#>  3 fish_s… Fish Indiv… Fish… "FDS_Template2… ""            "point"  ""     ""   
#>  4 fhap    Fish Habit… FHAP  "FHAP_template… ""            "point"  ""     ""   
#>  5 edna    Environmen… eDNA  "template_edna… ""            "point"  ""     ""   
#>  6 monito… Restoratio… Moni… "pscis_assessm… ""            "point"  ""     ""   
#>  7 vri_qa  VRI Polygo… VRI … ""              "schema/vri_… "point"  "mark… "#00…
#>  8 transi… Land Cover… Tran… ""              "schema/tran… "point"  "mark… "#FF…
#>  9 exceed… LRMP Zero-… Exce… ""              "schema/exce… "point"  "mark… "#E3…
#> 10 viewsc… Viewscape … View… ""              "schema/view… "point"  "mark… "#75…
#> 11 monito… Fish Passa… Fish… ""              "schema/moni… "point"  "mark… "#1F…
#> 12 monito… Inventory … Gene… ""              "schema/moni… "point"  "mark… "#A6…
#> 13 scan    Phone LiDA… Scan  ""              "schema/scan… "point"  "mark… "#00…
#> 14 observ… Generic In… Obse… ""              "schema/obse… "point"  "mark… "#FF…
#> 15 cabin_… CABIN Bent… CABI… "cabin_templat… "schema/cabi… "point"  "mark… "#6A…
#> 16 cabin_… CABIN Pebb… CABI… ""              "schema/cabi… ""       "mark… "#6A…
#> # ℹ 3 more variables: label_expression <chr>, has_spatial <lgl>, parent <chr>

# Get info for a specific type
rfp_form_types("pscis")
#> # A tibble: 1 × 11
#>   type  description    label template_source schema_source geometry symbol color
#>   <chr> <chr>          <chr> <chr>           <chr>         <chr>    <chr>  <chr>
#> 1 pscis Fish Passage … PSCIS pscis_assessme… schema/pscis… point    marke… #B80…
#> # ℹ 3 more variables: label_expression <chr>, has_spatial <lgl>, parent <chr>

# Available type values (for use in other form functions)
rfp_form_types()$type
#>  [1] "pscis"                   "fiss_site"              
#>  [3] "fish_sample"             "fhap"                   
#>  [5] "edna"                    "monitoring"             
#>  [7] "vri_qa"                  "transition_qa"          
#>  [9] "exceedance"              "viewscape"              
#> [11] "monitoring_fish_passage" "monitoring_general"     
#> [13] "scan"                    "observation"            
#> [15] "cabin_visit"             "cabin_visit_pebble"