Report not found

There was a problem finding this report.
Scenarios - Usage heatmap
March 13, 2016 · Refreshed over 1 year ago
Description
A heatmap of every user's activity in their first 30 days.

Collaborators

Run History
SELECT * FROM modeanalytics.retention_scenarios ORDER BY 1,2
SELECT * FROM modeanalytics.retention_scenarios ORDER BY 1,2
<style> .user-label, .date-label { font-size: 10px; fill: #95A1A1; } .box { fill: #22A3C0; } .container { text-align: center; } .scenario { width: 270px; text-align: center; display: inline-block; } .major-label { fill: #394242; font-size: 14px; } </style> <div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="container"> <div class="scenario" id="scenario-1"></div> <div class="scenario" id="scenario-2"></div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> <script> drawScenarioGrid(1) drawScenarioGrid(2) function drawScenarioGrid(scenario) { var data = _.where(dataset.content, {scenario:scenario}), users = _.sortBy(_.uniq(_.pluck(data,"user_id")),function(x){ return x; }), dates = _.sortBy(_.uniq(_.pluck(data,"occurred_at")),function(x) { return x; }); var dotWidth = 7, dotHeight = 7; var margin = {top: 10, right: 5, bottom: 5, left: 40}, width = dotWidth * dates.length, height = dotHeight * users.length; var svg = d3.select("#scenario-" + scenario).append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var x = d3.scale.ordinal() .domain(dates.map(function(d) { return d; })) .rangeRoundBands([0, width], .2); var y = d3.scale.ordinal() .domain(users.map(function(d) { return d; })) .rangeRoundBands([0, height], .2); svg.selectAll(".box") .data(data) .enter().append("rect") .attr("class", "box") .attr("x", function(d) { return x(d.occurred_at); }) .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.user_id); }) .attr("height", y.rangeBand()); svg.selectAll(".user-label") .data(users) .enter().append("text") .attr("class","user-label") .attr("text-anchor","end") .attr("x",5) .attr("y", function(d) { return y(d) + y.rangeBand() +2; }) .text(function(d,i) { if (i == 0) { return "User " + d; } else if (i % 5 ==0) { return i; } }) svg.selectAll(".day-label") .data(dates) .enter().append("text") .attr("class","date-label") .attr("text-anchor","middle") .attr("x", function(d) { return x(d) + x.rangeBand()/2; }) .attr("y", 45) .text(function(d,i) { if (i % 5 ==0) { return i; } }) svg.append("text") .attr("x",width/2) .attr("y",25) .attr("class","date-label") .attr("text-anchor","middle") .text("Days after first event") svg.append("text") .attr("x",width/2) .attr("y",5) .attr("class","major-label") .attr("text-anchor","middle") .text("Scenario " + scenario) } </script>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled