Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Add Gapminder Tracking #14

Merged
merged 6 commits into from
Mar 23, 2018
Merged

Add Gapminder Tracking #14

merged 6 commits into from
Mar 23, 2018

Conversation

thinkh
Copy link
Member

@thinkh thinkh commented Mar 23, 2018

Closes #11

gapminder-tracking

Usage

Tracking is implemented by adding a track property to a signal definition.

{
  "name": "colorField",
  "value": "continent",
  "bind": {"input": "select", "options": ["continent", "main_religion"]},
  "track": {
	"title": "Color = {{value}}"
  }
}

The title property is used for the node name in the provenance graph and can contain Handlebar.js syntax.

In case further data is required to generate the title we have to wait until Vega's dataflow evaluation is complete. Further values from other data or signals can then be acquired by using the async property.

{
  "name": "selectedCountries",
  "on": [
	{"events": {"signal": "clicked"}, "update": "null", "force": true}
  ],
  "track": {
	"async": [
	  {"data": "selectedCountries", "as": "allCountries"},
	  {"signal": "clicked", "as": "lastCountry"}
	],
	"title": "Selected {{lastCountry.country}} ({{allCountries.length}} Countries)"
  }
}

It is also possible to define a category and an operation for the node in the provenance graph:

...
  "track": {
	"title": "Selected {{lastCountry.country}} ({{allCountries.length}} Countries)",
    "category": "selection",
    "operation": "update"
  }
...

Possible options are:

  • category: data (default), selection, visual, layout, logic, custom, annotation
  • operation: create, update (default), remove

Open Issues

@thinkh thinkh merged commit 4657a51 into master Mar 23, 2018
@thinkh thinkh deleted the add-gapminder-tracking branch March 23, 2018 16:44
@thinkh thinkh mentioned this pull request Mar 23, 2018
3 tasks
@dvvanessastoiber dvvanessastoiber mentioned this pull request Feb 18, 2021
35 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant