F.weekly.effort | R Documentation |
Compute weekly "Fishing" and "Not fishing" hours, then plot.
F.weekly.effort(site, taxon, min.date, max.date, output.file)
site |
The identification number of the site for which estimates are required. |
taxon |
The species identifier indicating the type of fish of interest.
This is always |
min.date |
The start date for data to include. This is a text string in
the format |
max.date |
The end date for data to include. Same format as
|
output.file |
The name of the file prefix under which output is to be saved. Set to NA to plot to the Plot window. |
Dates provided by variables min.date
and max.date
cannot span more than 366 days. Additionally, the code is only set up to
calculate fishing with a provided taxon
of 161980
, i.e.,
Chinook Salmon.
Function F.weekly.effort
utilizes the Build Report Criteria Release
and Sample Period query series to first identify appropriate fishing
instances between min.date
and max.date
. Series Weekly
Effort then massages the fishing time data into the format necessary for
output. See section Structured Query Language (SQL) Queries in
F.run.sqlFile
for more information on query series.
Allocation of time spent fishing is to one of three possibilities.
The first tabulates time during which a trap was not fishing; i.e., the
trap was out of the water. The second and third summarize time for which
the trap was deployed but for which fishing was unsuccessful or successful,
respectively. Variable includeCatchID
determines whether or not a
fishing instance (identifiable via a unique trapVisitID
) was
successful or not.
All vertical bars in the graph cover seven calendar days, or 168 hours, with the exception of Julian week 53, which covers December 30th to December 31st in leap years, and December 31st alone in non-leap years. In this case, the "week" spans only 2 or 1 day(s), respectively. Gray coloring is used to flesh out the remaining 5 or 6 days, respectively, for this special week. In this way, all weeks cover a 7-day period within the bar-chart graphical output.
The output graph and csv
s for summary fishing over
all unique traps between the provided min.date
and max.date
calculate total minutes on a per-day basis. Thus, if three traps fished on
one day, but only two the next, the program utilizes 1440*3=4320
total minutes for the first day, but only 1440*2=2880 total minutes
for the second. Note there are 1440 = 24*60 minutes in one day.
A png
graphical display and csv
of underlying data, for
each unique trap with fishing data between the specified min.date
and max.date
. An additional png
and csv
is output
summarizing all traps together.
Trent McDonald and Jason Mitchell
F.run.sqlFile
## Not run: # ---- Estimate the weekly effort on the American River for all # ---- inclusive traps, from Jan. 16, 2013 through June 8, 2013. site <- 57000 taxon <- 161980 min.date <- "2016-01-16" max.date <- "2013-06-08" output.file <- "American River" F.weekly.effort(site,taxon,min.date,max.date,output.file) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.