Skip to contents

Retrieve all wolf removal authorizations from depredation.groups. Each pack stores its authorizations as a JSON array under metadata.authorizations; this function walks every pack, flattens those entries into one row per authorization, and prepends pack_id and pack_name columns. Missing per-row ids are backfilled with a fresh UUID (the persisted record gets the id on the next write that touches its pack).

Usage

dep_read_authorizations(
  pack_id = NULL,
  pack_name = NULL,
  date_authorized = NULL,
  county = NULL,
  includes = NULL,
  page_args = list(),
  dry_run = FALSE,
  verbosity = 0
)

Arguments

pack_id

Integer vector. Filter to authorizations on these pack ids (post-flatten).

pack_name

Character vector. Filter to authorizations on packs with these names (post-flatten).

date_authorized

Character. Filter authorizations by date (string match against the stored date).

county

Character. Filter authorizations by county.

includes, page_args

Passed to dep_read_groups().

dry_run, verbosity

Passed to dep_read_groups().

Value

A tibble with columns pack_id, pack_name, id, and the authorization fields (pack_or_area, area_authorized, date_authorized, timing_of_authorization, authorization_type, county, total_planned, wolves_removed, lead, comments).