Skip to content

Instantly share code, notes, and snippets.

@ohanetz
Created August 25, 2015 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohanetz/1f917a430175b38254ee to your computer and use it in GitHub Desktop.
Save ohanetz/1f917a430175b38254ee to your computer and use it in GitHub Desktop.
joola table example
{
"_index": "webyclip",
"_type": "jdocument",
"_id": "6753bdfb2a79ff6a630e18be71aa9a40",
"_version": 1,
"_score": 1,
"_source": {
"aggregation_keys": {
"site": "ebay",
"user": "alex"
},
"day": {
"cfa_events_count": 1,
"thumbnails_clicked_events_count": 0
},
"timestamp": "2015-08-22T03:59:19.086Z",
"_key": "6753bdfb2a79ff6a630e18be71aa9a40"
}
}
joola.on('ready', function() {
new joola.viz.Table({
container: '#example',
caption: 'How many users watched a video and purchased per day',
headers: true,
query: {
timeframe: 'last_30_days',
interval: 'day',
dimensions: ['aggregation_keys.site', 'aggregation_keys.user'],
metrics: [
{
key: '_key',
aggregation: 'ucount',
name: "Number of unique users",
}
],
filter: [
{
attribute: 'day.cfa_events_count',
operator: 'gt',
match: '0'
},
{
attribute: 'day.thumbnails_clicked_events_count',
operator: 'gt',
match: '0'
}
],
collection: 'Webyclip'
},
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment