Learn R Programming

gglinedensity

The goal of gglinedensity is to bring the DenseLines algorithm to R via ggplot2, providing a “derived density visualisation (that) allows users both to see the aggregate trends of multiple (time) series and to identify anomalous extrema” (Moritz and Fisher, 2018).

Installation

You can install gglinedensity like so:

install.packages("gglinedensity")

You can install the development version of gglinedensity like so:

# install.packages("pak")
pak::pak("hrryt/gglinedensity")

Example

This is a basic example which shows you how to solve a common problem:

library(ggplot2)
library(gglinedensity)
ggplot(txhousing, aes(date, median, group = city)) +
  stat_line_density(bins = 50, drop = FALSE, na.rm = TRUE) +
  xlim(2000, 2015)

Copy Link

Version

Install

install.packages('gglinedensity')

Monthly Downloads

577

Version

0.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Harry Thompson

Last Published

May 9th, 2025

Functions in gglinedensity (0.1.0)

stat_line_density

Create a DenseLines Heatmap