Title: | Package to interface with the WDFW Puget Sound sampling database |
---|---|
Description: | The pssp package serves as an interface between R and the Puget Sound sampling database. It"s goal is to ease the burden of retrieving and analyzing sport creel information in Puget Sound. |
Authors: | Ty Garber [aut, cre] |
Maintainer: | Ty Garber <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0 |
Built: | 2024-12-22 06:20:11 UTC |
Source: | https://github.com/FRAMverse/pssp |
Adds a time step column to a dataframe
add_time_steps( .data, date_column = "survey_datetime", species = c("chinook", "coho") )
add_time_steps( .data, date_column = "survey_datetime", species = c("chinook", "coho") )
.data |
dataframe |
date_column |
Column of the datetime |
species |
Species, either chinook or coho |
## Not run: df |> add_time_steps() ## End(Not run)
## Not run: df |> add_time_steps() ## End(Not run)
Finds in-sample boats during the flight and calculates various numbers from it
aerial_estimator(catch_area, start_date, end_date)
aerial_estimator(catch_area, start_date, end_date)
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
Other Aerial Effort Surveys:
aerial_estimator_stats()
,
aerial_pull()
## Not run: df <- aerial_estimator('07', '2021-07-01', '2021-07-07')
## Not run: df <- aerial_estimator('07', '2021-07-01', '2021-07-07')
Calculaties the adjusted proportion and variance of the aerial estimator table
aerial_estimator_stats(.data, bad_flights = FALSE)
aerial_estimator_stats(.data, bad_flights = FALSE)
.data |
Dataframe |
bad_flights |
Throws out flights where there were more boats sampled at the dock than see from the air |
Other Aerial Effort Surveys:
aerial_estimator()
,
aerial_pull()
## Not run: df <- aerial_estimator('07', '2021-07-01', '2021-07-07') df |> aerial_estimator_stats() ## End(Not run)
## Not run: df <- aerial_estimator('07', '2021-07-01', '2021-07-07') df |> aerial_estimator_stats() ## End(Not run)
Pulls the aerial data
aerial_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE )
aerial_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
Other Aerial Effort Surveys:
aerial_estimator()
,
aerial_estimator_stats()
## Not run: df <- aerial_pull('07', '2021-07-01', '2021-07-07')
## Not run: df <- aerial_pull('07', '2021-07-01', '2021-07-07')
Provides a heat map of angling effort
bs_map(.data, blur = 25, max = 0.05, radius = 10)
bs_map(.data, blur = 25, max = 0.05, radius = 10)
.data |
Dataframe |
blur |
Inherited argument from leaflet |
max |
Inherited argument from leaflet |
radius |
Inherited argument from leaflet |
Other Boat Effort Surveys:
bs_pull()
,
bs_site_weights()
,
bs_site_weights_in()
,
bs_site_weights_out()
## Not run: bs_data |> bs_map()
## Not run: bs_data |> bs_map()
Queries RMIS for release infomation, defaults to tagged releases
bs_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
bs_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
dsn |
DSN for the database connection. Default 'pssp_prod64' |
Other Boat Effort Surveys:
bs_map()
,
bs_site_weights()
,
bs_site_weights_in()
,
bs_site_weights_out()
## Not run: bs_data <- bs_pull('10', '2021-11-01', '2021-12-04')
## Not run: bs_data <- bs_pull('10', '2021-11-01', '2021-12-04')
Calculates site weights
bs_site_weights(.data, sample_type = c("in_sample", "out_sample"))
bs_site_weights(.data, sample_type = c("in_sample", "out_sample"))
.data |
Dataframe |
sample_type |
Return in sample site weights or out of sample site weights |
Other Boat Effort Surveys:
bs_map()
,
bs_pull()
,
bs_site_weights_in()
,
bs_site_weights_out()
## Not run: bs_data |> bs_site_weights(sample_type = 'in_sample') ## Not run: bs_data |> bs_site_weights(sample_type = 'out_sample')
## Not run: bs_data |> bs_site_weights(sample_type = 'in_sample') ## Not run: bs_data |> bs_site_weights(sample_type = 'out_sample')
Calculates in-sample site weights
bs_site_weights_in(.data)
bs_site_weights_in(.data)
.data |
Dataframe |
Other Boat Effort Surveys:
bs_map()
,
bs_pull()
,
bs_site_weights()
,
bs_site_weights_out()
## Not run: bs_data |> bs_site_weights_in()
## Not run: bs_data |> bs_site_weights_in()
Calculates out-of-sample site weights
bs_site_weights_out(.data)
bs_site_weights_out(.data)
.data |
Dataframe |
Other Boat Effort Surveys:
bs_map()
,
bs_pull()
,
bs_site_weights()
,
bs_site_weights_in()
## Not run: bs_data |> bs_site_weights_out()
## Not run: bs_data |> bs_site_weights_out()
Adds StatWeek to Dataframe
calculate_total_length( .data, fork_length_column = "fork_length", size_class = TRUE, minimum_size_limit_inches = 22 )
calculate_total_length( .data, fork_length_column = "fork_length", size_class = TRUE, minimum_size_limit_inches = 22 )
.data |
Dataframe |
fork_length_column |
Column name of fork lengths provided |
size_class |
Adds size class column (sublegal and legal) |
minimum_size_limit_inches |
Size limit (total length) of fishery in inches |
## Not run: df |> calculate_total_length() ## End(Not run)
## Not run: df |> calculate_total_length() ## End(Not run)
Checks if data is current, if it is then updates, if not passes through
check_freshness(days = 3)
check_freshness(days = 3)
days |
The number of days to check with the last update of the materialized views |
## Not run: check_freshness() ## End(Not run)
## Not run: check_freshness() ## End(Not run)
Pulls lengths and cwts from dockside information
ds_bio_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, check_fresh = TRUE, fresh = FALSE )
ds_bio_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, check_fresh = TRUE, fresh = FALSE )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of |
int_dates |
Returns year, month, day integer columns instead of a date field |
fill_zero |
Fills NA's with zeros |
check_fresh |
Boolean. Checks whether data is current |
fresh |
Boolean. Ensures data is updated |
Other Dockside Creel Surveys:
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: ds_bio_data <- ds_bio_pull('10', '2021-11-01', '2021-12-04') ## Not run: ds_bio_data <- ds_bio_pull(c('10', '09'), '2021-11-01', '2021-12-04')
## Not run: ds_bio_data <- ds_bio_pull('10', '2021-11-01', '2021-12-04') ## Not run: ds_bio_data <- ds_bio_pull(c('10', '09'), '2021-11-01', '2021-12-04')
Pulls Dockside Encounters
ds_encounters( catch_area, start_date, end_date, pretty = TRUE, bias_corrected = TRUE, minimum_size_limit_inches = 22 )
ds_encounters( catch_area, start_date, end_date, pretty = TRUE, bias_corrected = TRUE, minimum_size_limit_inches = 22 )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
pretty |
If TRUE will return a summarized dataframe, if FALSE will return a list to be used in other calculations |
bias_corrected |
Will return proportions with bias correction |
minimum_size_limit_inches |
Minimum size limit for fishery |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: dockside_encounters <- ds_encounters('10', '2021-11-01', '2021-12-04')
## Not run: dockside_encounters <- ds_encounters('10', '2021-11-01', '2021-12-04')
Filters to in sample locations with study design input
ds_filter_insample(.data, design = c("murthy", "aerial"))
ds_filter_insample(.data, design = c("murthy", "aerial"))
.data |
Dataframe |
design |
Either murthy or aerial |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df |> ds_filter_insample(design = 'murthy')
## Not run: df |> ds_filter_insample(design = 'murthy')
Filters to in sample locations with a Aerial study design
ds_filter_insample_aerial(.data)
ds_filter_insample_aerial(.data)
.data |
Dataframe |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df |> ds_filter_insample_aerial()
## Not run: df |> ds_filter_insample_aerial()
Filters to in sample locations with a Murthy study design
ds_filter_insample_murthy(.data)
ds_filter_insample_murthy(.data)
.data |
Dataframe |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df |> ds_filter_insample_murthy()
## Not run: df |> ds_filter_insample_murthy()
Makes a chart comparing current year CPUE vs previous years
ds_historical_cpue_chart( catch_area, start_date, end_date, species = c("chinook", "coho", "pink"), smoothing_method = "loess", clipped_only = T )
ds_historical_cpue_chart( catch_area, start_date, end_date, species = c("chinook", "coho", "pink"), smoothing_method = "loess", clipped_only = T )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
species |
Species to look for - chinook, pink, coho |
smoothing_method |
Default loess. Takes method arguments from |
clipped_only |
Will use only ad clipped fish |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: ds_historical_cpue_chart('10', '2021-11-01', '2021-12-04') ## Not run: ds_historical_cpue_chart('10', '2021-11-01', '2021-12-04') + ggtitle('New Title')
## Not run: ds_historical_cpue_chart('10', '2021-11-01', '2021-12-04') ## Not run: ds_historical_cpue_chart('10', '2021-11-01', '2021-12-04') + ggtitle('New Title')
Gets effort data for our dockside sampling
ds_pull_sampling_effort(marine_area, start_date, end_date)
ds_pull_sampling_effort(marine_area, start_date, end_date)
marine_area |
Valid marine area code |
start_date |
Start date of search |
end_date |
End date of search |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df <- ds_pull_sampling_effort('10', '2021-01-01', '2021-12-31')
## Not run: df <- ds_pull_sampling_effort('10', '2021-01-01', '2021-12-31')
Pulls release information for chinook and coho with legal size status
ds_releases_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, check_fresh = TRUE, fresh = FALSE )
ds_releases_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, check_fresh = TRUE, fresh = FALSE )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
int_dates |
Returns year, month, day integer columns instead of a date field |
fill_zero |
Boolean. Fills NA's with zeros. |
check_fresh |
Boolean. Checks whether data is current |
fresh |
Boolean. Ensures data is updated |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: ds_rel_data <- ds_releases_pull('10', '2021-11-01', '2021-12-04') ## Not run: ds_rel_data <- ds_releases_pull(c('10', '09'), '2021-11-01', '2021-12-04')
## Not run: ds_rel_data <- ds_releases_pull('10', '2021-11-01', '2021-12-04') ## Not run: ds_rel_data <- ds_releases_pull(c('10', '09'), '2021-11-01', '2021-12-04')
Queries RMIS for release infomation, defaults to tagged releases
ds_salmon_summary( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
ds_salmon_summary( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
int_dates |
Returns year, month, day integer columns instead of a date field |
fill_zero |
Fill NA's with zeros. |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
dsn |
DSN for the database connection. Default 'pssp_prod64' |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: ds_data <- ds_salmon_summary('10', '2021-11-01', '2021-12-04') ## Not run: ds_data <- ds_salmon_summary(c('11','10'), '2021-11-01', '2021-12-04')
## Not run: ds_data <- ds_salmon_summary('10', '2021-11-01', '2021-12-04') ## Not run: ds_data <- ds_salmon_summary(c('11','10'), '2021-11-01', '2021-12-04')
Gets effort data and summarizes by survey trips and survey hours by sampler
ds_sampling_effort_sampler_summary(marine_area, start_date, end_date)
ds_sampling_effort_sampler_summary(marine_area, start_date, end_date)
marine_area |
Valid marine area code |
start_date |
Start date of search |
end_date |
End date of search |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df <- ds_sampling_effort_sampler_summary('10', '2021-01-01', '2021-12-31')
## Not run: df <- ds_sampling_effort_sampler_summary('10', '2021-01-01', '2021-12-31')
Gets effort data and summarizes by survey trips and survey hours
ds_sampling_effort_summary(marine_area, start_date, end_date)
ds_sampling_effort_summary(marine_area, start_date, end_date)
marine_area |
Valid marine area code |
start_date |
Start date of search |
end_date |
End date of search |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
identify_in_sample()
,
marine_pull()
## Not run: df <- ds_sampling_effort_summary('10', '2021-01-01', '2021-12-31')
## Not run: df <- ds_sampling_effort_summary('10', '2021-01-01', '2021-12-31')
Identifys in-sample locations by adding in_sampling column
identify_in_sample( .data, location_code_column = "location_code", design = c("murthy", "aerial"), named = FALSE )
identify_in_sample( .data, location_code_column = "location_code", design = c("murthy", "aerial"), named = FALSE )
.data |
Dataframe |
location_code_column |
The column in dataframe where the location codes are. |
design |
Either murthy or aerial |
named |
Boolen. Returns a column of in/out of sample. |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
marine_pull()
## Not run: df |> identify_in_sample(design = 'murthy')
## Not run: df |> identify_in_sample(design = 'murthy')
Vectorized approach to calculating the management week, returns an integer
management_week(date)
management_week(date)
date |
A column with dates |
## Not run: data_frame |> mutate(mngmt_week = management_week(date_field)) ## End(Not run)
## Not run: data_frame |> mutate(mngmt_week = management_week(date_field)) ## End(Not run)
Queries dockside information from pssp_dev
marine_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, fresh = FALSE, check_fresh = TRUE )
marine_pull( catch_area, start_date, end_date, int_dates = FALSE, fill_zero = FALSE, fresh = FALSE, check_fresh = TRUE )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
int_dates |
Returns year, month, day integer columns instead of a date field |
fill_zero |
Fill NA's with zeros. |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
Other Dockside Creel Surveys:
ds_bio_pull()
,
ds_encounters()
,
ds_filter_insample()
,
ds_filter_insample_aerial()
,
ds_filter_insample_murthy()
,
ds_historical_cpue_chart()
,
ds_pull_sampling_effort()
,
ds_releases_pull()
,
ds_salmon_summary()
,
ds_sampling_effort_sampler_summary()
,
ds_sampling_effort_summary()
,
identify_in_sample()
## Not run: marine_pull <- marine_pull('10', '2021-11-01', '2021-12-04') ## Not run: marine_pull <- marine_pull(c('10', '09'), '2021-11-01', '2021-12-04')
## Not run: marine_pull <- marine_pull('10', '2021-11-01', '2021-12-04') ## Not run: marine_pull <- marine_pull(c('10', '09'), '2021-11-01', '2021-12-04')
Gets the last time materialized views were updated
pssp_last_update(dsn = "pssp_prod64")
pssp_last_update(dsn = "pssp_prod64")
dsn |
DSN connection default "pssp_prod64" |
## Not run: pssp_last_update() ## End(Not run)
## Not run: pssp_last_update() ## End(Not run)
Queries the pssp database and returns a tibble
pssp_query(query, dsn = "pssp_prod64")
pssp_query(query, dsn = "pssp_prod64")
query |
SQL Query |
dsn |
DSN connection default "pssp_prod64" |
## Not run: data <- pssp_query("SELECT * FROM survey LIMIT 10;") ## End(Not run)
## Not run: data <- pssp_query("SELECT * FROM survey LIMIT 10;") ## End(Not run)
Refreshes all materialized views
pssp_refresh_data(dsn = "pssp_prod64")
pssp_refresh_data(dsn = "pssp_prod64")
dsn |
DSN connection default "pssp_prod64" |
## Not run: pssp_refresh_data() ## End(Not run)
## Not run: pssp_refresh_data() ## End(Not run)
Statistical weeks start on mondays, so the first statistical week of the year starts on the first monday of the year. (Contrast with management weeks which start on Sundays).
statistical_week(date)
statistical_week(date)
date |
A vector of dates |
## Not run: data_frame |> mutate(stat_week = statistical_week(date_field)) ## End(Not run)
## Not run: data_frame |> mutate(stat_week = statistical_week(date_field)) ## End(Not run)
Coefficient of legal mark category
tf_cv(.data, category = "Legal_AD")
tf_cv(.data, category = "Legal_AD")
.data |
Dataframe |
category |
Legal mark category (LM Default) |
Other Test Fishing:
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_cv(Legal_AD) ## End(Not run)
## Not run: tf_data |> tf_cv(Legal_AD) ## End(Not run)
Mean, sum, and count of lengths by adipose clip
tf_descriptive_length(.data, length_type = "total_length")
tf_descriptive_length(.data, length_type = "total_length")
.data |
Dataframe |
length_type |
total_length or fork_length |
Other Test Fishing:
tf_cv()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_descriptive_length(total_length) ## End(Not run)
## Not run: tf_data |> tf_descriptive_length(total_length) ## End(Not run)
Produces a table of weekly effort in surveys and hours
tf_effort_summary_week(.data, date_column)
tf_effort_summary_week(.data, date_column)
.data |
Dataframe |
date_column |
Column to calculate stat week, usually survey_datetime |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_effort_summary_week()
## Not run: tf_data |> tf_effort_summary_week()
Identifies agency based on sampler name
tf_hist( .data, x_axis, x_label = "Total Length (CM)", y_label = "Count", title = "Chinook Test Fishing Lengths" )
tf_hist( .data, x_axis, x_label = "Total Length (CM)", y_label = "Count", title = "Chinook Test Fishing Lengths" )
.data |
Dataframe |
x_axis |
Length column. total_length or fork_length |
x_label |
Label of x axis |
y_label |
Label of y axis |
title |
Title of plot |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_hist(total_length) ## End(Not run)
## Not run: tf_data |> tf_hist(total_length) ## End(Not run)
Fisher / Chi Square test between agencies and legal mark counts
tf_interagency_chisq(.data, significance = 0.05)
tf_interagency_chisq(.data, significance = 0.05)
.data |
Dataframe |
significance |
Significance threshold default .05 |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_interagency_chisq()
## Not run: tf_data |> tf_interagency_chisq()
Histogram
tf_interagency_histogram( .data, x_axis, x_label = "Total Length (CM)", y_label = "Count", title = "Interagency Lengths" )
tf_interagency_histogram( .data, x_axis, x_label = "Total Length (CM)", y_label = "Count", title = "Interagency Lengths" )
.data |
Dataframe |
x_axis |
Length column. total_length or fork_length |
x_label |
Label of x axis |
y_label |
Label of y axis |
title |
Title of plot |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_interagency_histogram(total_length, agency)
## Not run: tf_data |> tf_interagency_histogram(total_length, agency)
Summary of encounters by agency and legal mark category
tf_interagency_lm_summary(.data, percent = FALSE)
tf_interagency_lm_summary(.data, percent = FALSE)
.data |
Dataframe |
percent |
Boolean. Results will be displayed in terms of percentage |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_interagency_lm_summary()
## Not run: tf_data |> tf_interagency_lm_summary()
Summary of effort and encounters by agency
tf_interagency_summary(.data)
tf_interagency_summary(.data)
.data |
Dataframe |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_interagency_summary() ## End(Not run)
## Not run: tf_data |> tf_interagency_summary() ## End(Not run)
Creates a summary data with counts by legal mark category
tf_lm_summary(.data, size_limit = 22)
tf_lm_summary(.data, size_limit = 22)
.data |
Dataframe |
size_limit |
Size limit in inches to be used to find legality. Default 22 inchees |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_lm_summary() ## End(Not run)
## Not run: tf_data |> tf_lm_summary() ## End(Not run)
Produces a table of weekly encounters by legal mark category
tf_lm_summary_week(.data, date_column)
tf_lm_summary_week(.data, date_column)
.data |
Dataframe |
date_column |
Column to calculate stat week, usually survey_datetime |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_lm_summary_week()
## Not run: tf_data |> tf_lm_summary_week()
This produces a leaflet map showing test fishing encounters
tf_map(.data, ...)
tf_map(.data, ...)
.data |
Dataframe |
... |
add_effort = TRUE, Adds a heat map of boat surveys. start_date, end_date and catch_area must also be supplied |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_map()
## Not run: tf_data |> tf_map()
Produces a graph
tf_mortalility(.data)
tf_mortalility(.data)
.data |
Dataframe |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_interagency_lm_summary() ## End(Not run)
## Not run: tf_data |> tf_interagency_lm_summary() ## End(Not run)
Queries pssp for test fishing encounters
tf_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
tf_pull( catch_area, start_date, end_date, fresh = FALSE, check_fresh = TRUE, dsn = "pssp_prod64" )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
dsn |
DSN for the database connection. Default 'pssp_prod64' |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pvalue_history()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data <- tf_pull("10", "2021-11-01", "2021-12-04") ## End(Not run)
## Not run: tf_data <- tf_pull("10", "2021-11-01", "2021-12-04") ## End(Not run)
Line plot of cummulative p-values yieled from cummulative totals of test fishing encounters
tf_pvalue_history(.data, alpha = 0.05)
tf_pvalue_history(.data, alpha = 0.05)
.data |
Dataframe |
alpha |
Significance metric to evaluate whether statistically sigificant or not |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_scatter()
,
tf_summary()
## Not run: tf_data |> tf_pvalue_history()
## Not run: tf_data |> tf_pvalue_history()
Queries RMIS for release infomation, defaults to tagged releases
tf_scatter( .data, x_axis, y_axis, x_label = "Survey Date", y_label = "Total Length (CM)", title = "Chinook Test Fishing Lengths" )
tf_scatter( .data, x_axis, y_axis, x_label = "Survey Date", y_label = "Total Length (CM)", title = "Chinook Test Fishing Lengths" )
.data |
Dataframe |
x_axis |
Variable for x axis of plot |
y_axis |
Variable for y axis of plot |
x_label |
Label of x axis |
y_label |
Label of y axis |
title |
Title of plot |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_summary()
## Not run: tf_data |> tf_scatter(survey_datetime, total_length) ## End(Not run)
## Not run: tf_data |> tf_scatter(survey_datetime, total_length) ## End(Not run)
Produces a table summarizing test fishing effort and encounters
tf_summary(.data, date_column)
tf_summary(.data, date_column)
.data |
Dataframe |
date_column |
Column to calculate stat week, usually survey_datetime |
Other Test Fishing:
tf_cv()
,
tf_descriptive_length()
,
tf_effort_summary_week()
,
tf_hist()
,
tf_interagency_chisq()
,
tf_interagency_histogram()
,
tf_interagency_lm_summary()
,
tf_interagency_summary()
,
tf_lm_summary()
,
tf_lm_summary_week()
,
tf_map()
,
tf_mortalility()
,
tf_pull()
,
tf_pvalue_history()
,
tf_scatter()
## Not run: tf_data |> tf_summary()
## Not run: tf_data |> tf_summary()
Queries RMIS for release infomation, defaults to tagged releases
vtr_pull( catch_area, start_date, end_date, pretty = TRUE, fresh = FALSE, check_fresh = TRUE )
vtr_pull( catch_area, start_date, end_date, pretty = TRUE, fresh = FALSE, check_fresh = TRUE )
catch_area |
Valid catch area code |
start_date |
Start date of search |
end_date |
End date of search |
pretty |
Returns an easily readable dataframe |
fresh |
Boolean. Ensures data is updated |
check_fresh |
Boolean. Checks whether data is current |
Dataframe
## Not run: vtr_data <- vtr_pull('10', '2021-11-01', '2021-12-04')
## Not run: vtr_data <- vtr_pull('10', '2021-11-01', '2021-12-04')