MyNixOS website logo
Description

Exploratory Data Analysis using Tiled One-Dimensional Graphics.

Streamlines exploratory data analysis by providing a turnkey approach to visualising n-dimensional data which graphically reveals correlative or associative relationships between 2 or more features. Represents all dataset features as distinct, vertically aligned bar or tile plots, with plot types auto-selected based on whether variables are categorical or numeric.

gg1d gg1d website

R-CMD-check Lifecycle:experimental Codecov testcoverage GitHub Issues or PullRequests codesize GitHub lastcommit

Effortlessly visualize all columns in a data frame with vertically aligned plots and automatic plot selection based on variable type. Plots are fully interactive, and custom tooltips can be added.

Why 1 dimensional plots?

To understand trends in your data, especially correlative relationships between 2 or more features, it can be useful to densely stack visual representations of each feature vertically, regardless of data type. By unifying the $x$-axis across each plot, gg1d turns a series of 1D plots into an $n\text{-dimensional}$ visualization where $n = \text{number of columns in dataset}$. Note the key idea of gg1d is to ‘preserve the individual.’ gg1d does NOT plot distributions of properties, but rather each value of a feature for each subject/observation in the dataset.

gg1d can be used for exploratory data analysis (EDA) or to produce publication quality graphics summarizing a dataset.

Installation

install.packages("gg1d")

Development Version

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

if (!require("remotes"))
    install.packages("remotes")

remotes::install_github("selkamand/gg1d")

Quick Start

For examples of interactive gg1d plots see the gg1d gallery

# Load library
library(gg1d)

# Read data
path_gg1d <- system.file("example.csv", package = "gg1d")
df <- read.csv(path_gg1d, header = TRUE, na.strings = "")

# Plot data, sort by Glasses
gg1d(
  df,
  col_id = "ID",
  col_sort = "Glasses",
  interactive = FALSE,
  verbose = FALSE,
  options = gg1d_options(legend_nrow = 2)
)

Customise Colours

Customise colours by supplying a named list to the palettes argument

gg1d(
  df,
  col_id = "ID",
  col_sort = "Glasses",
  palettes = list("EyeColour" = c(
    Brown = "rosybrown4",
    Blue = "steelblue",
    Green = "seagreen"
  )),
  interactive = FALSE,
  verbose = FALSE,
  options = gg1d_options(legend_nrow = 2)
)

Community Contributions

All types of contributions are encouraged and valued. See our guide to community contributions for different ways to help.

Metadata

Version

0.1.0

License

Unknown

Platforms (77)

    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-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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