| Title: | Making Plan Team Smoother |
|---|---|
| Description: | Create planteam summaries, catch reports, and spec tables |
| Authors: | Ben Williams |
| Maintainer: | Ben Williams <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-16 08:14:18 UTC |
| Source: | https://github.com/afsc-assessments/planteam |
Catch report generator
catch_report( title, authors, stock, area, year, last_full_year, next_full_year, catch_data_date, output_dir = NULL )catch_report( title, authors, stock, area, year, last_full_year, next_full_year, catch_data_date, output_dir = NULL )
title |
what do you want to call it? |
authors |
who are the authors |
stock |
a lowercase shorthand that matches with the data file https://docs.google.com/spreadsheets/d/1uHmCuY3GXfSBCbsP61nAQeATBfoslXeS3PQNLlioWIk/edit#gid=0 |
area |
lowercase typically "GOA" or "BSAI", though other "BSAI" areas can be called (e.g., Bogoslof) - must match the google sheet names |
year |
current year |
last_full_year |
last year that a full assessment was done |
next_full_year |
next year that a full assessment is scheduled to occur |
catch_data_date |
date that catch data are through, e.g., "November 5, 2023" |
output_dir |
default output is the project, if you have a year folder the something like "2023" to id which folder to place the results in |
/dontrun{ catch_report(title = "1.B. Assessment of walleye pollock in the Bogoslof Island Region", authors = "James N. Ianelli, S. J. Barbeaux, Ivonne Ortiz, and D. McKelvey", stock = "pollock", area = "Bogoslof", year = 2023, last_full_year = 2021, next_full_year = 2024, catch_data_date = "November 5, 2023", output_dir = "2023") }/dontrun{ catch_report(title = "1.B. Assessment of walleye pollock in the Bogoslof Island Region", authors = "James N. Ianelli, S. J. Barbeaux, Ivonne Ortiz, and D. McKelvey", stock = "pollock", area = "Bogoslof", year = 2023, last_full_year = 2021, next_full_year = 2024, catch_data_date = "November 5, 2023", output_dir = "2023") }
Send AKRO catch data to the plan team google sheet
catch_to_sheet(year, data, area)catch_to_sheet(year, data, area)
year |
current year |
data |
catch data file |
area |
'goa' or 'bsai' - currently this only works for 'goa' |
/dontrun{ catch_to_sheet(year=2023, data=goa_nov_catch, area='goa') }/dontrun{ catch_to_sheet(year=2023, data=goa_nov_catch, area='goa') }
age plus group to biomass name
nameit(data)nameit(data)
data |
input dataframe |
read in specs dataframe
read_specs( path, year, range = "A5:L91", col_names = c("species", "area", "0ofl", "0abc", "0tac", "0catch", "1ofl", "1abc", "1tac", "1catch", "2ofl", "2abc"), col_types = c("text", "text", rep("numeric", 10)) )read_specs( path, year, range = "A5:L91", col_names = c("species", "area", "0ofl", "0abc", "0tac", "0catch", "1ofl", "1abc", "1tac", "1catch", "2ofl", "2abc"), col_types = c("text", "text", rep("numeric", 10)) )
path |
location of file |
year |
current year |
range |
the range of cells to include from the spreadsheet default:A5:L91 |
col_names |
specify names of all columns included |
col_types |
specify column types of all columns included |
## Not run: read_specs('data/goa_specs2022.xlxs', col_names = c("species", "area", "0ofl", "0abc", "0tac", "0catch", "1ofl", "1abc", "1tac", "1catch", "2ofl", "2abc"), col_types = c("text", "text", rep("numeric", 10))) ## End(Not run)## Not run: read_specs('data/goa_specs2022.xlxs', col_names = c("species", "area", "0ofl", "0abc", "0tac", "0catch", "1ofl", "1abc", "1tac", "1catch", "2ofl", "2abc"), col_types = c("text", "text", rep("numeric", 10))) ## End(Not run)
Create an Excel specs table
spec_table(year, month = "sep", area = "goa", catch_date = "11/9/2023")spec_table(year, month = "sep", area = "goa", catch_date = "11/9/2023")
year |
current year |
month |
sep or nov specs |
area |
goa or bsai |
catch_date |
date that catch dat is pulled e.g., ("9/10/2023") |
/dontrun{ spec_table(year, month = "sep", area = "goa", catch_date="11/9/2023") }/dontrun{ spec_table(year, month = "sep", area = "goa", catch_date="11/9/2023") }