MyNixOS website logo
Description

Quick and easy data visualization with Haskell.

Please see README.md

QuickPlot

QuickPlot Demo

How does it work?

Haskell creates a simple server that runs in the background and sends data to a browser that visualizes it. In the demo above the browser and ghci runs inside Atom, but you can use any editor (even butterflies) with a fairly modern browser. Once the data arrives at the browser any JavaScript visualization library could take care of it like for example plot.ly

How do I use it?

QuickPlot was designed to make interactive data exploration easier. So the following won't make much sense outside of ghci

0. Install QuickPlot

stack install QuickPlot
cabal install QuickPlot
-- or manually

1. Import QuickPlot

import QuickPlot
import QuickPlot.Plotly -- if you want to use the plotly library

2. Start QuickPlot

runQuickPlot

3. Connect to QuickPlot

Go to the address runQuickPlot printed

4. Plot

Here is the less verbose version of the full example:

-- As box aficionados we just measured the weight of all our boxes at home
-- and gathered the following data
blueBoxSizes   = [1.1, 1.8, 2.9, 3.3] :: [Double]
orangeBoxSizes = [3.1, 3.8, 5.9, 2.3] :: [Double]

-- We create traces from our data
blueBoxTrace = [plotly|{
      y    : #{ blueBoxSizes },
      type : "box"
}|]
orangeBoxTrace = [plotly|{
      y    : #{ orangeBoxSizes },
      type : "box"
}|]

-- And finally gain great insight from the data visualization
plot [blueBoxTrace, orangeBoxTrace]

FAQ

Does it work on X?

Probably yes. If your browser supports WebSockets, HTML5, CSS3 you'll be fine. If not please update your browser. Find out more about here

Can you implement library X?

If the library takes JSON as an input, submit an issue. Libraries like D3.js are problematic however. Graphs in D3 are created programatically and therefore you can't just pick a graph type and say plot it. You have to create them from scratch. If there are examples that give you goosebumps it is possible to integrate them separately. Or you just include it as a user script yourself (once this is implemented)

How can I help?

There are many ways to do so:

  • If you know JavaScript/HTML/CSS you could make the UI prettier, more user friendly or easier extensible
  • Implement a visualization library in JavaScript

Can this library only use JavaScript libraries?

Technically any library that Haskell can convice to create graphics is compatible.

Metadata

Version

0.1.0.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • 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