calc_sun | R Documentation |
Calculate the sunrise/sunset of each sound file for the day of, the day before and the day after to get the nearest sunrise to the recording.
calc_sun(meta_sites, aru_tz = "local")
meta_sites |
(Spatial) Data frame. Recording metadata with added coordinates. Output of 'clean_metadata()' and then 'add_sites()' (with either 'clean_gps()' or 'clean_site_index()'). |
aru_tz |
Character. Must be either "local" or a timezone listed in 'OlsonNames()'. See Details. |
Timezones. To ensure that the sunrise/sunset times are calculated correctly relative to the time of the recording, we need to know the timezone of the date/time of the recording. If ARUs were calibrated with a specific timezone before going into the field, that can be specified by using, for example, 'aru_tz = "America/Toronto"'. If on the other hand each ARU was calibrated to whichever timezone was local when it was deployed use 'aru_tz = "local"'. The specific timezone will be calculated individually based on the longitude and latitude of each recording.
Data frame with metadata and added timezone of recording time ('tz'), and time to sunrise/sunset ('t2sr', 't2ss').
m <- clean_metadata(project_files = example_files)
s <- clean_site_index(example_sites_clean,
col_date = c("date_time_start", "date_time_end"))
m <- add_sites(m, s)
m <- calc_sun(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.