1. médialab Sciences Po
  2. Productions
  3. Vega

Vegarecommended by the médialab

a declarative language for creating and sharing data visualizations

Tools – Software

UW Interactive Data Lab, trifacta

Vega is a language which allows to build data visualizations in a simple and powerful way. Using JSON format, visualizers write "specification" in the form of an object specifying data source, general "marking" technique (should the visualization objects be materialized as circles, rectangles, points, ...), data-field-to-visualization-parameter mappings (ex: map the "IMDB_Rating" data field to the "x" position of the visualization objects), and other graphical parameters. 

Here is an example of vega specification:<pre style="font-size: 15px; font-weight: bold; background-color: lightgrey; padding: 15px; margin: 0px 35px 35px 0px;">

{   
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",  
  "data": {
    "url": "data/movies.json"
  },  
  "mark": "circle",   
  "encoding": {     
    "x": {       
      "bin": {"maxbins": 10},       
      "field": "IMDB_Rating",       
      "type": "quantitative"     
    },     
    "y": {
      "bin": {"maxbins": 10},       
      "field": "Rotten_Tomatoes_Rating",       
      "type": "quantitative"     
    },     
    "size": {
      "aggregate": "count",       
      "type": "quantitative"     
    }   
  } 
}

The project then proposes a set of modules for generating visualizations expressed with this language. Vega rendering modules provide interactive HTML blocks which can be downloaded as images or workfiles, or reworked inside vega's online editor.

Besides, the vega-lite grammar, a lighter version of vega, provides a very efficient way to explore data within environments such as Observable or Jupyter.

visualization

developers

usable

2013