MyNixOS website logo
Description

Plot Event Times on a 24-Hour Clock.

Provides a novel visualization technique for plotting timestamped events on a 24-hour circular clock face. This is particularly useful for analyzing daily patterns, event clustering, and gaps in temporal data. The package also generalizes this approach to create cyclic charts for other periods, including weekly and monthly cycles, enabling effective event planning and pattern analysis across multiple time frames.

clockplot

R-CMD-check DOI

A novel visualization technique for plotting timestamped events on a 24-hour circular clock face. The clockplot package helps you uncover daily patterns, event clusters, and gaps in your temporal data.

The approach generalizes to other cycles—like weeks and months—making it an essential tool for visualizing rhythms and planning events across any timeframe.

Installation

You can install the latest version from CRAN with:

install.packages("clockplot")

You can install the development version of clockplot from GitHub with:

# install.packages("pak")
pak::pak("mahmudstat/clockplot")

Usage

Click here to visit the repository and follow the website (mentioned on the About section) to see all the available functions.

Applications

Below we mention some relevant applications.

US Accidents plot

The data is taken from Kaggle and a small part (100 rows) extracted. To see the modified data, visit this link.

library(clockplot)
acdt <- read.csv("https://raw.githubusercontent.com/mahmudstat/open-analysis/main/data/usacc.csv")
clock_chart_qnt(acdt, time = Time, len = Humidity..., Col = Temperature.F.) +
  ggplot2::labs(size = "Humidity", color = "Temperature")

This allows us to observe when the accidents occurred and how temperature and humidity may be associated with them.

A Simpler Chart

We have a small data of times of messages received throughout a particular day, along with sender of the messages and their types. Let us the pattern of messages by senders.

SMS times

Other Charts

Generally, there is cyclic_chart(), allowing to plot daily, weekly, or monthly values or agenda on a circular plot. There are some specific functions as well, relating to day, week etc.

Week Chart

Week chart of Temperature

Additional Components

The charts produce ggplot objects, so you can make use of many of the functions of the ggplot2 package. You can use the labs function, for example, to add title, subtitle, caption etc. Some examples are shown in the next segment.

You can also add legend or change its position by using the code theme(legend.position = "right"); the accepted positions are top, bottom, left, and right.

Metadata

Version

0.8.3

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows