lightning-haskell-0.1.0.3: Haskell client for lightning-viz REST API

Copyright(c) Connor Moreside, 2016
LicenseBSD-3
Maintainerconnor@moresi.de
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Lightning.Plots

Contents

Description

 

Synopsis

Sparse Adjacency Matrix

data AdjacencyPlot Source

Adjacency plot parameters

Constructors

AdjacencyPlot 

Fields

apConn :: [[Double]]

Matrix that defines the connectivity of the plot. The dimensions of the matrix can be (n, n), (n, 2) or (n, 3). Matrix can be binary or continuous valued. Links should contain either 2 elements per link (source, target) or 3 elements (source, target, value).

apLabels :: Maybe [Text]

Text labels for each item (will label rows and columns).

apGroup :: Maybe [Int]

List to set colors via groups.

apSort :: Maybe Text

What to sort by; options are "group" or "degree."

apNumbers :: Maybe Bool

Whether or not to show numbers on cells.

apSymmetric :: Maybe Bool

Whether or not to make links symetrical.

adjacencyPlot Source

Arguments

:: Monad m 
=> AdjacencyPlot

Adjacency plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a sparse adjacency matrix visualiazation.

Adjacency Visualization

Force-Directed Network

data ForcePlot Source

Force plot parameters

Constructors

ForcePlot 

Fields

fpConn :: [[Double]]

Matrix that defines the connectivity of the plot. The dimensions of the matrix can be (n, n), (n, 2) or (n, 3). Matrix can be binary or continuous valued. Links should contain either 2 elements per link (source, target) or 3 elements (source, target, value).

fpValues :: Maybe [Double]

Values to set node colors via a linear scale.

fpLabels :: Maybe [Text]

List of text labels to set as tooltips.

fpColor :: Maybe [Int]

Single RGB value or list to set node colors.

fpGroup :: Maybe [Int]

Single integer or list to set node colors via groups.

fpColorMap :: Maybe Text

Specification of color map, only colorbrewer types supported.

fpSize :: Maybe [Int]

Single size or list to set node sizes.

fpToolTips :: Maybe Bool

Whether or not to show tooltips.

fpZoom :: Maybe Bool

Whether or not to allow zooming.

fpBrush :: Maybe Bool

Whether or not to support brushing.

forcePlot Source

Arguments

:: Monad m 
=> ForcePlot

Force plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a force-directed network visualization from connectivity.

Force-Directed Network Visualization

Graph

data GraphPlot Source

Graph plot parameters

Constructors

GraphPlot 

Fields

gpX :: [Double]

x-points for node co-ordinates.

gpY :: [Double]

y-points for node co-ordinates.

gpConn :: [[Double]]

Matrix that defines the connectivity of the plot. The dimensions of the matrix can be (n, n), (n, 2) or (n, 3). Matrix can be binary or continuous valued. Links should contain either 2 elements per link (source, target) or 3 elements (source, target, value).

gpValues :: Maybe [Int]

Values to set node colors via a linear scale.

gpLabels :: Maybe [Text]

List of text labels to be used as tooltips.

gpColors :: Maybe [Int]

List to set node colors.

gpGroup :: Maybe [Int]

List to set node colors via group assignment.

gpColorMap :: Maybe Text

Specification of color map; only colorbrewer types supported.

gpSize :: Maybe [Int]

List to set node sizes.

gpToolTips :: Maybe Bool

Whether or not to show tooltips.

gpZoom :: Maybe Bool

Whether or not to allow zooming.

gpBrush :: Maybe Bool

Whether or not to support brushing.

graphPlot Source

Arguments

:: Monad m 
=> GraphPlot

Graph plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a node-link graph from spatial points and their connectivity.

Graph Bundled

graphBundledPlot Source

Arguments

:: Monad m 
=> GraphPlot

Graph plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a bundled node-link graph visualization.

Line

data LinePlot Source

Line plot parameters

Constructors

LinePlot 

Fields

lpSeries :: [[Double]]

Input data for line plot, typically n series of lenght m. Can also pass a list where each individual series is of different lengths.

lpIndex :: Maybe [Int]

Specify the index for the x-axis line plot.

lpColor :: Maybe [Int]

Single RGB value or list to set line colors to.

lpGroup :: Maybe [Int]

Single integer or list to set line colors to via group assignment.

lpThickness :: Maybe [Int]

Single integer or list to set line thickness to.

lpXaxis :: Maybe Text

Label for x-axis.

lpYaxis :: Maybe Text

Label for y-axis.

lpZoom :: Maybe Bool

Whether or not to allow zooming.

linePlot Source

Arguments

:: Monad m 
=> LinePlot

Line plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a plot to visualize one-dimensional series.

Line Visualization

Map

data MapPlot Source

Map plot parameters

Constructors

MapPlot 

Fields

mppRegions :: [Text]

String identifies for map regions, either length of two characters (for states in a US map) or length of three (for counties in a world map).

mppWeights :: [Double]

Values to use to color each reason

mppColorMap :: Maybe Text

Specification of color map; only colorbrew types supported.

mapPlot Source

Arguments

:: Monad m 
=> MapPlot

Map plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a chloropleth map of the world or united states.

Map Visualization

Matrix

data MatrixPlot Source

Matrix plot parameters

Constructors

MatrixPlot 

Fields

mpMatrix :: [[Double]]

Two-dimensional list of matrix data.

mpRowLabels :: Maybe [Text]

List of strings to label rows.

mpColLabels :: Maybe [Text]

List of strings to label columns.

mpColorMap :: Maybe Text

Specification of color map; only colorbrewer types supported.

mpNumbers :: Maybe Bool

Whether or not to show numbers on the cells.

matrixPlot Source

Arguments

:: Monad m 
=> MatrixPlot

Matrix plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a heat map of the given matrix.

Matrix Visualization

Scatter

data ScatterPlot Source

Scatter plot parameters

Constructors

ScatterPlot 

Fields

spX :: [Double]

List of x points.

spY :: [Double]

List of y points.

spValues :: Maybe [Double]

Values to set node colors via a linear scale.

spLabels :: Maybe [Text]

List of text labels to set tooltips.

spColor :: Maybe [Int]

List of rgb values to set colors.

spGroup :: Maybe [Int]

List to set colors via groups.

spColorMap :: Maybe Text

Specification of color map; only colorbrewer types supported.

spSize :: Maybe [Int]

List to set point sizes.

spAlpha :: Maybe [Double]

List of alpha values to set file and stroke opacity.

spXaxis :: Maybe Text

Label for x-axis.

spYaxis :: Maybe Text

Label for y-axis.

spToolTips :: Maybe Bool

Whether or not to display tooltips.

spZoom :: Maybe Bool

Whether or not to allow zooming.

spBrush :: Maybe Bool

Whether or not to support brushing.

scatterPlot Source

Arguments

:: Monad m 
=> ScatterPlot

Scatter plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a scatter plot.

Scatter Visualization

3D Scatter

data Scatter3Plot Source

Scatter Plot 3D parameters

Constructors

Scatter3Plot 

Fields

sptX :: [Double]

List of x points.

sptY :: [Double]

List of y points.

sptZ :: [Double]

List of z points.

sptColors :: Maybe [Int]

List of rgb values to set colors.

sptGroups :: Maybe [Int]

List to set colors via groups.

sptSize :: Maybe [Int]

List to set point sizes.

sptAlpha :: Maybe [Double]

List of alpha values to set file and stroke opacity.

scatter3Plot Source

Arguments

:: Monad m 
=> Scatter3Plot

Scatter plot to create

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a 3D scatter plot.

Scatter Visualization

Circle

data CirclePlot Source

Circle plot parameters

Constructors

CirclePlot 

Fields

cpConn :: [[Double]]

