observation_start_time
.R/add_dates.R
add_dates.Rd
add_dates(data, date_col = "observation_start_time", parse_date = TRUE)
a dataframe with datetime col observation_start_time
, e.g. the
output of ODKC form "turtle track or nest", "predator or disturbance", or
"marine wildlife incident". If the date_col is plain text, it will be turned
into a tz-aware datetime, else it is expected to be POSIXct / POSIXt.
(chr) The column name of the datetime to annotate.
Default: "observation_start_time"
.
(lgl) Whether the date_col needs to be parsed from character into a date format (TRUE, default) or already comes as a POSIXct/POSIXt.
The initial dataframe plus new columns
calendar_date_awst (POSIXct) The calendar date in GMT+08 (AWST) as POSIXct, an ISO datetime in GMT+00.
calendar_date_awst_text (chr) The calendar date in GMT+08 (AWST) as character to prevent spreadsheet programs from corrupting the values.
calendar_year (int) The calendar year in GMT+08 (AWST) as integer.
turtle_date (POSIXct) The turtle date,
see datetime_as_turtle_date
.
season (int) The season, see datetime_as_season
.
season_week (int) The season week,
see datetime_as_seasonweek
.
iso_week (int) The season week,
see datetime_as_isoweek
.
Other helpers:
absolute_angle()
,
datetime_as_isoweek()
,
datetime_as_seasonweek()
,
datetime_as_season()
,
datetime_as_turtle_date()
,
exclude_training_species()
,
exclude_training_surveys()
,
extract_possibly()
,
fdate_as_tdate()
,
filter_missing_site()
,
filter_missing_survey()
,
filter_surveys_missing_end()
,
filter_surveys_requiring_qa()
,
filter_wastd_season()
,
get_more()
,
gj_linestring_to_st_linestring()
,
httpdate_as_gmt08_turtle_date()
,
httpdate_as_gmt08()
,
httpdate_as_season()
,
humanize()
,
join_tsc_sites()
,
leaflet_basemap()
,
map_chr_hack()
,
mean_bearing()
,
mis_bearing()
,
odkc_works()
,
read_table()
,
sentencecase()
,
sf_as_tbl()
,
tdate_as_fdate()
,
tracks_as_geojson()
,
tun()
,
urlize()
,
verify_odkc_turtledata()
,
verify_wamtram_data()
,
verify_wastd_data()
,
wastd_works()
,
wastdr_msg_abort()
,
wastdr_msg_info()
,
wastdr_msg_noop()
,
wastdr_msg_success()
,
wastdr_msg_warn()
,
wastdr_settings()
,
wastdr_setup()