README
hvega
Contains the hvega
module for creating
Vega-Lite visualizations
in Haskell, and the ihaskell-hvega
module for viewing these
visualizations in
IHaskell notebooks.
This code is released under the BSD3 license.
The hvega
package started of as an almost-direct copy of version 2.2.1 of the
Elm Vega library,
which was released under a BSD3 license by Jo Wood of the giCentre at the
City University of London. The two have diverged somewhat since (mainly
that hvega
still uses data types as its primary control structure
whilst the Elm version has moved to functions).
Installation
The packages are available on hackage:
There is a top-level stack.yaml
which builds both hvega
and
ihaskell-hvega
using Stack.
There is also a shell.nix
file for development with
Nix. At the present time (Devember 2019)
I don't make any guarantees about either method (in particular
for ihaskell-vega
).
Testing
There is basic testing of the output of hvega
, and the module also
contains a
tutorial
which contains plots you can view; e.g. with
Vega View or
Vega-Desktop.
The notebooks/
directory contains a (very small, very random) sample
of notebooks experimenting with hvega
. I recommend using
Tweag I/O's jupyterWith environment
to view these. At present there is support for Jupyter notebook
,
whereas the support for Jupyter lab
is unfortunately limited (due
to limitations on the current IHaskell environment and differences
between the Jupyter Lab versions).
There is also a Data Haskell example notebook, and the Monad-Bayes blog series by tweag.io which starts here.
Development
I created this as a piece of procrastination, while procrastinating with a different task. At present I am not using it, due to lack of time. Please pop on over to GitHub, or ping me on Twitter @doug_burke if you would like to help.
*Note that all licence references and agreements mentioned in the ihaskell-hvega README section above
are relevant to that project's source code only.