Data Packages Views - Graphs, Maps, Tables etc

We want “views” such as graphs, maps and tables for our data:

Data --> View

We also have our data in a (Tabular) Data Package so in fact we want:

(Tabular) Data Package --> Views

We therefore need:

  1. A way to describe the view in JSON in our Data Package
  2. Code that takes (JSON view + Data) → visualization or table in HTML + JS (or PNG etc)

This leads us to wanting:

Data Package View Spec!

Data Package View spec and code

Spec is in progress here: Data Package Data Views Specification (Visualizations) · Issue #77 · frictionlessdata/specs · GitHub

Code for the purposes of developing and testing a spec is here: GitHub - frictionlessdata/datapackage-render-js: React components for rendering Data Package Views.

We are currently focusing on code as it is only by trying stuff out that we can design a good spec (rough consensus and running code)

Background

  • We invented something like this in ReclineJS back in 2011.
    • Using ReclineJS these render to live HTML.
    • Used for current data.okfn.org views.
  • Now there is Vega and Vega-lite which render out to d3 based graphs.
    • Plan to use this for the future

Benefits of vega / vega-lite:

  • Full power of d3 and a lot of customizability.
    • Lots of graph types
    • Log scales
    • Interactions
  • Nice stuff in vega e.g. embeddability and rendering to svg or png etc etc
  • Ability to transform data (using vega transform stuff) – though this is not perfect and we’d like to backport this …

Things to improve with vega / vega-lite:

  • Complexity: vega is verbose and pretty complex and that is still true of vega-lite (though it is better). We probably even simpler at least for common simple options like line graphs. For example we currently have things like this:

“graphType”: “lines”,
“group”: “Date”,
“series”: [ “VIXClose” ]

* Integration: atm vega has its only data typing and data definition stuff. Would be nice if it used JSON Table Schema more. In any case we need to use JTS in generating some of the vega stuff if we can ...
1 Like

/cc @akariv flagging this because of connections with viewer in OpenSpending

/cc @pwalsh as of general interest

/cc @brook because of relevant to HDX type stuff …

/cc @danfowler as maybe worth a quick tweet of this topic …