Skip to content

Instantly share code, notes, and snippets.

@adamgreenhall
Created October 30, 2011 19:29
Show Gist options
  • Save adamgreenhall/1326318 to your computer and use it in GitHub Desktop.
Save adamgreenhall/1326318 to your computer and use it in GitHub Desktop.
d3 zoom click and select behavior
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en'>
<head>
<title>weight</title>
<link href='style.css' rel='stylesheet' type='text/css' />
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script src='http://mbostock.github.com/d3/d3.js' type='text/javascript'></script>
<script src='http://mbostock.github.com/d3/d3.time.js' type='text/javascript'></script>
</head>
<body>
<div id='chart'>
<div id='footer'>
<div class='title'>Weight [lbs]</div>
<div class='hint'>
<p>click or option/alt-click to toggle zoom</p>
<p>select to zoom in on a particular area</p>
</div>
</div>
</div>
</body>
<script src='show_weight.js' type='text/javascript'></script>
</html>
</body>
</html>
var format, h, line, m, parse, rect, svg, translate, trendline, w, x, x0, x1, xAxis, x_dom, x_dom_zoom, y, yAxis;
translate = function(x, y) {
return "translate(" + x + "," + y + ")";
};
m = [79, 80, 160, 79];
w = 1000 - m[1] - m[3];
h = 500 - m[0] - m[2];
rect = null;
x0 = null;
x1 = null;
parse = d3.time.format("%Y-%m-%d %H:%M").parse;
format = d3.time.format("%Y-%m-%d");
x = d3.time.scale().range([0, w]);
y = d3.scale.linear().range([h, 0]);
x_dom = [];
x_dom_zoom = [];
xAxis = d3.svg.axis().scale(x).orient("bottom");
yAxis = d3.svg.axis().scale(y).orient("left");
line = d3.svg.line().x(function(d) {
return x(d.x);
}).y(function(d) {
return y(d.y);
}).interpolate("basis");
trendline = d3.svg.line().x(function(d) {
return x(d.x);
}).y(function(d) {
return y(d.y);
});
svg = d3.select("#chart").append("svg:svg").attr("width", w + m[1] + m[3]).attr("height", h + m[0] + m[2]).append("svg:g").attr("transform", translate(m[3], m[0]));
svg.append("svg:rect").attr("width", w).attr("height", h);
svg.append("svg:clipPath").attr("id", "clip").append("svg:rect").attr("x", x(0)).attr("y", y(1)).attr("width", x(1) - x(0)).attr("height", y(0) - y(1));
d3.json("weight.json", function(data) {
var data_parsed, get_min_max, lines_parsed, offset, small_motion, trend_long_parsed, trend_near_parsed, update_zoom, update_zoom_click, x_dom_all, x_dom_default, y_dom_all, y_dom_default;
data_parsed = data.weight_data.map(function(d) {
return {
x: parse(d["timestamp"]),
y: +d["weight"]
};
});
x_dom_default = data.ranges.time_default.map(function(t) {
return parse(t);
});
x_dom_all = data.ranges.time_all.map(function(t) {
return parse(t);
});
y_dom_default = data.ranges.weight_default.map(function(w) {
return +w;
});
y_dom_all = data.ranges.weight_all.map(function(w) {
return +w;
});
x.domain(x_dom_all);
y.domain(y_dom_all);
svg.append("svg:g").attr("class", "x grid").attr("transform", translate(0, h)).call(xAxis.tickSubdivide(0).tickSize(-h));
svg.append("svg:g").attr("class", "y grid").attr("transform", translate(0, 0)).call(yAxis.tickSubdivide(1).tickSize(-w));
svg.append("svg:g").attr("class", "x axis").attr("transform", translate(0, h)).call(xAxis.tickSubdivide(0).tickSize(6));
svg.append("svg:g").attr("class", "y axis").call(yAxis.tickSubdivide(0).tickSize(6));
svg.selectAll("dot").data(data_parsed).enter().append("svg:circle").attr("class", "dot").attr("cx", function(d) {
return x(d.x);
}).attr("cy", function(d) {
return y(d.y);
}).attr("r", 2).attr("clip-path", "url(#clip)");
update_zoom = function() {
var duration_click, t;
duration_click = (d3.event.altKey ? 7500 : 750);
t = svg.transition().duration(duration_click);
t.select("g.x.grid").call(xAxis.tickSubdivide(1).tickSize(-h));
t.select("g.y.grid").call(yAxis.tickSubdivide(1).tickSize(-w));
t.select("g.x.axis").call(xAxis.tickSubdivide(0).tickSize(6));
t.select("g.y.axis").call(yAxis.tickSubdivide(0).tickSize(6));
svg.selectAll("circle.dot").transition().duration(duration_click).attr("cx", function(d) {
return x(d.x);
}).attr("cy", function(d) {
return y(d.y);
});
};
update_zoom_click = function() {
x.domain((x.domain()[0] - x_dom_default[0]) || (x.domain()[1] - x_dom_default[1]) ? x_dom_default : x_dom_all);
y.domain((y.domain()[0] - y_dom_default[0]) || (y.domain()[1] - y_dom_default[1]) ? y_dom_default : y_dom_all);
update_zoom();
};
offset = 80;
small_motion = 30;
get_min_max = function(x0, x1) {
var maxx, maxy, minx, miny;
minx = Math.min(x0[0], x1[0]);
maxx = Math.max(x0[0], x1[0]);
miny = Math.min(x0[1], x1[1]);
maxy = Math.max(x0[1], x1[1]);
return [minx, maxx, miny, maxy];
};
svg.on("mousedown", function() {
x0 = d3.svg.mouse(this);
rect = d3.select(this.parentNode).append("svg:rect").style("fill", "#999").style("fill-opacity", .5);
d3.event.preventDefault();
});
svg.on("mousemove", function() {
var xyminmax;
if (rect !== null) {
x1 = d3.svg.mouse(this);
xyminmax = get_min_max(x0, x1);
rect.attr("x", xyminmax[0] + offset).attr("y", xyminmax[2] + offset).attr("width", xyminmax[1] - xyminmax[0]).attr("height", xyminmax[3] - xyminmax[2]);
}
});
svg.on("mouseup", function() {
var xyminmax;
if (rect !== null) {
rect.remove();
rect = null;
if (x1 === null) {
update_zoom_click();
} else if (Math.abs(x0[0] - x1[0]) < small_motion && Math.abs(x0[1] - x1[1]) < small_motion) {
update_zoom_click();
} else {
xyminmax = get_min_max(x0, x1);
x.domain([x.invert(xyminmax[0]), x.invert(xyminmax[1])]);
y.domain([y.invert(xyminmax[3]), y.invert(xyminmax[2])]);
update_zoom();
}
}
});
});
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
body {
line-height: 1; }
body {
overflow: hidden;
margin: 0;
font-size: 14px;
font-family: "Helvetica Neue", Helvetica;
color: #2a2a2a;
margin-left: auto;
margin-right: auto;
margin-top: 60px; }
#chart, #header, #footer {
position: absolute;
top: 0; }
/* line 43, site.css.sass */
#header, #footer {
z-index: 1;
display: block;
font-size: 36px;
font-weight: 300;
text-shadow: 0 1px 0 white; }
/* line 50, site.css.sass */
#header.inverted, #footer.inverted {
color: white;
text-shadow: 0 1px 4px black; }
/* line 54, site.css.sass */
#header {
top: 80px;
left: 140px;
width: 1000px; }
/* line 59, site.css.sass */
#footer {
top: 380px;
right: 140px;
text-align: right; }
/* line 64, site.css.sass */
pre {
font-size: 18px; }
/* line 67, site.css.sass */
.string, .regexp {
color: #ff3399; }
/* line 70, site.css.sass */
.keyword {
color: #0000cc; }
/* line 73, site.css.sass */
.comment {
color: #777777;
font-style: oblique; }
/* line 77, site.css.sass */
.number {
color: #336699; }
/* line 80, site.css.sass */
.class, .special {
color: #1181b8; }
/* line 84, site.css.sass */
a:link, a:visited {
color: black;
text-decoration: none; }
/* line 87, site.css.sass */
a:hover {
color: #666666; }
/* line 90, site.css.sass */
.hint {
position: absolute;
right: 0;
width: 1000px;
font-size: 12px;
color: #999999;
margin-top: 10px; }
/* line 98, site.css.sass */
line {
stroke: black;
stroke-width: 1.5px; }
/* line 102, site.css.sass */
rect {
fill: none;
pointer-events: all; }
/* line 106, site.css.sass */
circle.dot {
fill: darkgray; }
/* line 109, site.css.sass */
path.weight.smoothed {
stroke: steelblue;
stroke-width: 2px; }
/* line 112, site.css.sass */
.weight.smoothed {
margin-top: 5px;
color: steelblue; }
/* line 116, site.css.sass */
path.weight.trend {
stroke-width: 4px;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60);
opacity: 0.6; }
/* line 119, site.css.sass */
path.weight.trend.nearterm {
stroke: goldenrod; }
/* line 121, site.css.sass */
path.weight.trend.longterm {
stroke: lightsalmon; }
/* line 123, site.css.sass */
.weight.trend {
font-size: 50%;
padding-top: 5px; }
/* line 126, site.css.sass */
.weight.trend .nearterm {
color: goldenrod; }
/* line 128, site.css.sass */
.weight.trend .longterm {
color: lightsalmon; }
/* line 131, site.css.sass */
#footer .times {
font-size: 15px; }
/* line 133, site.css.sass */
#footer .legend {
font-size: 30px;
font-style: bold; }
/* line 137, site.css.sass */
svg {
font-size: 10px; }
/* line 140, site.css.sass */
rect {
fill: #eeeeee; }
/* line 143, site.css.sass */
path.area {
fill: black;
fill-opacity: 0.75; }
/* line 147, site.css.sass */
.axis line {
stroke-width: 0.5px;
shape-rendering: crispEdges; }
/* line 152, site.css.sass */
.grid line {
stroke-width: 0.5px;
shape-rendering: crispEdges;
stroke: white; }
/* line 156, site.css.sass */
.grid line.minor {
stroke-opacity: 0.5; }
/* line 158, site.css.sass */
.grid text {
display: none; }
/* line 161, site.css.sass */
.axis line {
stroke: black; }
/* line 164, site.css.sass */
.grid path, .axis path {
display: none; }
{
"ranges": {
"weight_default": [
137.1,
152.5
],
"weight_all": [
137.1,
183.0
],
"time_default": [
"2011-09-29 00:00",
"2011-10-30 00:00"
],
"time_all": [
"2007-09-07 00:00",
"2011-10-30 00:00"
]
},
"weight_data": [
{
"weight": 178.0,
"timestamp": "2007-09-10 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-09-11 00:00"
},
{
"weight": 174.5,
"timestamp": "2007-09-12 00:00"
},
{
"weight": 175.0,
"timestamp": "2007-09-13 00:00"
},
{
"weight": 175.0,
"timestamp": "2007-09-14 00:00"
},
{
"weight": 175.5,
"timestamp": "2007-09-15 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-09-18 00:00"
},
{
"weight": 174.0,
"timestamp": "2007-09-19 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-09-20 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-09-21 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-09-24 00:00"
},
{
"weight": 175.0,
"timestamp": "2007-09-25 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-09-26 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-09-27 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-09-28 00:00"
},
{
"weight": 174.0,
"timestamp": "2007-09-30 00:00"
},
{
"weight": 174.5,
"timestamp": "2007-10-01 00:00"
},
{
"weight": 174.0,
"timestamp": "2007-10-02 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-10-03 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-10-04 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-10-05 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-10-06 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-07 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-10-08 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-10-10 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-10-12 00:00"
},
{
"weight": 174.0,
"timestamp": "2007-10-13 00:00"
},
{
"weight": 174.0,
"timestamp": "2007-10-14 00:00"
},
{
"weight": 175.0,
"timestamp": "2007-10-15 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-10-16 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-17 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-18 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-24 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-25 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-10-26 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-10-28 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-10-29 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-10-30 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-10-31 00:00"
},
{
"weight": 173.5,
"timestamp": "2007-11-01 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-02 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-04 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-05 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-06 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-07 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-08 00:00"
},
{
"weight": 173.0,
"timestamp": "2007-11-09 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-10 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-11 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-12 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-13 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-11-14 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-11-15 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-11-16 00:00"
},
{
"weight": 170.0,
"timestamp": "2007-11-17 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-18 00:00"
},
{
"weight": 169.0,
"timestamp": "2007-11-20 00:00"
},
{
"weight": 170.0,
"timestamp": "2007-11-21 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-11-22 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-11-23 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-11-24 00:00"
},
{
"weight": 172.0,
"timestamp": "2007-11-25 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-11-26 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-28 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-11-30 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-12-02 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-12-03 00:00"
},
{
"weight": 172.5,
"timestamp": "2007-12-04 00:00"
},
{
"weight": 171.5,
"timestamp": "2007-12-05 00:00"
},
{
"weight": 170.5,
"timestamp": "2007-12-06 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-12-07 00:00"
},
{
"weight": 169.0,
"timestamp": "2007-12-08 00:00"
},
{
"weight": 169.0,
"timestamp": "2007-12-09 00:00"
},
{
"weight": 169.5,
"timestamp": "2007-12-10 00:00"
},
{
"weight": 169.5,
"timestamp": "2007-12-11 00:00"
},
{
"weight": 169.5,
"timestamp": "2007-12-12 00:00"
},
{
"weight": 169.0,
"timestamp": "2007-12-13 00:00"
},
{
"weight": 170.0,
"timestamp": "2007-12-14 00:00"
},
{
"weight": 170.0,
"timestamp": "2007-12-15 00:00"
},
{
"weight": 169.5,
"timestamp": "2007-12-17 00:00"
},
{
"weight": 168.5,
"timestamp": "2007-12-18 00:00"
},
{
"weight": 169.5,
"timestamp": "2007-12-19 00:00"
},
{
"weight": 170.5,
"timestamp": "2007-12-20 00:00"
},
{
"weight": 168.0,
"timestamp": "2007-12-21 00:00"
},
{
"weight": 168.5,
"timestamp": "2007-12-22 00:00"
},
{
"weight": 169.0,
"timestamp": "2007-12-26 00:00"
},
{
"weight": 171.0,
"timestamp": "2007-12-27 00:00"
},
{
"weight": 168.5,
"timestamp": "2007-12-28 00:00"
},
{
"weight": 167.5,
"timestamp": "2007-12-30 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-01-01 00:00"
},
{
"weight": 169.0,
"timestamp": "2008-01-05 00:00"
},
{
"weight": 169.5,
"timestamp": "2008-01-06 00:00"
},
{
"weight": 170.0,
"timestamp": "2008-01-07 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-01-09 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-01-10 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-01-11 00:00"
},
{
"weight": 170.5,
"timestamp": "2008-01-14 00:00"
},
{
"weight": 169.0,
"timestamp": "2008-01-15 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-01-16 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-01-17 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-01-18 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-01-20 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-01-21 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-01-22 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-01-23 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-01-24 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-01-27 00:00"
},
{
"weight": 169.5,
"timestamp": "2008-01-28 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-01-29 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-01-30 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-02 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-02-04 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-05 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-02-06 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-07 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-08 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-02-10 00:00"
},
{
"weight": 166.4,
"timestamp": "2008-02-13 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-02-14 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-18 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-02-19 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-02-20 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-02-21 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-02-23 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-02-24 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-02-26 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-02-27 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-03-07 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-03-08 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-03-09 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-03-10 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-03-11 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-03-12 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-03-13 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-03-16 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-03-18 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-03-19 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-03-20 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-03-21 00:00"
},
{
"weight": 168.5,
"timestamp": "2008-03-24 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-03-25 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-03-26 00:00"
},
{
"weight": 165.5,
"timestamp": "2008-03-27 00:00"
},
{
"weight": 168.0,
"timestamp": "2008-03-28 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-03-29 00:00"
},
{
"weight": 165.5,
"timestamp": "2008-03-30 00:00"
},
{
"weight": 165.5,
"timestamp": "2008-03-31 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-04-01 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-04-02 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-04-03 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-04-04 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-05 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-04-06 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-04-07 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-08 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-09 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-10 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-11 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-04-12 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-13 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-04-14 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-15 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-16 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-17 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-04-18 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-04-20 00:00"
},
{
"weight": 167.5,
"timestamp": "2008-04-21 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-04-22 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-04-24 00:00"
},
{
"weight": 167.0,
"timestamp": "2008-04-25 00:00"
},
{
"weight": 166.5,
"timestamp": "2008-04-26 00:00"
},
{
"weight": 166.0,
"timestamp": "2008-04-27 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-04-28 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-29 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-04-30 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-05-05 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-05-06 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-05-07 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-05-24 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-05-25 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-05-30 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-05-31 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-01 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-02 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-03 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-04 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-06-05 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-06-06 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-08 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-09 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-11 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-06-12 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-17 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-06-18 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-19 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-20 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-06-23 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-24 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-06-25 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-06-26 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-06-27 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-06-28 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-06-29 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-07-01 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-07-03 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-07-04 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-07-06 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-07-07 00:00"
},
{
"weight": 165.5,
"timestamp": "2008-07-08 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-07-09 00:00"
},
{
"weight": 165.5,
"timestamp": "2008-07-10 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-07-11 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-07-12 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-07-14 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-07-17 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-07-19 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-07-21 00:00"
},
{
"weight": 164.0,
"timestamp": "2008-07-22 00:00"
},
{
"weight": 163.5,
"timestamp": "2008-07-23 00:00"
},
{
"weight": 165.0,
"timestamp": "2008-07-25 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-07-28 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-07-29 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-07-30 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-07-31 00:00"
},
{
"weight": 164.5,
"timestamp": "2008-08-02 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-08-04 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-08-07 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-08-10 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-08-11 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-08-12 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-08-13 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-08-14 00:00"
},
{
"weight": 160.5,
"timestamp": "2008-08-23 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-08-24 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-08-25 00:00"
},
{
"weight": 160.0,
"timestamp": "2008-08-26 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-08-27 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-08-29 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-09-03 00:00"
},
{
"weight": 163.0,
"timestamp": "2008-09-06 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-09-08 00:00"
},
{
"weight": 162.0,
"timestamp": "2008-09-10 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-09-12 00:00"
},
{
"weight": 162.5,
"timestamp": "2008-09-16 00:00"
},
{
"weight": 161.5,
"timestamp": "2008-09-23 00:00"
},
{
"weight": 159.5,
"timestamp": "2008-09-25 00:00"
},
{
"weight": 159.5,
"timestamp": "2008-09-26 00:00"
},
{
"weight": 160.0,
"timestamp": "2008-09-27 00:00"
},
{
"weight": 159.5,
"timestamp": "2008-09-28 00:00"
},
{
"weight": 159.0,
"timestamp": "2008-09-29 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-09-30 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-10-01 00:00"
},
{
"weight": 159.0,
"timestamp": "2008-10-02 00:00"
},
{
"weight": 159.5,
"timestamp": "2008-10-03 00:00"
},
{
"weight": 158.5,
"timestamp": "2008-10-04 00:00"
},
{
"weight": 160.5,
"timestamp": "2008-10-08 00:00"
},
{
"weight": 160.0,
"timestamp": "2008-10-09 00:00"
},
{
"weight": 158.5,
"timestamp": "2008-10-10 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-10-11 00:00"
},
{
"weight": 160.0,
"timestamp": "2008-10-13 00:00"
},
{
"weight": 156.5,
"timestamp": "2008-10-14 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-10-15 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-10-16 00:00"
},
{
"weight": 161.0,
"timestamp": "2008-10-23 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-10-24 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-10-25 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-10-26 00:00"
},
{
"weight": 159.5,
"timestamp": "2008-10-28 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-10-30 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-10-31 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-11-03 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-11-04 00:00"
},
{
"weight": 157.0,
"timestamp": "2008-11-05 00:00"
},
{
"weight": 156.5,
"timestamp": "2008-11-06 00:00"
},
{
"weight": 155.0,
"timestamp": "2008-11-07 00:00"
},
{
"weight": 155.5,
"timestamp": "2008-11-09 00:00"
},
{
"weight": 155.5,
"timestamp": "2008-11-11 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-11-12 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-11-13 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-11-14 00:00"
},
{
"weight": 158.0,
"timestamp": "2008-11-16 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-11-18 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-11-19 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-11-24 00:00"
},
{
"weight": 156.5,
"timestamp": "2008-11-30 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-12-02 00:00"
},
{
"weight": 156.5,
"timestamp": "2008-12-03 00:00"
},
{
"weight": 155.0,
"timestamp": "2008-12-04 00:00"
},
{
"weight": 155.0,
"timestamp": "2008-12-05 00:00"
},
{
"weight": 156.0,
"timestamp": "2008-12-06 00:00"
},
{
"weight": 155.0,
"timestamp": "2008-12-07 00:00"
},
{
"weight": 156.0,
"timestamp": "2008-12-09 00:00"
},
{
"weight": 156.0,
"timestamp": "2008-12-12 00:00"
},
{
"weight": 155.5,
"timestamp": "2008-12-13 00:00"
},
{
"weight": 154.5,
"timestamp": "2008-12-15 00:00"
},
{
"weight": 156.0,
"timestamp": "2008-12-16 00:00"
},
{
"weight": 154.0,
"timestamp": "2008-12-17 00:00"
},
{
"weight": 154.5,
"timestamp": "2008-12-18 00:00"
},
{
"weight": 157.5,
"timestamp": "2008-12-21 00:00"
},
{
"weight": 155.5,
"timestamp": "2008-12-27 00:00"
},
{
"weight": 155.0,
"timestamp": "2008-12-28 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-01-06 00:00"
},
{
"weight": 156.0,
"timestamp": "2009-01-07 00:00"
},
{
"weight": 153.5,
"timestamp": "2009-01-08 00:00"
},
{
"weight": 154.5,
"timestamp": "2009-01-09 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-01-12 00:00"
},
{
"weight": 154.0,
"timestamp": "2009-01-14 00:00"
},
{
"weight": 154.5,
"timestamp": "2009-01-15 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-01-18 00:00"
},
{
"weight": 154.5,
"timestamp": "2009-01-19 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-01-22 00:00"
},
{
"weight": 156.5,
"timestamp": "2009-01-25 00:00"
},
{
"weight": 156.0,
"timestamp": "2009-01-27 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-01-30 00:00"
},
{
"weight": 159.0,
"timestamp": "2009-01-31 00:00"
},
{
"weight": 157.0,
"timestamp": "2009-02-01 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-02-02 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-02-03 00:00"
},
{
"weight": 155.5,
"timestamp": "2009-02-04 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-02-08 00:00"
},
{
"weight": 159.0,
"timestamp": "2009-02-09 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-02-10 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-02-12 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-02-15 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-02-16 00:00"
},
{
"weight": 159.0,
"timestamp": "2009-02-17 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-02-23 00:00"
},
{
"weight": 156.0,
"timestamp": "2009-02-24 00:00"
},
{
"weight": 157.0,
"timestamp": "2009-02-25 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-02-26 00:00"
},
{
"weight": 156.5,
"timestamp": "2009-02-27 00:00"
},
{
"weight": 160.0,
"timestamp": "2009-03-10 00:00"
},
{
"weight": 159.5,
"timestamp": "2009-03-11 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-03-12 00:00"
},
{
"weight": 161.0,
"timestamp": "2009-03-13 00:00"
},
{
"weight": 161.0,
"timestamp": "2009-03-14 00:00"
},
{
"weight": 161.0,
"timestamp": "2009-03-15 00:00"
},
{
"weight": 157.0,
"timestamp": "2009-03-16 00:00"
},
{
"weight": 156.0,
"timestamp": "2009-03-17 00:00"
},
{
"weight": 156.5,
"timestamp": "2009-03-18 00:00"
},
{
"weight": 160.0,
"timestamp": "2009-03-19 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-03-21 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-03-23 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-03-24 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-03-26 00:00"
},
{
"weight": 159.5,
"timestamp": "2009-03-27 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-03-30 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-03-31 00:00"
},
{
"weight": 160.5,
"timestamp": "2009-04-02 00:00"
},
{
"weight": 160.5,
"timestamp": "2009-04-03 00:00"
},
{
"weight": 159.0,
"timestamp": "2009-04-05 00:00"
},
{
"weight": 157.0,
"timestamp": "2009-04-07 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-04-08 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-04-09 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-04-10 00:00"
},
{
"weight": 160.0,
"timestamp": "2009-04-11 00:00"
},
{
"weight": 158.0,
"timestamp": "2009-04-12 00:00"
},
{
"weight": 157.5,
"timestamp": "2009-04-20 00:00"
},
{
"weight": 157.0,
"timestamp": "2009-04-21 00:00"
},
{
"weight": 156.0,
"timestamp": "2009-04-22 00:00"
},
{
"weight": 155.0,
"timestamp": "2009-04-23 00:00"
},
{
"weight": 154.0,
"timestamp": "2009-04-24 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-04-30 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-05-01 00:00"
},
{
"weight": 158.5,
"timestamp": "2009-05-05 00:00"
},
{
"weight": 159.5,
"timestamp": "2009-05-12 00:00"
},
{
"weight": 160.0,
"timestamp": "2009-05-13 00:00"
},
{
"weight": 160.5,
"timestamp": "2009-05-15 00:00"
},
{
"weight": 159.0,
"timestamp": "2009-05-16 00:00"
},
{
"weight": 160.5,
"timestamp": "2009-05-17 00:00"
},
{
"weight": 160.0,
"timestamp": "2009-05-19 00:00"
},
{
"weight": 156.0,
"timestamp": "2010-07-06 00:00"
},
{
"weight": 151.0,
"timestamp": "2010-10-28 00:00"
},
{
"weight": 148.0,
"timestamp": "2010-11-14 00:00"
},
{
"weight": 149.0,
"timestamp": "2010-12-15 00:00"
},
{
"weight": 148.0,
"timestamp": "2011-01-14 00:00"
},
{
"weight": 148.0,
"timestamp": "2011-07-08 00:00"
},
{
"weight": 143.7,
"timestamp": "2011-09-15 00:00"
},
{
"weight": 146.5,
"timestamp": "2011-09-15 00:00"
},
{
"weight": 149.6,
"timestamp": "2011-09-15 00:00"
},
{
"weight": 146.1,
"timestamp": "2011-09-15 00:00"
},
{
"weight": 145.7,
"timestamp": "2011-09-15 00:00"
},
{
"weight": 145.3,
"timestamp": "2011-09-16 00:00"
},
{
"weight": 144.4,
"timestamp": "2011-09-17 00:00"
},
{
"weight": 147.8,
"timestamp": "2011-09-21 00:00"
},
{
"weight": 147.2,
"timestamp": "2011-09-22 00:00"
},
{
"weight": 147.2,
"timestamp": "2011-09-22 00:00"
},
{
"weight": 147.2,
"timestamp": "2011-09-26 00:00"
},
{
"weight": 147.7,
"timestamp": "2011-09-28 00:00"
},
{
"weight": 146.2,
"timestamp": "2011-10-03 00:00"
},
{
"weight": 144.2,
"timestamp": "2011-10-04 00:00"
},
{
"weight": 145.0,
"timestamp": "2011-10-05 00:00"
},
{
"weight": 147.5,
"timestamp": "2011-10-06 00:00"
},
{
"weight": 142.6,
"timestamp": "2011-10-07 00:00"
},
{
"weight": 143.5,
"timestamp": "2011-10-08 00:00"
},
{
"weight": 143.1,
"timestamp": "2011-10-09 00:00"
},
{
"weight": 142.1,
"timestamp": "2011-10-10 00:00"
},
{
"weight": 142.1,
"timestamp": "2011-10-11 00:00"
},
{
"weight": 142.1,
"timestamp": "2011-10-12 00:00"
},
{
"weight": 143.4,
"timestamp": "2011-10-13 00:00"
},
{
"weight": 144.0,
"timestamp": "2011-10-14 00:00"
},
{
"weight": 144.8,
"timestamp": "2011-10-18 00:00"
},
{
"weight": 145.6,
"timestamp": "2011-10-19 00:00"
},
{
"weight": 143.9,
"timestamp": "2011-10-20 00:00"
},
{
"weight": 143.5,
"timestamp": "2011-10-21 00:00"
},
{
"weight": 143.5,
"timestamp": "2011-10-22 00:00"
},
{
"weight": 145.4,
"timestamp": "2011-10-23 00:00"
},
{
"weight": 144.1,
"timestamp": "2011-10-24 00:00"
},
{
"weight": 143.1,
"timestamp": "2011-10-25 00:00"
},
{
"weight": 143.4,
"timestamp": "2011-10-26 00:00"
},
{
"weight": 143.6,
"timestamp": "2011-10-27 00:00"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment