The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Splits observations with datetime stamps into a date and time of day components, then displays them in a scatter plot using grammar of graphics (ggplot2). Plots can also be decorated with coloured ribbons indicating night time. This is helpful for data that are associated with the solar cycle, such as bat activity.
Install latest developmental version from R-Universe:
install.packages("gghourglass", repos = c('https://pepijn-devries.r-universe.dev', 'https://cloud.r-project.org'))
## load required namespaces
library(ggplot2)
library(gghourglass)
## get example data
data(bats)
## subset example date to the year 2018
<- subset(bats, format(RECDATETIME, "%Y") == "2018")
bats_sub
## retrieve monitoring location
<- attr(bats, "monitoring")$longitude[1]
lon <- attr(bats, "monitoring")$latitude[1]
lat
## plot the data
ggplot(bats_sub, aes(x = RECDATETIME, col = SPECDESCSCI)) +
## annotate sunset until sunrise
annotate_daylight(lon, lat) +
## annotate dusk until dawn
annotate_daylight(lon, lat, c("dusk", "dawn")) +
## add hourglass geometry to plot
geom_hourglass() +
## add informative labels
labs(x = "Date", y = "Time of day", col = "Species")
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.