View source: R/create-suntimes.R
create_suntimes_df | R Documentation |
Generate a data frame that specifies sunrises and sunsets for different
coordinates and dates.
The package suncalc
is required to use this function.
create_suntimes_df(coords, dates, tz = Sys.timezone(), .quiet = FALSE)
coords |
Data frame with the fields |
dates |
Dates that should be processed. |
tz |
Timezone of the results. |
.quiet |
If |
A data frame with the columns date
, station
and sunrise
and
sunset
. The values of sunrise and sunset indicate the respective time in
minutes.
create_suntimes_rsts()
date_start <- as.Date('2020-01-01')
date_end <- as.Date('2020-12-31')
st <- create_suntimes_df(barrks_data('station_coords'),
seq(date_start, date_end, by = 'day'),
.quiet = TRUE)
# print results of station 'Freiburg'
st[st$station == 'Freiburg',]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.