Matrix that defines the connectivity of the plot. The dimensions of the matrix can be (n, n), (n, 2) or (n, 3). Matrix can be binary or continuous valued. Links should contain either 2 elements per link (source, target) or 3 elements (source, target, value).

cpGroup :: Maybe [Int]

List to set colors via groups.

cpColor :: Maybe [Int]

(k, 3) : List of rbg values to set colors of top-level group, where k is the number of unique elements in the top-level group.

cpLabels :: Maybe [Text]

List of text labels to label nodes.

circlePlot Source

Arguments

:: Monad m 
=> CirclePlot

Circle plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a circular graph from connectivity data.

Circle Visualization

Histogram

histogramPlot Source

Arguments

:: Monad m 
=> HistogramPlot

Histogram plot to create.

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a plot to histogram.

HistogramPlot Visualization

Volume

data VolumePlot Source

Volume plot parameters

Constructors

VolumePlot 

Fields

vpImages :: [Img]

A collection of images to display. Can be 2 dimensional (grey scale) or 3 dimensional (RGB) lists.

volumePlot Source

Arguments

:: Monad m 
=> Text

Base URL for lightning-viz server.

-> VolumePlot

Volume plot to create

-> LightningT m Visualization

Transformer stack with created visualization.

Submits a request to the specified lightning-viz server to create a visualization of a collection of images as a three-dimensional volume.

Volume Visualization

Streaming Line Plot

data LineStreamPlot Source

Streaming line plot parameters

Constructors

LineStreamPlot 

Fields

lspSeries :: [[Double]]

Input data for line plot, typically n series of lenght m. Can also pass a list where each individual series is of different lengths.

lspIndex :: Maybe [Int]

Specify the index for the x-axis line plot.

lspColor :: Maybe [Int]

Single RGB value or list to set line colors to.

lspGroup :: Maybe [Int]

Single integer or list to set line colors to via group assignment.

lspSize :: Maybe [Int]

Sets the line thickness

lspXAxis :: Maybe Text

Label for the x axis

lspYAxis :: Maybe Text

Label for the y axis

lspMaxWidth :: Maybe Int

The maximum number of time points to show before plot shifts.

lspZoom :: Maybe Bool

Whether or not to enable zooming.

lspVisualization :: Maybe Visualization
 

streamingLinePlot Source

Arguments

:: Monad m 
=> LineStreamPlot

Line plot to create / update.

-> LightningT m Visualization

Transformer stack with created visualization.

Plot streaming one-dimensional series data as updating lines.

Streaming Line Visualization

Streaming Scatter Plot

data ScatterStreamPlot Source

Scatter plot parameters

Constructors

ScatterStreamPlot 

Fields

sspX :: [Double]

List of x points.

sspY :: [Double]

List of y points.

sspValues :: Maybe [Double]

Values to set node colors via a linear scale.

sspLabels :: Maybe [Text]

List of text labels to set tooltips.

sspColor :: Maybe [Int]

List of rgb values to set colors.

sspGroup :: Maybe [Int]

List to set colors via groups.

sspColorMap :: Maybe Text

Specification of color map; only colorbrewer types supported.

sspSize :: Maybe [Int]

List to set point sizes.

sspXaxis :: Maybe Text

Label for x-axis.

sspYaxis :: Maybe Text

Label for y-axis.

sspToolTips :: Maybe Bool

Whether or not to display tooltips.

sspZoom :: Maybe Bool

Whether or not to allow zooming.

sspBrush :: Maybe Bool

Whether or not to support brushing.

sspVisualization :: Maybe Visualization

The visualization to update. If Nothing, create

streamingScatterPlot Source

Arguments

:: Monad m 
=> ScatterStreamPlot

Scatter plot to create / update.

-> LightningT m Visualization

Transformer stack with created visualization.

Create a streaming scatter plot of x and y.

Plotting once returns a visualization on which append can be called to add new data in a streaming fashion. The opacity of old and new data is automatically set to highlight the most recent data and fade old data away.

Streaming Scatter Visualization