Skip to contents

Overview

rfp_project_create() assembles a complete field-ready QGIS project in one call. It downloads spatial data, copies field forms and templates, and builds a project directory ready to push to Mergin Maps for mobile collection.

Quick start

library(rfp)

rfp_project_create(
  name = "elk_river_2026",
  watershed_groups = c("ELKR"),
  template = "bcfishpass_mobile",
  forms = c("pscis", "fiss_site")
)
#> ℹ Creating project directory: ~/Projects/gis/elk_river_2026
#> ℹ Downloading bcdata layers
#> ℹ Downloading fwa layers
#> ℹ Downloading aws layers
#> ℹ Copying QGIS template: bcfishpass_mobile
#> ℹ Copying form: pscis
#> ℹ Copying form: fiss_site
#> ✔ Project created: ~/Projects/gis/elk_river_2026

Output directory structure

~/Projects/gis/elk_river_2026/
├── elk_river_2026.qgs              QGIS project file
├── background_layers.gpkg          Spatial data (16+ layers)
├── habitat_lateral.tif             Lateral habitat raster
├── form_pscis.gpkg                 PSCIS assessment form
├── form_fiss_site.gpkg             Fish habitat site form
└── ignore_mobile/
    ├── photos/                     Field photo directory
    ├── methods/                    Provincial methods PDFs
    └── templates/                  Provincial form templates

The ignore_mobile/ directory is excluded from Mergin Maps sync — it holds reference documents for office use.

Available templates

rfp_project_templates()
#> # A tibble: 2 x 3
#>   name                  description                                        path
#>   <chr>                 <chr>                                              <chr>
#> 1 bcfishpass_mobile     Fish passage assessment workflow                   /...
#> 2 bcrestoration_mobile  Restoration planning and monitoring workflow       /...

Available forms

Forms are pre-built GeoPackage databases shipped with the package:

Form Type
pscis Fish Passage Stream Crossing Assessment
fiss_site Fish Habitat Site Assessment
fish_sample Fish Individual Sample Data
fhap Fish Habitat Assessment Protocol
edna Environmental DNA Sampling
monitoring Restoration Monitoring

Customising data sources

By default, rfp_project_create() downloads all three source types (bcdata, fwa, aws). To skip a source:

rfp_project_create(
  name = "quick_project",
  watershed_groups = c("ADMS"),
  sources = c("bcdata", "fwa")   # skip aws
)

Applying styles

After creating a project, apply gq registry styles so layers look right in QGIS:

rfp_styles_apply("~/Projects/gis/elk_river_2026/background_layers.gpkg")
#> ✔ Styles applied: 11 styled, 5 skipped

See vignette("styles") for details on the style pipeline.

Deploying to Mergin Maps

Push the project to Mergin Maps for mobile field collection:

rfp_mergin_create(
  "newgraph/elk_river_2026",
  "~/Projects/gis/elk_river_2026"
)

# Grant access to field crew
rfp_mergin_share("newgraph/elk_river_2026", "field_tech_1", "writer")
rfp_mergin_share("newgraph/elk_river_2026", "field_tech_2", "writer")

See vignette("mergin") for the full sync workflow.