Skip to content

Instantly share code, notes, and snippets.

@AnotherContext
Created September 28, 2014 15:32
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 AnotherContext/e09d223946874aab5a40 to your computer and use it in GitHub Desktop.
Save AnotherContext/e09d223946874aab5a40 to your computer and use it in GitHub Desktop.
DA: calls4assistance and crimes vs regions heatmap
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 1000px;
height: 600px;
}
</style>
</head>
<body >
<div id = 'chartc945f025146' class = 'rChart polycharts'></div>
<script type='text/javascript'>
var chartParams = {
"dom": "chartc945f025146",
"width": 1000,
"height": 600,
"layers": [
{
"x": "Calls",
"y": "Region",
"data": {
"Region": [ "East Midlands Region", "East of England Region", "London Region", "North East Region", "North West Region", "South East Region", "South West Region", "Wales", "West Midlands Region", "Yorkshire and the Humber Region", "East Midlands Region", "East of England Region", "London Region", "North East Region", "North West Region", "South East Region", "South West Region", "Wales", "West Midlands Region", "Yorkshire and the Humber Region" ],
"Calls": [ "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "calls.for.assistance.with.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker", "crime.with.a.DA.marker" ],
"Value": [ "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value", "value" ],
"Rescale": [ 79584, 82199, 226616, 58012, 143257, 120282, 60282, 46771, 123123, 70351, 19396, 26655, 53540, 12604, 34144, 35105, 21712, 13100, 32125, 21317 ],
"NA": [ 0.18245, 0.19699, 1, 0.062504, 0.5365, 0.40875, 0.075126, 0, 0.42454, 0.13111, 0.16592, 0.34324, 1, 0, 0.52619, 0.54966, 0.22249, 0.012116, 0.47687, 0.21284 ]
},
"facet": null,
"color": "Rescale",
"type": "tile"
}
],
"facet": [],
"guides": {
"reduceXTicks": false,
"color": {
"scale": {
"type": "gradient",
"lower": "white",
"upper": "red"
}
},
"y": {
"numticks": 10
}
},
"coord": [],
"id": "chartc945f025146"
}
_.each(chartParams.layers, function(el){
el.data = polyjs.data(el.data)
})
var graph_chartc945f025146 = polyjs.chart(chartParams);
</script>
<script></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment