Document format and visualization runtime for GGSpec.
This project contains three sub-projects:
- GGBundle: A document convention for self-contained data visualizations
- GGViz: A JXKit-based runtime for rendering data visualizations
- GGDSL: A Swift DSL for fluently creating data visualizations
The GGDSL package exposes a native Swift DSL that succinctly describes a layered grammar of graphics inspired by Jacques Bertin's Sémiologie graphique, and subsequent implementations: Leland Wilkinson’s Grammar of Graphics, Hadley Wickham's ggplot2, Stanford's Polaris, and the Vega projects (which is also used as the runtime for rendering visualizations in the GGViz package).
The directory structure of a GGBundle
packages a stand-alone data visualization that can either be read and rendered using a tool, or served directly from the web.
The format of the file is:
- viz.json: the visualization specification (vega JSON)
- data/: a folder that contains the raw data to be rendered
- fonts/: a folder that can contain WOFF fonts for runtime support
- index.html (optional): an index page that enables the visualization to be viewed interactively in web browsers
- ext/: a folder containing runtime extensions and support files
- ext/ggviz.js (optional): the local copy of the stand-alone visualization runtime
GGViz is the visualization runtime for a GGDSL, and can be used to render a GGDSL
into various formats: svg
, pdf
, png
, as well as generating an interactive HTML5 GGBundle.