first_observations_plot: Plot Timing of First Observations Relative to Sunset

View source: R/new_activity_timing_plot.R

first_observations_plotR Documentation

Plot Timing of First Observations Relative to Sunset

Description

first_observations_plot creates a plot showing the first observation of the specified species relative to local sunset for each site withn a project.

Usage

first_observations_plot(
  data_path,
  species,
  timezone,
  monitoring_start = NULL,
  monitoring_end = NULL,
  gaps = NULL,
  width = 15.9,
  height = 8.43,
  text_size = 10,
  date_label = "%b",
  save_directory = NULL
)

Arguments

data_path

Character. Path to an existing RData file.

species

Charater. Code for a single species in the datset to use for graph generation (e.g. "Epfu").

timezone

Character. Specify a timezone for calculating sunset times, e.g. "America/Toronto"

monitoring_start

Character, the date the monitoring began (e.g. "2019-01-01"), leave as NULL to use the earliest data point as the monitoring start.

monitoring_end

Character, the date the monitoring ceased (e.g. "2019-01-01"), leave as NULL to use the latest data point as the monitoring end

gaps

Object: a gaps_projectname data frame generated by the log_file_parser function. Defaults to null.

width

Number. The width in cm of the plot if saved to file. Default is 25 cm.

height

Number. The height of the plot if saved to file. Default is 20 cm.

text_size

Numeric: adjusts the size of text in the figure.

date_label

Date value: adjusts the formatting of the month labels on the y-axis. See https://www.statmethods.net/input/dates.html for formatting.

save_directory

Character: if provided a .png image of the plot will be saved in the folder specified. Defaults to NULL: no output saved.

Value

A plot as an object in the current envrionment, and a saved image if selected.

See Also

Other Activity Timing: old_first_observations_plot()


vulpes-vulpes/batr documentation built on Jan. 23, 2025, 3:23 p.m.