Features

The package spiralize visualizes data along an Archimedean spiral. It has two major advantages for visualization:

  1. It is able to visualize data with very long axis with high resolution.
  2. It is efficient for time series data to reveal periodic patterns.

Install

The package is available on CRAN and can be installed by:

install.packages("spiralize")

If you want the latest version, install it directly from GitHub:

library(devtools)
install_github("jokergoo/spiralize")

Usage

It includes three steps:

  1. initialize the spiral,
  2. add a track,
  3. add graphics in the track.

Step 2 and 3 can be applied multiple times to allow multiple-track visualization along the spiral.

The code for making spiral plot looks like follows:

Graphics

Complex plots are baiscally constructed from simple graphics. Here there are following low-level graphics functions:

Particularlly, horizon chart is very suitable to put on the spiral, thus there is one function for this:

Spiral plot can also visualize dendrograms with large number of leaves, thus there are following two functions:

Vignettes

There are the following vignettes:

Examples

  1. Difference of ggplot2 daily downloads to the mean of the current year (2015-2021). Each loop contains 52 weeks so that same weeks in different years locate at the same angle in the polar coordinates.

image

  1. The same data as the first one, but horizon chart is used. Also title and legends are added.

image

  1. A phylogenetic life tree with 50645 species.

download

License

MIT @ Zuguang Gu