[ Launch: Heatmap-WIP1 ] 2ba87a4bc8d56f3b4cfc by bwinton
[ Launch: test ] 4653053 by enjalot
[ Launch: test ] 4652017 by enjalot
[ Launch: test ] 4582399 by enjalot
-
-
Save bwinton/2ba87a4bc8d56f3b4cfc to your computer and use it in GitHub Desktop.
Heatmap-WIP1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"Heatmap-WIP1","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"widgets.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12},"heatmap_data.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"tab":"edit","display_percent":0.7,"thumbnail":"http://i.imgur.com/Z4ghHZY.png","fullscreen":false,"ajax-caching":true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sys_info | item | subitem | instances_per_session | sessions_with_occurrence | |
---|---|---|---|---|---|
Darwin | click | builtin-item-add-ons-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-alltabs-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-back-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-BMB_bookmarksPopup-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-BMB_bookmarksToolbarPopup-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-BMB_unsortedBookmarksPopup-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-bookmarks-bar-chevron-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-bookmarks-bar-container-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-bookmarks-bar-item-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-bookmarks-bar-overflowed-item-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-bookmarks-menu-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-characterencoding-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-copy-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-cut-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-developer-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-downloads-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-e10s-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-edit-controls-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-email-link-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-feed-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-find-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-forward-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-fullscreen-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-history-panelmenu-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-home-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-menu-button-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-menubar-items-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-menubar-menu-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-menubar-menuitem-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-menubar-other-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-nav-bar-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-new-tab-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-new-window-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-open-file-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-PanelUI-contents-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-PanelUI-menu-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-paste-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-personal-bookmarks-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-PersonalToolbar-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-PlacesChevron-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-PlacesToolbarItems-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-preferences-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-print-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-privatebrowsing-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-save-page-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-search-container-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-searchbar-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-sidebar-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-social-share-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-sync-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-tabbrowser-tabs-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-tabsclose-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-TabsToolbar-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-tabview-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-toolbar-menubar-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-urlbar-container-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-urlbar-go-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-urlbar-reload-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-urlbar-stop-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-webrtc-status-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-zoom-controls-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-zoom-in-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-zoom-out-button-left | 0.0811 | 0.0811 | |
Darwin | click | builtin-item-zoom-reset-button-left | 0.0811 | 0.0811 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clickFormat = d3.format('0.2'); | |
var platform = 'Darwin'; | |
var scale = 2; | |
var WIDTH = 1492; | |
var HEIGHT = 1128; | |
function draw(data) { | |
// Choose the elements we want to draw. | |
data = data.filter(function (row) { | |
return ( | |
row.sys_info === 'Darwin' && | |
row.item === 'click' && | |
widgets[row.widget]); | |
}); | |
// Set up the image. | |
var chart = d3.select('svg').classed('chart', true); | |
chart.attr('viewBox', '0 0 ' + WIDTH + ' ' + HEIGHT); | |
var image = d3.select('.chart').append('image'); | |
image.attr({ | |
'x': 0, 'y': 0, 'width': WIDTH, 'height': HEIGHT, | |
'xlink:href': 'http://d3.dev/images/Darwin/HeatmapDefaultPlus.png' | |
}); | |
chart.selectAll('.bar') | |
.data(data) | |
.enter() | |
.append('rect') | |
.attr({ | |
'class': 'bar', | |
'fill': 'rgba(255,0,0,0)', | |
'x': function (d) { | |
return widgets[d.widget].x * scale; | |
}, | |
'y': function (d) { | |
return widgets[d.widget].y * scale; | |
}, | |
'width': function (d) { | |
return widgets[d.widget].width * scale; | |
}, | |
'height': function (d) { | |
return widgets[d.widget].height * scale; | |
}, | |
'title': function (d) { | |
return d.widget.replace('-button', '').replace('-', ' ') + | |
' - ' + clickFormat(d.instances_per_session) + ' clicks per session'; | |
} | |
}); | |
update(data); | |
} | |
function update(data) { | |
// Set up the scales. | |
var maxClicks = d3.max(function (data, d) { | |
return d.instances_per_session; | |
}); | |
var clickScale = d3.scale.pow() | |
.domain([1, maxClicks]) | |
.range(['rgba(255,0,0,0.1)', 'rgba(255,0,0,0.5)']); | |
var chart = d3.select('.chart'); | |
chart.selectAll('.bar').data(data).transition() | |
.style('fill', function (d) { | |
return clickScale(d.instances_per_session); | |
}).duration(500); | |
} | |
$(function () { | |
$('#btn-default').click(function () { | |
$('.btn.order').removeClass('btn-primary'); | |
$(this).addClass('btn-primary'); | |
update(clicks); | |
}); | |
$('#btn-reversed').click(function () { | |
$('.btn.order').removeClass('btn-primary'); | |
$(this).addClass('btn-primary'); | |
update(clicks); | |
}); | |
}); | |
var widgets = {}; | |
var clicks = []; | |
$.each(tributary.widgets, function (i, d) { | |
if (d.width !== 0) { | |
widgets[d.id] = d; | |
} | |
}); | |
$.each(tributary.heatmap_data, function (i, row) { | |
var d = row; | |
d.widget = d.subitem | |
.replace('builtin-item-', '') | |
.replace('-left', ''); | |
clicks.push(d); | |
}); | |
draw(clicks); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | x | y | width | height | |
---|---|---|---|---|---|
add-ons-button | 649 | 314 | 76 | 75 | |
alltabs-button | 1300 | 9 | 28 | 30 | |
back-button | 9 | 47 | 33 | 34 | |
BMB_bookmarksPopup | -1 | -1 | 0 | 0 | |
BMB_bookmarksToolbarPopup | -1 | -1 | 0 | 0 | |
BMB_unsortedBookmarksPopup | -1 | -1 | 0 | 0 | |
bookmarks-bar-chevron | -1 | -1 | 0 | 0 | |
bookmarks-bar-container | -1 | -1 | 0 | 0 | |
bookmarks-bar-item | -1 | -1 | 0 | 0 | |
bookmarks-bar-overflowed-item | -1 | -1 | 0 | 0 | |
bookmarks-menu-button | 566 | 52 | 58 | 24 | |
characterencoding-button | 286 | 193 | 112 | 70 | |
copy-button | 567 | 90 | 79.5 | 28 | |
cut-button | 484.5 | 90 | 81.5 | 28 | |
developer-button | 485 | 394 | 76 | 75 | |
downloads-button | 627 | 52 | 27 | 24 | |
e10s-button | -1 | -1 | 0 | 0 | |
edit-controls | 484.5 | 90 | 245 | 28 | |
email-link-button | 86 | 264 | 72 | 70 | |
feed-button | 197 | 193 | 72 | 70 | |
find-button | 485 | 314 | 76 | 75 | |
forward-button | 42 | 53 | 25 | 23 | |
fullscreen-button | 649 | 234 | 76 | 75 | |
history-panelmenu | 567 | 234 | 76 | 75 | |
home-button | 659 | 52 | 27 | 24 | |
menu-button-button | 701 | 52 | 27 | 24 | |
menubar-items | -1 | -1 | 0 | 0 | |
menubar-menu | -1 | -1 | 0 | 0 | |
menubar-menuitem | -1 | -1 | 0 | 0 | |
menubar-other | -1 | -1 | 0 | 0 | |
nav-bar | -1 | -1 | 0 | 0 | |
new-tab-button | 511 | 14 | 28 | 30 | |
new-window-button | 485 | 155 | 76 | 75 | |
open-file-button | 86 | 193 | 72 | 70 | |
PanelUI-contents | -1 | -1 | 0 | 0 | |
PanelUI-menu-button | -1 | -1 | 0 | 0 | |
paste-button | 647.5 | 90 | 82.5 | 28 | |
personal-bookmarks | 75 | 348 | 156 | 22 | |
PersonalToolbar | -1 | -1 | 0 | 0 | |
PlacesChevron | -1 | -1 | 0 | 0 | |
PlacesToolbarItems | -1 | -1 | 0 | 0 | |
preferences-button | 567 | 314 | 76 | 75 | |
print-button | 485 | 234 | 76 | 75 | |
privatebrowsing-button | 567 | 155 | 76 | 75 | |
save-page-button | 649 | 155 | 76 | 75 | |
search-container | 422 | 50 | 142 | 28 | |
searchbar | -1 | -1 | 0 | 0 | |
sidebar-button | -1 | -1 | 0 | 0 | |
social-share-button | -1 | -1 | 0 | 0 | |
sync-button | 197 | 264 | 72 | 70 | |
tabbrowser-tabs | 79 | 14 | 430 | 31 | |
tabsclose-button | -1 | -1 | 0 | 0 | |
TabsToolbar | -1 | -1 | 0 | 0 | |
tabview-button | 306 | 264 | 73 | 70 | |
toolbar-menubar | -1 | -1 | 0 | 0 | |
urlbar-container | -1 | -1 | 0 | 0 | |
urlbar-go-button | -1 | -1 | 0 | 0 | |
urlbar-reload-button | 391 | 53 | 25 | 23 | |
urlbar-stop-button | -1 | -1 | 0 | 0 | |
webrtc-status-button | -1 | -1 | 0 | 0 | |
zoom-controls | 484.5 | 120 | 245 | 28 | |
zoom-in-button | 647.5 | 120 | 82.5 | 28 | |
zoom-out-button | 484.5 | 120 | 81.5 | 28 | |
zoom-reset-button | 567 | 120 | 79.5 | 28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment