Created
March 15, 2016 02:31
-
-
Save polyama/67c09b33119a8c0b349b to your computer and use it in GitHub Desktop.
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
d3 = function() { | |
var d3 = { | |
version: "3.2.7" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; | |
try { | |
d3_document.createElement("div").style.setProperty("opacity", 0, ""); | |
} catch (error) { | |
var d3_element_prototype = d3_window.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty; | |
d3_element_prototype.setAttribute = function(name, value) { | |
d3_element_setAttribute.call(this, name, value + ""); | |
}; | |
d3_element_prototype.setAttributeNS = function(space, local, value) { | |
d3_element_setAttributeNS.call(this, space, local, value + ""); | |
}; | |
d3_style_prototype.setProperty = function(name, value, priority) { | |
d3_style_setProperty.call(this, name, value + "", priority); | |
}; | |
} | |
d3.ascending = function(a, b) { | |
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; | |
}; | |
d3.descending = function(a, b) { | |
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; | |
}; | |
d3.min = function(array, f) { | |
var i = -1, n = array.length, a, b; | |
if (arguments.length === 1) { | |
while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined; | |
while (++i < n) if ((b = array[i]) != null && a > b) a = b; | |
} else { | |
while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined; | |
while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; | |
} | |
return a; | |
}; | |
d3.max = function(array, f) { | |
var i = -1, n = array.length, a, b; | |
if (arguments.length === 1) { | |
while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined; | |
while (++i < n) if ((b = array[i]) != null && b > a) a = b; | |
} else { | |
while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined; | |
while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; | |
} | |
return a; | |
}; | |
d3.extent = function(array, f) { | |
var i = -1, n = array.length, a, b, c; | |
if (arguments.length === 1) { | |
while (++i < n && !((a = c = array[i]) != null && a <= a)) a = c = undefined; | |
while (++i < n) if ((b = array[i]) != null) { | |
if (a > b) a = b; | |
if (c < b) c = b; | |
} | |
} else { | |
while (++i < n && !((a = c = f.call(array, array[i], i)) != null && a <= a)) a = undefined; | |
while (++i < n) if ((b = f.call(array, array[i], i)) != null) { | |
if (a > b) a = b; | |
if (c < b) c = b; | |
} | |
} | |
return [ a, c ]; | |
}; | |
d3.sum = function(array, f) { | |
var s = 0, n = array.length, a, i = -1; | |
if (arguments.length === 1) { | |
while (++i < n) if (!isNaN(a = +array[i])) s += a; | |
} else { | |
while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a; | |
} | |
return s; | |
}; | |
function d3_number(x) { | |
return x != null && !isNaN(x); | |
} | |
d3.mean = function(array, f) { | |
var n = array.length, a, m = 0, i = -1, j = 0; | |
if (arguments.length === 1) { | |
while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j; | |
} else { | |
while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j; | |
} | |
return j ? m : undefined; | |
}; | |
d3.quantile = function(values, p) { | |
var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h; | |
return e ? v + e * (values[h] - v) : v; | |
}; | |
d3.median = function(array, f) { | |
if (arguments.length > 1) array = array.map(f); | |
array = array.filter(d3_number); | |
return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined; | |
}; | |
d3.bisector = function(f) { | |
return { | |
left: function(a, x, lo, hi) { | |
if (arguments.length < 3) lo = 0; | |
if (arguments.length < 4) hi = a.length; | |
while (lo < hi) { | |
var mid = lo + hi >>> 1; | |
if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid; | |
} | |
return lo; | |
}, | |
right: function(a, x, lo, hi) { | |
if (arguments.length < 3) lo = 0; | |
if (arguments.length < 4) hi = a.length; | |
while (lo < hi) { | |
var mid = lo + hi >>> 1; | |
if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1; | |
} | |
return lo; | |
} | |
}; | |
}; | |
var d3_bisector = d3.bisector(function(d) { | |
return d; | |
}); | |
d3.bisectLeft = d3_bisector.left; | |
d3.bisect = d3.bisectRight = d3_bisector.right; | |
d3.shuffle = function(array) { | |
var m = array.length, t, i; | |
while (m) { | |
i = Math.random() * m-- | 0; | |
t = array[m], array[m] = array[i], array[i] = t; | |
} | |
return array; | |
}; | |
d3.permute = function(array, indexes) { | |
var permutes = [], i = -1, n = indexes.length; | |
while (++i < n) permutes[i] = array[indexes[i]]; | |
return permutes; | |
}; | |
d3.zip = function() { | |
if (!(n = arguments.length)) return []; | |
for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) { | |
for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) { | |
zip[j] = arguments[j][i]; | |
} | |
} | |
return zips; | |
}; | |
function d3_zipLength(d) { | |
return d.length; | |
} | |
d3.transpose = function(matrix) { | |
return d3.zip.apply(d3, matrix); | |
}; | |
d3.keys = function(map) { | |
var keys = []; | |
for (var key in map) keys.push(key); | |
return keys; | |
}; | |
d3.values = function(map) { | |
var values = []; | |
for (var key in map) values.push(map[key]); | |
return values; | |
}; | |
d3.entries = function(map) { | |
var entries = []; | |
for (var key in map) entries.push({ | |
key: key, | |
value: map[key] | |
}); | |
return entries; | |
}; | |
d3.merge = function(arrays) { | |
return Array.prototype.concat.apply([], arrays); | |
}; | |
d3.range = function(start, stop, step) { | |
if (arguments.length < 3) { | |
step = 1; | |
if (arguments.length < 2) { | |
stop = start; | |
start = 0; | |
} | |
} | |
if ((stop - start) / step === Infinity) throw new Error("infinite range"); | |
var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j; | |
start *= k, stop *= k, step *= k; | |
if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k); | |
return range; | |
}; | |
function d3_range_integerScale(x) { | |
var k = 1; | |
while (x * k % 1) k *= 10; | |
return k; | |
} | |
function d3_class(ctor, properties) { | |
try { | |
for (var key in properties) { | |
Object.defineProperty(ctor.prototype, key, { | |
value: properties[key], | |
enumerable: false | |
}); | |
} | |
} catch (e) { | |
ctor.prototype = properties; | |
} | |
} | |
d3.map = function(object) { | |
var map = new d3_Map(); | |
for (var key in object) map.set(key, object[key]); | |
return map; | |
}; | |
function d3_Map() {} | |
d3_class(d3_Map, { | |
has: function(key) { | |
return d3_map_prefix + key in this; | |
}, | |
get: function(key) { | |
return this[d3_map_prefix + key]; | |
}, | |
set: function(key, value) { | |
return this[d3_map_prefix + key] = value; | |
}, | |
remove: function(key) { | |
key = d3_map_prefix + key; | |
return key in this && delete this[key]; | |
}, | |
keys: function() { | |
var keys = []; | |
this.forEach(function(key) { | |
keys.push(key); | |
}); | |
return keys; | |
}, | |
values: function() { | |
var values = []; | |
this.forEach(function(key, value) { | |
values.push(value); | |
}); | |
return values; | |
}, | |
entries: function() { | |
var entries = []; | |
this.forEach(function(key, value) { | |
entries.push({ | |
key: key, | |
value: value | |
}); | |
}); | |
return entries; | |
}, | |
forEach: function(f) { | |
for (var key in this) { | |
if (key.charCodeAt(0) === d3_map_prefixCode) { | |
f.call(this, key.substring(1), this[key]); | |
} | |
} | |
} | |
}); | |
var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0); | |
d3.nest = function() { | |
var nest = {}, keys = [], sortKeys = [], sortValues, rollup; | |
function map(mapType, array, depth) { | |
if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array; | |
var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values; | |
while (++i < n) { | |
if (values = valuesByKey.get(keyValue = key(object = array[i]))) { | |
values.push(object); | |
} else { | |
valuesByKey.set(keyValue, [ object ]); | |
} | |
} | |
if (mapType) { | |
object = mapType(); | |
setter = function(keyValue, values) { | |
object.set(keyValue, map(mapType, values, depth)); | |
}; | |
} else { | |
object = {}; | |
setter = function(keyValue, values) { | |
object[keyValue] = map(mapType, values, depth); | |
}; | |
} | |
valuesByKey.forEach(setter); | |
return object; | |
} | |
function entries(map, depth) { | |
if (depth >= keys.length) return map; | |
var array = [], sortKey = sortKeys[depth++]; | |
map.forEach(function(key, keyMap) { | |
array.push({ | |
key: key, | |
values: entries(keyMap, depth) | |
}); | |
}); | |
return sortKey ? array.sort(function(a, b) { | |
return sortKey(a.key, b.key); | |
}) : array; | |
} | |
nest.map = function(array, mapType) { | |
return map(mapType, array, 0); | |
}; | |
nest.entries = function(array) { | |
return entries(map(d3.map, array, 0), 0); | |
}; | |
nest.key = function(d) { | |
keys.push(d); | |
return nest; | |
}; | |
nest.sortKeys = function(order) { | |
sortKeys[keys.length - 1] = order; | |
return nest; | |
}; | |
nest.sortValues = function(order) { | |
sortValues = order; | |
return nest; | |
}; | |
nest.rollup = function(f) { | |
rollup = f; | |
return nest; | |
}; | |
return nest; | |
}; | |
d3.set = function(array) { | |
var set = new d3_Set(); | |
if (array) for (var i = 0; i < array.length; i++) set.add(array[i]); | |
return set; | |
}; | |
function d3_Set() {} | |
d3_class(d3_Set, { | |
has: function(value) { | |
return d3_map_prefix + value in this; | |
}, | |
add: function(value) { | |
this[d3_map_prefix + value] = true; | |
return value; | |
}, | |
remove: function(value) { | |
value = d3_map_prefix + value; | |
return value in this && delete this[value]; | |
}, | |
values: function() { | |
var values = []; | |
this.forEach(function(value) { | |
values.push(value); | |
}); | |
return values; | |
}, | |
forEach: function(f) { | |
for (var value in this) { | |
if (value.charCodeAt(0) === d3_map_prefixCode) { | |
f.call(this, value.substring(1)); | |
} | |
} | |
} | |
}); | |
d3.behavior = {}; | |
d3.rebind = function(target, source) { | |
var i = 1, n = arguments.length, method; | |
while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]); | |
return target; | |
}; | |
function d3_rebind(target, source, method) { | |
return function() { | |
var value = method.apply(source, arguments); | |
return value === source ? target : value; | |
}; | |
} | |
function d3_vendorSymbol(object, name) { | |
if (name in object) return name; | |
name = name.charAt(0).toUpperCase() + name.substring(1); | |
for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) { | |
var prefixName = d3_vendorPrefixes[i] + name; | |
if (prefixName in object) return prefixName; | |
} | |
} | |
var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ]; | |
var d3_array = d3_arraySlice; | |
function d3_arrayCopy(pseudoarray) { | |
var i = -1, n = pseudoarray.length, array = []; | |
while (++i < n) array.push(pseudoarray[i]); | |
return array; | |
} | |
function d3_arraySlice(pseudoarray) { | |
return Array.prototype.slice.call(pseudoarray); | |
} | |
try { | |
d3_array(d3_documentElement.childNodes)[0].nodeType; | |
} catch (e) { | |
d3_array = d3_arrayCopy; | |
} | |
function d3_noop() {} | |
d3.dispatch = function() { | |
var dispatch = new d3_dispatch(), i = -1, n = arguments.length; | |
while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); | |
return dispatch; | |
}; | |
function d3_dispatch() {} | |
d3_dispatch.prototype.on = function(type, listener) { | |
var i = type.indexOf("."), name = ""; | |
if (i >= 0) { | |
name = type.substring(i + 1); | |
type = type.substring(0, i); | |
} | |
if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener); | |
if (arguments.length === 2) { | |
if (listener == null) for (type in this) { | |
if (this.hasOwnProperty(type)) this[type].on(name, null); | |
} | |
return this; | |
} | |
}; | |
function d3_dispatch_event(dispatch) { | |
var listeners = [], listenerByName = new d3_Map(); | |
function event() { | |
var z = listeners, i = -1, n = z.length, l; | |
while (++i < n) if (l = z[i].on) l.apply(this, arguments); | |
return dispatch; | |
} | |
event.on = function(name, listener) { | |
var l = listenerByName.get(name), i; | |
if (arguments.length < 2) return l && l.on; | |
if (l) { | |
l.on = null; | |
listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1)); | |
listenerByName.remove(name); | |
} | |
if (listener) listeners.push(listenerByName.set(name, { | |
on: listener | |
})); | |
return dispatch; | |
}; | |
return event; | |
} | |
d3.event = null; | |
function d3_eventPreventDefault() { | |
d3.event.preventDefault(); | |
} | |
function d3_eventSource() { | |
var e = d3.event, s; | |
while (s = e.sourceEvent) e = s; | |
return e; | |
} | |
function d3_eventDispatch(target) { | |
var dispatch = new d3_dispatch(), i = 0, n = arguments.length; | |
while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch); | |
dispatch.of = function(thiz, argumentz) { | |
return function(e1) { | |
try { | |
var e0 = e1.sourceEvent = d3.event; | |
e1.target = target; | |
d3.event = e1; | |
dispatch[e1.type].apply(thiz, argumentz); | |
} finally { | |
d3.event = e0; | |
} | |
}; | |
}; | |
return dispatch; | |
} | |
d3.requote = function(s) { | |
return s.replace(d3_requote_re, "\\$&"); | |
}; | |
var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; | |
var d3_subclass = {}.__proto__ ? function(object, prototype) { | |
object.__proto__ = prototype; | |
} : function(object, prototype) { | |
for (var property in prototype) object[property] = prototype[property]; | |
}; | |
function d3_selection(groups) { | |
d3_subclass(groups, d3_selectionPrototype); | |
return groups; | |
} | |
var d3_select = function(s, n) { | |
return n.querySelector(s); | |
}, d3_selectAll = function(s, n) { | |
return n.querySelectorAll(s); | |
}, d3_selectMatcher = d3_documentElement[d3_vendorSymbol(d3_documentElement, "matchesSelector")], d3_selectMatches = function(n, s) { | |
return d3_selectMatcher.call(n, s); | |
}; | |
if (typeof Sizzle === "function") { | |
d3_select = function(s, n) { | |
return Sizzle(s, n)[0] || null; | |
}; | |
d3_selectAll = function(s, n) { | |
return Sizzle.uniqueSort(Sizzle(s, n)); | |
}; | |
d3_selectMatches = Sizzle.matchesSelector; | |
} | |
d3.selection = function() { | |
return d3_selectionRoot; | |
}; | |
var d3_selectionPrototype = d3.selection.prototype = []; | |
d3_selectionPrototype.select = function(selector) { | |
var subgroups = [], subgroup, subnode, group, node; | |
selector = d3_selection_selector(selector); | |
for (var j = -1, m = this.length; ++j < m; ) { | |
subgroups.push(subgroup = []); | |
subgroup.parentNode = (group = this[j]).parentNode; | |
for (var i = -1, n = group.length; ++i < n; ) { | |
if (node = group[i]) { | |
subgroup.push(subnode = selector.call(node, node.__data__, i, j)); | |
if (subnode && "__data__" in node) subnode.__data__ = node.__data__; | |
} else { | |
subgroup.push(null); | |
} | |
} | |
} | |
return d3_selection(subgroups); | |
}; | |
function d3_selection_selector(selector) { | |
return typeof selector === "function" ? selector : function() { | |
return d3_select(selector, this); | |
}; | |
} | |
d3_selectionPrototype.selectAll = function(selector) { | |
var subgroups = [], subgroup, node; | |
selector = d3_selection_selectorAll(selector); | |
for (var j = -1, m = this.length; ++j < m; ) { | |
for (var group = this[j], i = -1, n = group.length; ++i < n; ) { | |
if (node = group[i]) { | |
subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j))); | |
subgroup.parentNode = node; | |
} | |
} | |
} | |
return d3_selection(subgroups); | |
}; | |
function d3_selection_selectorAll(selector) { | |
return typeof selector === "function" ? selector : function() { | |
return d3_selectAll(selector, this); | |
}; | |
} | |
var d3_nsPrefix = { | |
svg: "http://www.w3.org/2000/svg", | |
xhtml: "http://www.w3.org/1999/xhtml", | |
xlink: "http://www.w3.org/1999/xlink", | |
xml: "http://www.w3.org/XML/1998/namespace", | |
xmlns: "http://www.w3.org/2000/xmlns/" | |
}; | |
d3.ns = { | |
prefix: d3_nsPrefix, | |
qualify: function(name) { | |
var i = name.indexOf(":"), prefix = name; | |
if (i >= 0) { | |
prefix = name.substring(0, i); | |
name = name.substring(i + 1); | |
} | |
return d3_nsPrefix.hasOwnProperty(prefix) ? { | |
space: d3_nsPrefix[prefix], | |
local: name | |
} : name; | |
} | |
}; | |
d3_selectionPrototype.attr = function(name, value) { | |
if (arguments.length < 2) { | |
if (typeof name === "string") { | |
var node = this.node(); | |
name = d3.ns.qualify(name); | |
return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name); | |
} | |
for (value in name) this.each(d3_selection_attr(value, name[value])); | |
return this; | |
} | |
return this.each(d3_selection_attr(name, value)); | |
}; | |
function d3_selection_attr(name, value) { | |
name = d3.ns.qualify(name); | |
function attrNull() { | |
this.removeAttribute(name); | |
} | |
function attrNullNS() { | |
this.removeAttributeNS(name.space, name.local); | |
} | |
function attrConstant() { | |
this.setAttribute(name, value); | |
} | |
function attrConstantNS() { | |
this.setAttributeNS(name.space, name.local, value); | |
} | |
function attrFunction() { | |
var x = value.apply(this, arguments); | |
if (x == null) this.removeAttribute(name); else this.setAttribute(name, x); | |
} | |
function attrFunctionNS() { | |
var x = value.apply(this, arguments); | |
if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x); | |
} | |
return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant; | |
} | |
function d3_collapse(s) { | |
return s.trim().replace(/\s+/g, " "); | |
} | |
d3_selectionPrototype.classed = function(name, value) { | |
if (arguments.length < 2) { | |
if (typeof name === "string") { | |
var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1; | |
if (value = node.classList) { | |
while (++i < n) if (!value.contains(name[i])) return false; | |
} else { | |
value = node.getAttribute("class"); | |
while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false; | |
} | |
return true; | |
} | |
for (value in name) this.each(d3_selection_classed(value, name[value])); | |
return this; | |
} | |
return this.each(d3_selection_classed(name, value)); | |
}; | |
function d3_selection_classedRe(name) { | |
return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g"); | |
} | |
function d3_selection_classed(name, value) { | |
name = name.trim().split(/\s+/).map(d3_selection_classedName); | |
var n = name.length; | |
function classedConstant() { | |
var i = -1; | |
while (++i < n) name[i](this, value); | |
} | |
function classedFunction() { | |
var i = -1, x = value.apply(this, arguments); | |
while (++i < n) name[i](this, x); | |
} | |
return typeof value === "function" ? classedFunction : classedConstant; | |
} | |
function d3_selection_classedName(name) { | |
var re = d3_selection_classedRe(name); | |
return function(node, value) { | |
if (c = node.classList) return value ? c.add(name) : c.remove(name); | |
var c = node.getAttribute("class") || ""; | |
if (value) { | |
re.lastIndex = 0; | |
if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name)); | |
} else { | |
node.setAttribute("class", d3_collapse(c.replace(re, " "))); | |
} | |
}; | |
} | |
d3_selectionPrototype.style = function(name, value, priority) { | |
var n = arguments.length; | |
if (n < 3) { | |
if (typeof name !== "string") { | |
if (n < 2) value = ""; | |
for (priority in name) this.each(d3_selection_style(priority, name[priority], value)); | |
return this; | |
} | |
if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name); | |
priority = ""; | |
} | |
return this.each(d3_selection_style(name, value, priority)); | |
}; | |
function d3_selection_style(name, value, priority) { | |
function styleNull() { | |
this.style.removeProperty(name); | |
} | |
function styleConstant() { | |
this.style.setProperty(name, value, priority); | |
} | |
function styleFunction() { | |
var x = value.apply(this, arguments); | |
if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority); | |
} | |
return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant; | |
} | |
d3_selectionPrototype.property = function(name, value) { | |
if (arguments.length < 2) { | |
if (typeof name === "string") return this.node()[name]; | |
for (value in name) this.each(d3_selection_property(value, name[value])); | |
return this; | |
} | |
return this.each(d3_selection_property(name, value)); | |
}; | |
function d3_selection_property(name, value) { | |
function propertyNull() { | |
delete this[name]; | |
} | |
function propertyConstant() { | |
this[name] = value; | |
} | |
function propertyFunction() { | |
var x = value.apply(this, arguments); | |
if (x == null) delete this[name]; else this[name] = x; | |
} | |
return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant; | |
} | |
d3_selectionPrototype.text = function(value) { | |
return arguments.length ? this.each(typeof value === "function" ? function() { | |
var v = value.apply(this, arguments); | |
this.textContent = v == null ? "" : v; | |
} : value == null ? function() { | |
this.textContent = ""; | |
} : function() { | |
this.textContent = value; | |
}) : this.node().textContent; | |
}; | |
d3_selectionPrototype.html = function(value) { | |
return arguments.length ? this.each(typeof value === "function" ? function() { | |
var v = value.apply(this, arguments); | |
this.innerHTML = v == null ? "" : v; | |
} : value == null ? function() { | |
this.innerHTML = ""; | |
} : function() { | |
this.innerHTML = value; | |
}) : this.node().innerHTML; | |
}; | |
d3_selectionPrototype.append = function(name) { | |
name = d3_selection_creator(name); | |
return this.select(function() { | |
return this.appendChild(name.apply(this, arguments)); | |
}); | |
}; | |
function d3_selection_creator(name) { | |
return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? function() { | |
return d3_document.createElementNS(name.space, name.local); | |
} : function() { | |
return d3_document.createElementNS(this.namespaceURI, name); | |
}; | |
} | |
d3_selectionPrototype.insert = function(name, before) { | |
name = d3_selection_creator(name); | |
before = d3_selection_selector(before); | |
return this.select(function() { | |
return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments)); | |
}); | |
}; | |
d3_selectionPrototype.remove = function() { | |
return this.each(function() { | |
var parent = this.parentNode; | |
if (parent) parent.removeChild(this); | |
}); | |
}; | |
d3_selectionPrototype.data = function(value, key) { | |
var i = -1, n = this.length, group, node; | |
if (!arguments.length) { | |
value = new Array(n = (group = this[0]).length); | |
while (++i < n) { | |
if (node = group[i]) { | |
value[i] = node.__data__; | |
} | |
} | |
return value; | |
} | |
function bind(group, groupData) { | |
var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData; | |
if (key) { | |
var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue; | |
for (i = -1; ++i < n; ) { | |
keyValue = key.call(node = group[i], node.__data__, i); | |
if (nodeByKeyValue.has(keyValue)) { | |
exitNodes[i] = node; | |
} else { | |
nodeByKeyValue.set(keyValue, node); | |
} | |
keyValues.push(keyValue); | |
} | |
for (i = -1; ++i < m; ) { | |
keyValue = key.call(groupData, nodeData = groupData[i], i); | |
if (node = nodeByKeyValue.get(keyValue)) { | |
updateNodes[i] = node; | |
node.__data__ = nodeData; | |
} else if (!dataByKeyValue.has(keyValue)) { | |
enterNodes[i] = d3_selection_dataNode(nodeData); | |
} | |
dataByKeyValue.set(keyValue, nodeData); | |
nodeByKeyValue.remove(keyValue); | |
} | |
for (i = -1; ++i < n; ) { | |
if (nodeByKeyValue.has(keyValues[i])) { | |
exitNodes[i] = group[i]; | |
} | |
} | |
} else { | |
for (i = -1; ++i < n0; ) { | |
node = group[i]; | |
nodeData = groupData[i]; | |
if (node) { | |
node.__data__ = nodeData; | |
updateNodes[i] = node; | |
} else { | |
enterNodes[i] = d3_selection_dataNode(nodeData); | |
} | |
} | |
for (;i < m; ++i) { | |
enterNodes[i] = d3_selection_dataNode(groupData[i]); | |
} | |
for (;i < n; ++i) { | |
exitNodes[i] = group[i]; | |
} | |
} | |
enterNodes.update = updateNodes; | |
enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode; | |
enter.push(enterNodes); | |
update.push(updateNodes); | |
exit.push(exitNodes); | |
} | |
var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]); | |
if (typeof value === "function") { | |
while (++i < n) { | |
bind(group = this[i], value.call(group, group.parentNode.__data__, i)); | |
} | |
} else { | |
while (++i < n) { | |
bind(group = this[i], value); | |
} | |
} | |
update.enter = function() { | |
return enter; | |
}; | |
update.exit = function() { | |
return exit; | |
}; | |
return update; | |
}; | |
function d3_selection_dataNode(data) { | |
return { | |
__data__: data | |
}; | |
} | |
d3_selectionPrototype.datum = function(value) { | |
return arguments.length ? this.property("__data__", value) : this.property("__data__"); | |
}; | |
d3_selectionPrototype.filter = function(filter) { | |
var subgroups = [], subgroup, group, node; | |
if (typeof filter !== "function") filter = d3_selection_filter(filter); | |
for (var j = 0, m = this.length; j < m; j++) { | |
subgroups.push(subgroup = []); | |
subgroup.parentNode = (group = this[j]).parentNode; | |
for (var i = 0, n = group.length; i < n; i++) { | |
if ((node = group[i]) && filter.call(node, node.__data__, i)) { | |
subgroup.push(node); | |
} | |
} | |
} | |
return d3_selection(subgroups); | |
}; | |
function d3_selection_filter(selector) { | |
return function() { | |
return d3_selectMatches(this, selector); | |
}; | |
} | |
d3_selectionPrototype.order = function() { | |
for (var j = -1, m = this.length; ++j < m; ) { | |
for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) { | |
if (node = group[i]) { | |
if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next); | |
next = node; | |
} | |
} | |
} | |
return this; | |
}; | |
d3_selectionPrototype.sort = function(comparator) { | |
comparator = d3_selection_sortComparator.apply(this, arguments); | |
for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator); | |
return this.order(); | |
}; | |
function d3_selection_sortComparator(comparator) { | |
if (!arguments.length) comparator = d3.ascending; | |
return function(a, b) { | |
return !a - !b || comparator(a.__data__, b.__data__); | |
}; | |
} | |
d3_selectionPrototype.each = function(callback) { | |
return d3_selection_each(this, function(node, i, j) { | |
callback.call(node, node.__data__, i, j); | |
}); | |
}; | |
function d3_selection_each(groups, callback) { | |
for (var j = 0, m = groups.length; j < m; j++) { | |
for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) { | |
if (node = group[i]) callback(node, i, j); | |
} | |
} | |
return groups; | |
} | |
d3_selectionPrototype.call = function(callback) { | |
var args = d3_array(arguments); | |
callback.apply(args[0] = this, args); | |
return this; | |
}; | |
d3_selectionPrototype.empty = function() { | |
return !this.node(); | |
}; | |
d3_selectionPrototype.node = function() { | |
for (var j = 0, m = this.length; j < m; j++) { | |
for (var group = this[j], i = 0, n = group.length; i < n; i++) { | |
var node = group[i]; | |
if (node) return node; | |
} | |
} | |
return null; | |
}; | |
d3_selectionPrototype.size = function() { | |
var n = 0; | |
this.each(function() { | |
++n; | |
}); | |
return n; | |
}; | |
function d3_selection_enter(selection) { | |
d3_subclass(selection, d3_selection_enterPrototype); | |
return selection; | |
} | |
var d3_selection_enterPrototype = []; | |
d3.selection.enter = d3_selection_enter; | |
d3.selection.enter.prototype = d3_selection_enterPrototype; | |
d3_selection_enterPrototype.append = d3_selectionPrototype.append; | |
d3_selection_enterPrototype.empty = d3_selectionPrototype.empty; | |
d3_selection_enterPrototype.node = d3_selectionPrototype.node; | |
d3_selection_enterPrototype.call = d3_selectionPrototype.call; | |
d3_selection_enterPrototype.size = d3_selectionPrototype.size; | |
d3_selection_enterPrototype.select = function(selector) { | |
var subgroups = [], subgroup, subnode, upgroup, group, node; | |
for (var j = -1, m = this.length; ++j < m; ) { | |
upgroup = (group = this[j]).update; | |
subgroups.push(subgroup = []); | |
subgroup.parentNode = group.parentNode; | |
for (var i = -1, n = group.length; ++i < n; ) { | |
if (node = group[i]) { | |
subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j)); | |
subnode.__data__ = node.__data__; | |
} else { | |
subgroup.push(null); | |
} | |
} | |
} | |
return d3_selection(subgroups); | |
}; | |
d3_selection_enterPrototype.insert = function(name, before) { | |
if (arguments.length < 2) before = d3_selection_enterInsertBefore(this); | |
return d3_selectionPrototype.insert.call(this, name, before); | |
}; | |
function d3_selection_enterInsertBefore(enter) { | |
var i0, j0; | |
return function(d, i, j) { | |
var group = enter[j].update, n = group.length, node; | |
if (j != j0) j0 = j, i0 = 0; | |
if (i >= i0) i0 = i + 1; | |
while (!(node = group[i0]) && ++i0 < n) ; | |
return node; | |
}; | |
} | |
d3_selectionPrototype.transition = function() { | |
var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = d3_transitionInherit || { | |
time: Date.now(), | |
ease: d3_ease_cubicInOut, | |
delay: 0, | |
duration: 250 | |
}; | |
for (var j = -1, m = this.length; ++j < m; ) { | |
subgroups.push(subgroup = []); | |
for (var group = this[j], i = -1, n = group.length; ++i < n; ) { | |
if (node = group[i]) d3_transitionNode(node, i, id, transition); | |
subgroup.push(node); | |
} | |
} | |
return d3_transition(subgroups, id); | |
}; | |
d3.select = function(node) { | |
var group = [ typeof node === "string" ? d3_select(node, d3_document) : node ]; | |
group.parentNode = d3_documentElement; | |
return d3_selection([ group ]); | |
}; | |
d3.selectAll = function(nodes) { | |
var group = d3_array(typeof nodes === "string" ? d3_selectAll(nodes, d3_document) : nodes); | |
group.parentNode = d3_documentElement; | |
return d3_selection([ group ]); | |
}; | |
var d3_selectionRoot = d3.select(d3_documentElement); | |
d3_selectionPrototype.on = function(type, listener, capture) { | |
var n = arguments.length; | |
if (n < 3) { | |
if (typeof type !== "string") { | |
if (n < 2) listener = false; | |
for (capture in type) this.each(d3_selection_on(capture, type[capture], listener)); | |
return this; | |
} | |
if (n < 2) return (n = this.node()["__on" + type]) && n._; | |
capture = false; | |
} | |
return this.each(d3_selection_on(type, listener, capture)); | |
}; | |
function d3_selection_on(type, listener, capture) { | |
var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener; | |
if (i > 0) type = type.substring(0, i); | |
var filter = d3_selection_onFilters.get(type); | |
if (filter) type = filter, wrap = d3_selection_onFilter; | |
function onRemove() { | |
var l = this[name]; | |
if (l) { | |
this.removeEventListener(type, l, l.$); | |
delete this[name]; | |
} | |
} | |
function onAdd() { | |
var l = wrap(listener, d3_array(arguments)); | |
onRemove.call(this); | |
this.addEventListener(type, this[name] = l, l.$ = capture); | |
l._ = listener; | |
} | |
function removeAll() { | |
var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match; | |
for (var name in this) { | |
if (match = name.match(re)) { | |
var l = this[name]; | |
this.removeEventListener(match[1], l, l.$); | |
delete this[name]; | |
} | |
} | |
} | |
return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll; | |
} | |
var d3_selection_onFilters = d3.map({ | |
mouseenter: "mouseover", | |
mouseleave: "mouseout" | |
}); | |
d3_selection_onFilters.forEach(function(k) { | |
if ("on" + k in d3_document) d3_selection_onFilters.remove(k); | |
}); | |
function d3_selection_onListener(listener, argumentz) { | |
return function(e) { | |
var o = d3.event; | |
d3.event = e; | |
argumentz[0] = this.__data__; | |
try { | |
listener.apply(this, argumentz); | |
} finally { | |
d3.event = o; | |
} | |
}; | |
} | |
function d3_selection_onFilter(listener, argumentz) { | |
var l = d3_selection_onListener(listener, argumentz); | |
return function(e) { | |
var target = this, related = e.relatedTarget; | |
if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) { | |
l.call(target, e); | |
} | |
}; | |
} | |
var d3_event_dragSelect = d3_vendorSymbol(d3_documentElement.style, "userSelect"), d3_event_dragId = 0; | |
function d3_event_dragSuppress() { | |
var name = ".dragsuppress-" + ++d3_event_dragId, touchmove = "touchmove" + name, selectstart = "selectstart" + name, dragstart = "dragstart" + name, click = "click" + name, w = d3.select(d3_window).on(touchmove, d3_eventPreventDefault).on(selectstart, d3_eventPreventDefault).on(dragstart, d3_eventPreventDefault), style = d3_documentElement.style, select = style[d3_event_dragSelect]; | |
style[d3_event_dragSelect] = "none"; | |
return function(suppressClick) { | |
w.on(name, null); | |
style[d3_event_dragSelect] = select; | |
if (suppressClick) { | |
function off() { | |
w.on(click, null); | |
} | |
w.on(click, function() { | |
d3_eventPreventDefault(); | |
off(); | |
}, true); | |
setTimeout(off, 0); | |
} | |
}; | |
} | |
d3.mouse = function(container) { | |
return d3_mousePoint(container, d3_eventSource()); | |
}; | |
var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0; | |
function d3_mousePoint(container, e) { | |
var svg = container.ownerSVGElement || container; | |
if (svg.createSVGPoint) { | |
var point = svg.createSVGPoint(); | |
if (d3_mouse_bug44083 < 0 && (d3_window.scrollX || d3_window.scrollY)) { | |
svg = d3.select("body").append("svg").style({ | |
position: "absolute", | |
top: 0, | |
left: 0, | |
margin: 0, | |
padding: 0, | |
border: "none" | |
}, "important"); | |
var ctm = svg[0][0].getScreenCTM(); | |
d3_mouse_bug44083 = !(ctm.f || ctm.e); | |
svg.remove(); | |
} | |
if (d3_mouse_bug44083) { | |
point.x = e.pageX; | |
point.y = e.pageY; | |
} else { | |
point.x = e.clientX; | |
point.y = e.clientY; | |
} | |
point = point.matrixTransform(container.getScreenCTM().inverse()); | |
return [ point.x, point.y ]; | |
} | |
var rect = container.getBoundingClientRect(); | |
return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ]; | |
} | |
d3.touches = function(container, touches) { | |
if (arguments.length < 2) touches = d3_eventSource().touches; | |
return touches ? d3_array(touches).map(function(touch) { | |
var point = d3_mousePoint(container, touch); | |
point.identifier = touch.identifier; | |
return point; | |
}) : []; | |
}; | |
d3.behavior.drag = function() { | |
var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, "mousemove", "mouseup"), touchstart = dragstart(touchid, touchposition, "touchmove", "touchend"); | |
function drag() { | |
this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart); | |
} | |
function touchid() { | |
return d3.event.changedTouches[0].identifier; | |
} | |
function touchposition(parent, id) { | |
return d3.touches(parent).filter(function(p) { | |
return p.identifier === id; | |
})[0]; | |
} | |
function dragstart(id, position, move, end) { | |
return function() { | |
var target = this, parent = target.parentNode, event_ = event.of(target, arguments), eventTarget = d3.event.target, eventId = id(), drag = eventId == null ? "drag" : "drag-" + eventId, origin_ = position(parent, eventId), dragged = 0, offset, w = d3.select(d3_window).on(move + "." + drag, moved).on(end + "." + drag, ended), dragRestore = d3_event_dragSuppress(); | |
if (origin) { | |
offset = origin.apply(target, arguments); | |
offset = [ offset.x - origin_[0], offset.y - origin_[1] ]; | |
} else { | |
offset = [ 0, 0 ]; | |
} | |
event_({ | |
type: "dragstart" | |
}); | |
function moved() { | |
if (!parent) return ended(); | |
var p = position(parent, eventId), dx = p[0] - origin_[0], dy = p[1] - origin_[1]; | |
dragged |= dx | dy; | |
origin_ = p; | |
event_({ | |
type: "drag", | |
x: p[0] + offset[0], | |
y: p[1] + offset[1], | |
dx: dx, | |
dy: dy | |
}); | |
} | |
function ended() { | |
w.on(move + "." + drag, null).on(end + "." + drag, null); | |
dragRestore(dragged && d3.event.target === eventTarget); | |
event_({ | |
type: "dragend" | |
}); | |
} | |
}; | |
} | |
drag.origin = function(x) { | |
if (!arguments.length) return origin; | |
origin = x; | |
return drag; | |
}; | |
return d3.rebind(drag, event, "on"); | |
}; | |
d3.behavior.zoom = function() { | |
var translate = [ 0, 0 ], translate0, scale = 1, scaleExtent = d3_behavior_zoomInfinity, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime; | |
function zoom() { | |
this.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on(mousemove, mousewheelreset).on("dblclick.zoom", dblclicked).on("touchstart.zoom", touchstarted); | |
} | |
zoom.translate = function(x) { | |
if (!arguments.length) return translate; | |
translate = x.map(Number); | |
rescale(); | |
return zoom; | |
}; | |
zoom.scale = function(x) { | |
if (!arguments.length) return scale; | |
scale = +x; | |
rescale(); | |
return zoom; | |
}; | |
zoom.scaleExtent = function(x) { | |
if (!arguments.length) return scaleExtent; | |
scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number); | |
return zoom; | |
}; | |
zoom.x = function(z) { | |
if (!arguments.length) return x1; | |
x1 = z; | |
x0 = z.copy(); | |
translate = [ 0, 0 ]; | |
scale = 1; | |
return zoom; | |
}; | |
zoom.y = function(z) { | |
if (!arguments.length) return y1; | |
y1 = z; | |
y0 = z.copy(); | |
translate = [ 0, 0 ]; | |
scale = 1; | |
return zoom; | |
}; | |
function location(p) { | |
return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ]; | |
} | |
function point(l) { | |
return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ]; | |
} | |
function scaleTo(s) { | |
scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s)); | |
} | |
function translateTo(p, l) { | |
l = point(l); | |
translate[0] += p[0] - l[0]; | |
translate[1] += p[1] - l[1]; | |
} | |
function rescale() { | |
if (x1) x1.domain(x0.range().map(function(x) { | |
return (x - translate[0]) / scale; | |
}).map(x0.invert)); | |
if (y1) y1.domain(y0.range().map(function(y) { | |
return (y - translate[1]) / scale; | |
}).map(y0.invert)); | |
} | |
function dispatch(event) { | |
rescale(); | |
event({ | |
type: "zoom", | |
scale: scale, | |
translate: translate | |
}); | |
} | |
function mousedowned() { | |
var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, dragged = 0, w = d3.select(d3_window).on(mousemove, moved).on(mouseup, ended), l = location(d3.mouse(target)), dragRestore = d3_event_dragSuppress(); | |
function moved() { | |
dragged = 1; | |
translateTo(d3.mouse(target), l); | |
dispatch(event_); | |
} | |
function ended() { | |
w.on(mousemove, d3_window === target ? mousewheelreset : null).on(mouseup, null); | |
dragRestore(dragged && d3.event.target === eventTarget); | |
} | |
} | |
function touchstarted() { | |
var target = this, event_ = event.of(target, arguments), touches = d3.touches(target), locations = {}, distance0 = 0, scale0 = scale, now = Date.now(), name = "zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove." + name, touchend = "touchend." + name, w = d3.select(d3_window).on(touchmove, moved).on(touchend, ended), t = d3.select(target).on(mousedown, null), dragRestore = d3_event_dragSuppress(); | |
touches.forEach(function(t) { | |
locations[t.identifier] = location(t); | |
}); | |
if (touches.length === 1) { | |
if (now - touchtime < 500) { | |
var p = touches[0], l = location(touches[0]); | |
scaleTo(scale * 2); | |
translateTo(p, l); | |
d3_eventPreventDefault(); | |
dispatch(event_); | |
} | |
touchtime = now; | |
} else if (touches.length > 1) { | |
var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1]; | |
distance0 = dx * dx + dy * dy; | |
} | |
function moved() { | |
var touches = d3.touches(target), p0 = touches[0], l0 = locations[p0.identifier]; | |
if (p1 = touches[1]) { | |
var p1, l1 = locations[p1.identifier], scale1 = d3.event.scale; | |
if (scale1 == null) { | |
var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1; | |
scale1 = distance0 && Math.sqrt(distance1 / distance0); | |
} | |
p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ]; | |
l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ]; | |
scaleTo(scale1 * scale0); | |
} | |
touchtime = null; | |
translateTo(p0, l0); | |
dispatch(event_); | |
} | |
function ended() { | |
w.on(touchmove, null).on(touchend, null); | |
t.on(mousedown, mousedowned); | |
dragRestore(); | |
} | |
} | |
function mousewheeled() { | |
d3_eventPreventDefault(); | |
if (!translate0) translate0 = location(d3.mouse(this)); | |
scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale); | |
translateTo(d3.mouse(this), translate0); | |
dispatch(event.of(this, arguments)); | |
} | |
function mousewheelreset() { | |
translate0 = null; | |
} | |
function dblclicked() { | |
var p = d3.mouse(this), l = location(p), k = Math.log(scale) / Math.LN2; | |
scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1)); | |
translateTo(p, l); | |
dispatch(event.of(this, arguments)); | |
} | |
return d3.rebind(zoom, event, "on"); | |
}; | |
var d3_behavior_zoomInfinity = [ 0, Infinity ]; | |
var d3_behavior_zoomDelta, d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() { | |
return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1); | |
}, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() { | |
return d3.event.wheelDelta; | |
}, "mousewheel") : (d3_behavior_zoomDelta = function() { | |
return -d3.event.detail; | |
}, "MozMousePixelScroll"); | |
function d3_Color() {} | |
d3_Color.prototype.toString = function() { | |
return this.rgb() + ""; | |
}; | |
d3.hsl = function(h, s, l) { | |
return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l); | |
}; | |
function d3_hsl(h, s, l) { | |
return new d3_Hsl(h, s, l); | |
} | |
function d3_Hsl(h, s, l) { | |
this.h = h; | |
this.s = s; | |
this.l = l; | |
} | |
var d3_hslPrototype = d3_Hsl.prototype = new d3_Color(); | |
d3_hslPrototype.brighter = function(k) { | |
k = Math.pow(.7, arguments.length ? k : 1); | |
return d3_hsl(this.h, this.s, this.l / k); | |
}; | |
d3_hslPrototype.darker = function(k) { | |
k = Math.pow(.7, arguments.length ? k : 1); | |
return d3_hsl(this.h, this.s, k * this.l); | |
}; | |
d3_hslPrototype.rgb = function() { | |
return d3_hsl_rgb(this.h, this.s, this.l); | |
}; | |
function d3_hsl_rgb(h, s, l) { | |
var m1, m2; | |
h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h; | |
s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s; | |
l = l < 0 ? 0 : l > 1 ? 1 : l; | |
m2 = l <= .5 ? l * (1 + s) : l + s - l * s; | |
m1 = 2 * l - m2; | |
function v(h) { | |
if (h > 360) h -= 360; else if (h < 0) h += 360; | |
if (h < 60) return m1 + (m2 - m1) * h / 60; | |
if (h < 180) return m2; | |
if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; | |
return m1; | |
} | |
function vv(h) { | |
return Math.round(v(h) * 255); | |
} | |
return d3_rgb(vv(h + 120), vv(h), vv(h - 120)); | |
} | |
var π = Math.PI, ε = 1e-6, ε2 = ε * ε, d3_radians = π / 180, d3_degrees = 180 / π; | |
function d3_sgn(x) { | |
return x > 0 ? 1 : x < 0 ? -1 : 0; | |
} | |
function d3_acos(x) { | |
return x > 1 ? 0 : x < -1 ? π : Math.acos(x); | |
} | |
function d3_asin(x) { | |
return x > 1 ? π / 2 : x < -1 ? -π / 2 : Math.asin(x); | |
} | |
function d3_sinh(x) { | |
return (Math.exp(x) - Math.exp(-x)) / 2; | |
} | |
function d3_cosh(x) { | |
return (Math.exp(x) + Math.exp(-x)) / 2; | |
} | |
function d3_haversin(x) { | |
return (x = Math.sin(x / 2)) * x; | |
} | |
d3.hcl = function(h, c, l) { | |
return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l); | |
}; | |
function d3_hcl(h, c, l) { | |
return new d3_Hcl(h, c, l); | |
} | |
function d3_Hcl(h, c, l) { | |
this.h = h; | |
this.c = c; | |
this.l = l; | |
} | |
var d3_hclPrototype = d3_Hcl.prototype = new d3_Color(); | |
d3_hclPrototype.brighter = function(k) { | |
return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1))); | |
}; | |
d3_hclPrototype.darker = function(k) { | |
return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1))); | |
}; | |
d3_hclPrototype.rgb = function() { | |
return d3_hcl_lab(this.h, this.c, this.l).rgb(); | |
}; | |
function d3_hcl_lab(h, c, l) { | |
if (isNaN(h)) h = 0; | |
if (isNaN(c)) c = 0; | |
return d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c); | |
} | |
d3.lab = function(l, a, b) { | |
return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b); | |
}; | |
function d3_lab(l, a, b) { | |
return new d3_Lab(l, a, b); | |
} | |
function d3_Lab(l, a, b) { | |
this.l = l; | |
this.a = a; | |
this.b = b; | |
} | |
var d3_lab_K = 18; | |
var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883; | |
var d3_labPrototype = d3_Lab.prototype = new d3_Color(); | |
d3_labPrototype.brighter = function(k) { | |
return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); | |
}; | |
d3_labPrototype.darker = function(k) { | |
return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b); | |
}; | |
d3_labPrototype.rgb = function() { | |
return d3_lab_rgb(this.l, this.a, this.b); | |
}; | |
function d3_lab_rgb(l, a, b) { | |
var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200; | |
x = d3_lab_xyz(x) * d3_lab_X; | |
y = d3_lab_xyz(y) * d3_lab_Y; | |
z = d3_lab_xyz(z) * d3_lab_Z; | |
return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z)); | |
} | |
function d3_lab_hcl(l, a, b) { | |
return l > 0 ? d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : d3_hcl(NaN, NaN, l); | |
} | |
function d3_lab_xyz(x) { | |
return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037; | |
} | |
function d3_xyz_lab(x) { | |
return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29; | |
} | |
function d3_xyz_rgb(r) { | |
return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055)); | |
} | |
d3.rgb = function(r, g, b) { | |
return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b); | |
}; | |
function d3_rgbNumber(value) { | |
return d3_rgb(value >> 16, value >> 8 & 255, value & 255); | |
} | |
function d3_rgbString(value) { | |
return d3_rgbNumber(value) + ""; | |
} | |
function d3_rgb(r, g, b) { | |
return new d3_Rgb(r, g, b); | |
} | |
function d3_Rgb(r, g, b) { | |
this.r = r; | |
this.g = g; | |
this.b = b; | |
} | |
var d3_rgbPrototype = d3_Rgb.prototype = new d3_Color(); | |
d3_rgbPrototype.brighter = function(k) { | |
k = Math.pow(.7, arguments.length ? k : 1); | |
var r = this.r, g = this.g, b = this.b, i = 30; | |
if (!r && !g && !b) return d3_rgb(i, i, i); | |
if (r && r < i) r = i; | |
if (g && g < i) g = i; | |
if (b && b < i) b = i; | |
return d3_rgb(Math.min(255, ~~(r / k)), Math.min(255, ~~(g / k)), Math.min(255, ~~(b / k))); | |
}; | |
d3_rgbPrototype.darker = function(k) { | |
k = Math.pow(.7, arguments.length ? k : 1); | |
return d3_rgb(~~(k * this.r), ~~(k * this.g), ~~(k * this.b)); | |
}; | |
d3_rgbPrototype.hsl = function() { | |
return d3_rgb_hsl(this.r, this.g, this.b); | |
}; | |
d3_rgbPrototype.toString = function() { | |
return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b); | |
}; | |
function d3_rgb_hex(v) { | |
return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16); | |
} | |
function d3_rgb_parse(format, rgb, hsl) { | |
var r = 0, g = 0, b = 0, m1, m2, name; | |
m1 = /([a-z]+)\((.*)\)/i.exec(format); | |
if (m1) { | |
m2 = m1[2].split(","); | |
switch (m1[1]) { | |
case "hsl": | |
{ | |
return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100); | |
} | |
case "rgb": | |
{ | |
return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2])); | |
} | |
} | |
} | |
if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b); | |
if (format != null && format.charAt(0) === "#") { | |
if (format.length === 4) { | |
r = format.charAt(1); | |
r += r; | |
g = format.charAt(2); | |
g += g; | |
b = format.charAt(3); | |
b += b; | |
} else if (format.length === 7) { | |
r = format.substring(1, 3); | |
g = format.substring(3, 5); | |
b = format.substring(5, 7); | |
} | |
r = parseInt(r, 16); | |
g = parseInt(g, 16); | |
b = parseInt(b, 16); | |
} | |
return rgb(r, g, b); | |
} | |
function d3_rgb_hsl(r, g, b) { | |
var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2; | |
if (d) { | |
s = l < .5 ? d / (max + min) : d / (2 - max - min); | |
if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4; | |
h *= 60; | |
} else { | |
h = NaN; | |
s = l > 0 && l < 1 ? 0 : h; | |
} | |
return d3_hsl(h, s, l); | |
} | |
function d3_rgb_lab(r, g, b) { | |
r = d3_rgb_xyz(r); | |
g = d3_rgb_xyz(g); | |
b = d3_rgb_xyz(b); | |
var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z); | |
return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z)); | |
} | |
function d3_rgb_xyz(r) { | |
return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4); | |
} | |
function d3_rgb_parseNumber(c) { | |
var f = parseFloat(c); | |
return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f; | |
} | |
var d3_rgb_names = d3.map({ | |
aliceblue: 15792383, | |
antiquewhite: 16444375, | |
aqua: 65535, | |
aquamarine: 8388564, | |
azure: 15794175, | |
beige: 16119260, | |
bisque: 16770244, | |
black: 0, | |
blanchedalmond: 16772045, | |
blue: 255, | |
blueviolet: 9055202, | |
brown: 10824234, | |
burlywood: 14596231, | |
cadetblue: 6266528, | |
chartreuse: 8388352, | |
chocolate: 13789470, | |
coral: 16744272, | |
cornflowerblue: 6591981, | |
cornsilk: 16775388, | |
crimson: 14423100, | |
cyan: 65535, | |
darkblue: 139, | |
darkcyan: 35723, | |
darkgoldenrod: 12092939, | |
darkgray: 11119017, | |
darkgreen: 25600, | |
darkgrey: 11119017, | |
darkkhaki: 12433259, | |
darkmagenta: 9109643, | |
darkolivegreen: 5597999, | |
darkorange: 16747520, | |
darkorchid: 10040012, | |
darkred: 9109504, | |
darksalmon: 15308410, | |
darkseagreen: 9419919, | |
darkslateblue: 4734347, | |
darkslategray: 3100495, | |
darkslategrey: 3100495, | |
darkturquoise: 52945, | |
darkviolet: 9699539, | |
deeppink: 16716947, | |
deepskyblue: 49151, | |
dimgray: 6908265, | |
dimgrey: 6908265, | |
dodgerblue: 2003199, | |
firebrick: 11674146, | |
floralwhite: 16775920, | |
forestgreen: 2263842, | |
fuchsia: 16711935, | |
gainsboro: 14474460, | |
ghostwhite: 16316671, | |
gold: 16766720, | |
goldenrod: 14329120, | |
gray: 8421504, | |
green: 32768, | |
greenyellow: 11403055, | |
grey: 8421504, | |
honeydew: 15794160, | |
hotpink: 16738740, | |
indianred: 13458524, | |
indigo: 4915330, | |
ivory: 16777200, | |
khaki: 15787660, | |
lavender: 15132410, | |
lavenderblush: 16773365, | |
lawngreen: 8190976, | |
lemonchiffon: 16775885, | |
lightblue: 11393254, | |
lightcoral: 15761536, | |
lightcyan: 14745599, | |
lightgoldenrodyellow: 16448210, | |
lightgray: 13882323, | |
lightgreen: 9498256, | |
lightgrey: 13882323, | |
lightpink: 16758465, | |
lightsalmon: 16752762, | |
lightseagreen: 2142890, | |
lightskyblue: 8900346, | |
lightslategray: 7833753, | |
lightslategrey: 7833753, | |
lightsteelblue: 11584734, | |
lightyellow: 16777184, | |
lime: 65280, | |
limegreen: 3329330, | |
linen: 16445670, | |
magenta: 16711935, | |
maroon: 8388608, | |
mediumaquamarine: 6737322, | |
mediumblue: 205, | |
mediumorchid: 12211667, | |
mediumpurple: 9662683, | |
mediumseagreen: 3978097, | |
mediumslateblue: 8087790, | |
mediumspringgreen: 64154, | |
mediumturquoise: 4772300, | |
mediumvioletred: 13047173, | |
midnightblue: 1644912, | |
mintcream: 16121850, | |
mistyrose: 16770273, | |
moccasin: 16770229, | |
navajowhite: 16768685, | |
navy: 128, | |
oldlace: 16643558, | |
olive: 8421376, | |
olivedrab: 7048739, | |
orange: 16753920, | |
orangered: 16729344, | |
orchid: 14315734, | |
palegoldenrod: 15657130, | |
palegreen: 10025880, | |
paleturquoise: 11529966, | |
palevioletred: 14381203, | |
papayawhip: 16773077, | |
peachpuff: 16767673, | |
peru: 13468991, | |
pink: 16761035, | |
plum: 14524637, | |
powderblue: 11591910, | |
purple: 8388736, | |
red: 16711680, | |
rosybrown: 12357519, | |
royalblue: 4286945, | |
saddlebrown: 9127187, | |
salmon: 16416882, | |
sandybrown: 16032864, | |
seagreen: 3050327, | |
seashell: 16774638, | |
sienna: 10506797, | |
silver: 12632256, | |
skyblue: 8900331, | |
slateblue: 6970061, | |
slategray: 7372944, | |
slategrey: 7372944, | |
snow: 16775930, | |
springgreen: 65407, | |
steelblue: 4620980, | |
tan: 13808780, | |
teal: 32896, | |
thistle: 14204888, | |
tomato: 16737095, | |
turquoise: 4251856, | |
violet: 15631086, | |
wheat: 16113331, | |
white: 16777215, | |
whitesmoke: 16119285, | |
yellow: 16776960, | |
yellowgreen: 10145074 | |
}); | |
d3_rgb_names.forEach(function(key, value) { | |
d3_rgb_names.set(key, d3_rgbNumber(value)); | |
}); | |
function d3_functor(v) { | |
return typeof v === "function" ? v : function() { | |
return v; | |
}; | |
} | |
d3.functor = d3_functor; | |
function d3_identity(d) { | |
return d; | |
} | |
d3.xhr = d3_xhrType(d3_identity); | |
function d3_xhrType(response) { | |
return function(url, mimeType, callback) { | |
if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, | |
mimeType = null; | |
return d3_xhr(url, mimeType, response, callback); | |
}; | |
} | |
function d3_xhr(url, mimeType, response, callback) { | |
var xhr = {}, dispatch = d3.dispatch("progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null; | |
if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest(); | |
"onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() { | |
request.readyState > 3 && respond(); | |
}; | |
function respond() { | |
var status = request.status, result; | |
if (!status && request.responseText || status >= 200 && status < 300 || status === 304) { | |
try { | |
result = response.call(xhr, request); | |
} catch (e) { | |
dispatch.error.call(xhr, e); | |
return; | |
} | |
dispatch.load.call(xhr, result); | |
} else { | |
dispatch.error.call(xhr, request); | |
} | |
} | |
request.onprogress = function(event) { | |
var o = d3.event; | |
d3.event = event; | |
try { | |
dispatch.progress.call(xhr, request); | |
} finally { | |
d3.event = o; | |
} | |
}; | |
xhr.header = function(name, value) { | |
name = (name + "").toLowerCase(); | |
if (arguments.length < 2) return headers[name]; | |
if (value == null) delete headers[name]; else headers[name] = value + ""; | |
return xhr; | |
}; | |
xhr.mimeType = function(value) { | |
if (!arguments.length) return mimeType; | |
mimeType = value == null ? null : value + ""; | |
return xhr; | |
}; | |
xhr.responseType = function(value) { | |
if (!arguments.length) return responseType; | |
responseType = value; | |
return xhr; | |
}; | |
xhr.response = function(value) { | |
response = value; | |
return xhr; | |
}; | |
[ "get", "post" ].forEach(function(method) { | |
xhr[method] = function() { | |
return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments))); | |
}; | |
}); | |
xhr.send = function(method, data, callback) { | |
if (arguments.length === 2 && typeof data === "function") callback = data, data = null; | |
request.open(method, url, true); | |
if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*"; | |
if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]); | |
if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType); | |
if (responseType != null) request.responseType = responseType; | |
if (callback != null) xhr.on("error", callback).on("load", function(request) { | |
callback(null, request); | |
}); | |
request.send(data == null ? null : data); | |
return xhr; | |
}; | |
xhr.abort = function() { | |
request.abort(); | |
return xhr; | |
}; | |
d3.rebind(xhr, dispatch, "on"); | |
return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback)); | |
} | |
function d3_xhr_fixCallback(callback) { | |
return callback.length === 1 ? function(error, request) { | |
callback(error == null ? request : null); | |
} : callback; | |
} | |
d3.dsv = function(delimiter, mimeType) { | |
var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0); | |
function dsv(url, row, callback) { | |
if (arguments.length < 3) callback = row, row = null; | |
var xhr = d3.xhr(url, mimeType, callback); | |
xhr.row = function(_) { | |
return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row; | |
}; | |
return xhr.row(row); | |
} | |
function response(request) { | |
return dsv.parse(request.responseText); | |
} | |
function typedResponse(f) { | |
return function(request) { | |
return dsv.parse(request.responseText, f); | |
}; | |
} | |
dsv.parse = function(text, f) { | |
var o; | |
return dsv.parseRows(text, function(row, i) { | |
if (o) return o(row, i - 1); | |
var a = new Function("d", "return {" + row.map(function(name, i) { | |
return JSON.stringify(name) + ": d[" + i + "]"; | |
}).join(",") + "}"); | |
o = f ? function(row, i) { | |
return f(a(row), i); | |
} : a; | |
}); | |
}; | |
dsv.parseRows = function(text, f) { | |
var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol; | |
function token() { | |
if (I >= N) return EOF; | |
if (eol) return eol = false, EOL; | |
var j = I; | |
if (text.charCodeAt(j) === 34) { | |
var i = j; | |
while (i++ < N) { | |
if (text.charCodeAt(i) === 34) { | |
if (text.charCodeAt(i + 1) !== 34) break; | |
++i; | |
} | |
} | |
I = i + 2; | |
var c = text.charCodeAt(i + 1); | |
if (c === 13) { | |
eol = true; | |
if (text.charCodeAt(i + 2) === 10) ++I; | |
} else if (c === 10) { | |
eol = true; | |
} | |
return text.substring(j + 1, i).replace(/""/g, '"'); | |
} | |
while (I < N) { | |
var c = text.charCodeAt(I++), k = 1; | |
if (c === 10) eol = true; else if (c === 13) { | |
eol = true; | |
if (text.charCodeAt(I) === 10) ++I, ++k; | |
} else if (c !== delimiterCode) continue; | |
return text.substring(j, I - k); | |
} | |
return text.substring(j); | |
} | |
while ((t = token()) !== EOF) { | |
var a = []; | |
while (t !== EOL && t !== EOF) { | |
a.push(t); | |
t = token(); | |
} | |
if (f && !(a = f(a, n++))) continue; | |
rows.push(a); | |
} | |
return rows; | |
}; | |
dsv.format = function(rows) { | |
if (Array.isArray(rows[0])) return dsv.formatRows(rows); | |
var fieldSet = new d3_Set(), fields = []; | |
rows.forEach(function(row) { | |
for (var field in row) { | |
if (!fieldSet.has(field)) { | |
fields.push(fieldSet.add(field)); | |
} | |
} | |
}); | |
return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) { | |
return fields.map(function(field) { | |
return formatValue(row[field]); | |
}).join(delimiter); | |
})).join("\n"); | |
}; | |
dsv.formatRows = function(rows) { | |
return rows.map(formatRow).join("\n"); | |
}; | |
function formatRow(row) { | |
return row.map(formatValue).join(delimiter); | |
} | |
function formatValue(text) { | |
return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text; | |
} | |
return dsv; | |
}; | |
d3.csv = d3.dsv(",", "text/csv"); | |
d3.tsv = d3.dsv(" ", "text/tab-separated-values"); | |
var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = d3_window[d3_vendorSymbol(d3_window, "requestAnimationFrame")] || function(callback) { | |
setTimeout(callback, 17); | |
}; | |
d3.timer = function(callback, delay, then) { | |
var n = arguments.length; | |
if (n < 2) delay = 0; | |
if (n < 3) then = Date.now(); | |
var time = then + delay, timer = { | |
callback: callback, | |
time: time, | |
next: null | |
}; | |
if (d3_timer_queueTail) d3_timer_queueTail.next = timer; else d3_timer_queueHead = timer; | |
d3_timer_queueTail = timer; | |
if (!d3_timer_interval) { | |
d3_timer_timeout = clearTimeout(d3_timer_timeout); | |
d3_timer_interval = 1; | |
d3_timer_frame(d3_timer_step); | |
} | |
}; | |
function d3_timer_step() { | |
var now = d3_timer_mark(), delay = d3_timer_sweep() - now; | |
if (delay > 24) { | |
if (isFinite(delay)) { | |
clearTimeout(d3_timer_timeout); | |
d3_timer_timeout = setTimeout(d3_timer_step, delay); | |
} | |
d3_timer_interval = 0; | |
} else { | |
d3_timer_interval = 1; | |
d3_timer_frame(d3_timer_step); | |
} | |
} | |
d3.timer.flush = function() { | |
d3_timer_mark(); | |
d3_timer_sweep(); | |
}; | |
function d3_timer_replace(callback, delay, then) { | |
var n = arguments.length; | |
if (n < 2) delay = 0; | |
if (n < 3) then = Date.now(); | |
d3_timer_active.callback = callback; | |
d3_timer_active.time = then + delay; | |
} | |
function d3_timer_mark() { | |
var now = Date.now(); | |
d3_timer_active = d3_timer_queueHead; | |
while (d3_timer_active) { | |
if (now >= d3_timer_active.time) d3_timer_active.flush = d3_timer_active.callback(now - d3_timer_active.time); | |
d3_timer_active = d3_timer_active.next; | |
} | |
return now; | |
} | |
function d3_timer_sweep() { | |
var t0, t1 = d3_timer_queueHead, time = Infinity; | |
while (t1) { | |
if (t1.flush) { | |
t1 = t0 ? t0.next = t1.next : d3_timer_queueHead = t1.next; | |
} else { | |
if (t1.time < time) time = t1.time; | |
t1 = (t0 = t1).next; | |
} | |
} | |
d3_timer_queueTail = t0; | |
return time; | |
} | |
var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ], d3_format_currencySymbol = "$"; | |
var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix); | |
d3.formatPrefix = function(value, precision) { | |
var i = 0; | |
if (value) { | |
if (value < 0) value *= -1; | |
if (precision) value = d3.round(value, d3_format_precision(value, precision)); | |
i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10); | |
i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3)); | |
} | |
return d3_formatPrefixes[8 + i / 3]; | |
}; | |
function d3_formatPrefix(d, i) { | |
var k = Math.pow(10, Math.abs(8 - i) * 3); | |
return { | |
scale: i > 8 ? function(d) { | |
return d / k; | |
} : function(d) { | |
return d * k; | |
}, | |
symbol: d | |
}; | |
} | |
d3.round = function(x, n) { | |
return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x); | |
}; | |
d3.format = function(specifier) { | |
var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false; | |
if (precision) precision = +precision.substring(1); | |
if (zfill || fill === "0" && align === "=") { | |
zfill = fill = "0"; | |
align = "="; | |
if (comma) width -= Math.floor((width - 1) / 4); | |
} | |
switch (type) { | |
case "n": | |
comma = true; | |
type = "g"; | |
break; | |
case "%": | |
scale = 100; | |
suffix = "%"; | |
type = "f"; | |
break; | |
case "p": | |
scale = 100; | |
suffix = "%"; | |
type = "r"; | |
break; | |
case "b": | |
case "o": | |
case "x": | |
case "X": | |
if (symbol === "#") symbol = "0" + type.toLowerCase(); | |
case "c": | |
case "d": | |
integer = true; | |
precision = 0; | |
break; | |
case "s": | |
scale = -1; | |
type = "r"; | |
break; | |
} | |
if (symbol === "#") symbol = ""; else if (symbol === "$") symbol = d3_format_currencySymbol; | |
if (type == "r" && !precision) type = "g"; | |
if (precision != null) { | |
if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision)); | |
} | |
type = d3_format_types.get(type) || d3_format_typeDefault; | |
var zcomma = zfill && comma; | |
return function(value) { | |
if (integer && value % 1) return ""; | |
var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign; | |
if (scale < 0) { | |
var prefix = d3.formatPrefix(value, precision); | |
value = prefix.scale(value); | |
suffix = prefix.symbol; | |
} else { | |
value *= scale; | |
} | |
value = type(value, precision); | |
var i = value.lastIndexOf("."), before = i < 0 ? value : value.substring(0, i), after = i < 0 ? "" : d3_format_decimalPoint + value.substring(i + 1); | |
if (!zfill && comma) before = d3_format_group(before); | |
var length = symbol.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : ""; | |
if (zcomma) before = d3_format_group(padding + before); | |
negative += symbol; | |
value = before + after; | |
return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + suffix; | |
}; | |
}; | |
var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i; | |
var d3_format_types = d3.map({ | |
b: function(x) { | |
return x.toString(2); | |
}, | |
c: function(x) { | |
return String.fromCharCode(x); | |
}, | |
o: function(x) { | |
return x.toString(8); | |
}, | |
x: function(x) { | |
return x.toString(16); | |
}, | |
X: function(x) { | |
return x.toString(16).toUpperCase(); | |
}, | |
g: function(x, p) { | |
return x.toPrecision(p); | |
}, | |
e: function(x, p) { | |
return x.toExponential(p); | |
}, | |
f: function(x, p) { | |
return x.toFixed(p); | |
}, | |
r: function(x, p) { | |
return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p)))); | |
} | |
}); | |
function d3_format_precision(x, p) { | |
return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1); | |
} | |
function d3_format_typeDefault(x) { | |
return x + ""; | |
} | |
var d3_format_group = d3_identity; | |
if (d3_format_grouping) { | |
var d3_format_groupingLength = d3_format_grouping.length; | |
d3_format_group = function(value) { | |
var i = value.length, t = [], j = 0, g = d3_format_grouping[0]; | |
while (i > 0 && g > 0) { | |
t.push(value.substring(i -= g, i + g)); | |
g = d3_format_grouping[j = (j + 1) % d3_format_groupingLength]; | |
} | |
return t.reverse().join(d3_format_thousandsSeparator); | |
}; | |
} | |
d3.geo = {}; | |
function d3_adder() {} | |
d3_adder.prototype = { | |
s: 0, | |
t: 0, | |
add: function(y) { | |
d3_adderSum(y, this.t, d3_adderTemp); | |
d3_adderSum(d3_adderTemp.s, this.s, this); | |
if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t; | |
}, | |
reset: function() { | |
this.s = this.t = 0; | |
}, | |
valueOf: function() { | |
return this.s; | |
} | |
}; | |
var d3_adderTemp = new d3_adder(); | |
function d3_adderSum(a, b, o) { | |
var x = o.s = a + b, bv = x - a, av = x - bv; | |
o.t = a - av + (b - bv); | |
} | |
d3.geo.stream = function(object, listener) { | |
if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) { | |
d3_geo_streamObjectType[object.type](object, listener); | |
} else { | |
d3_geo_streamGeometry(object, listener); | |
} | |
}; | |
function d3_geo_streamGeometry(geometry, listener) { | |
if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) { | |
d3_geo_streamGeometryType[geometry.type](geometry, listener); | |
} | |
} | |
var d3_geo_streamObjectType = { | |
Feature: function(feature, listener) { | |
d3_geo_streamGeometry(feature.geometry, listener); | |
}, | |
FeatureCollection: function(object, listener) { | |
var features = object.features, i = -1, n = features.length; | |
while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener); | |
} | |
}; | |
var d3_geo_streamGeometryType = { | |
Sphere: function(object, listener) { | |
listener.sphere(); | |
}, | |
Point: function(object, listener) { | |
var coordinate = object.coordinates; | |
listener.point(coordinate[0], coordinate[1]); | |
}, | |
MultiPoint: function(object, listener) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length, coordinate; | |
while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]); | |
}, | |
LineString: function(object, listener) { | |
d3_geo_streamLine(object.coordinates, listener, 0); | |
}, | |
MultiLineString: function(object, listener) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length; | |
while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0); | |
}, | |
Polygon: function(object, listener) { | |
d3_geo_streamPolygon(object.coordinates, listener); | |
}, | |
MultiPolygon: function(object, listener) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length; | |
while (++i < n) d3_geo_streamPolygon(coordinates[i], listener); | |
}, | |
GeometryCollection: function(object, listener) { | |
var geometries = object.geometries, i = -1, n = geometries.length; | |
while (++i < n) d3_geo_streamGeometry(geometries[i], listener); | |
} | |
}; | |
function d3_geo_streamLine(coordinates, listener, closed) { | |
var i = -1, n = coordinates.length - closed, coordinate; | |
listener.lineStart(); | |
while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]); | |
listener.lineEnd(); | |
} | |
function d3_geo_streamPolygon(coordinates, listener) { | |
var i = -1, n = coordinates.length; | |
listener.polygonStart(); | |
while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1); | |
listener.polygonEnd(); | |
} | |
d3.geo.area = function(object) { | |
d3_geo_areaSum = 0; | |
d3.geo.stream(object, d3_geo_area); | |
return d3_geo_areaSum; | |
}; | |
var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder(); | |
var d3_geo_area = { | |
sphere: function() { | |
d3_geo_areaSum += 4 * π; | |
}, | |
point: d3_noop, | |
lineStart: d3_noop, | |
lineEnd: d3_noop, | |
polygonStart: function() { | |
d3_geo_areaRingSum.reset(); | |
d3_geo_area.lineStart = d3_geo_areaRingStart; | |
}, | |
polygonEnd: function() { | |
var area = 2 * d3_geo_areaRingSum; | |
d3_geo_areaSum += area < 0 ? 4 * π + area : area; | |
d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop; | |
} | |
}; | |
function d3_geo_areaRingStart() { | |
var λ00, φ00, λ0, cosφ0, sinφ0; | |
d3_geo_area.point = function(λ, φ) { | |
d3_geo_area.point = nextPoint; | |
λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), | |
sinφ0 = Math.sin(φ); | |
}; | |
function nextPoint(λ, φ) { | |
λ *= d3_radians; | |
φ = φ * d3_radians / 2 + π / 4; | |
var dλ = λ - λ0, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(dλ), v = k * Math.sin(dλ); | |
d3_geo_areaRingSum.add(Math.atan2(v, u)); | |
λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ; | |
} | |
d3_geo_area.lineEnd = function() { | |
nextPoint(λ00, φ00); | |
}; | |
} | |
function d3_geo_cartesian(spherical) { | |
var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ); | |
return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ]; | |
} | |
function d3_geo_cartesianDot(a, b) { | |
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; | |
} | |
function d3_geo_cartesianCross(a, b) { | |
return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ]; | |
} | |
function d3_geo_cartesianAdd(a, b) { | |
a[0] += b[0]; | |
a[1] += b[1]; | |
a[2] += b[2]; | |
} | |
function d3_geo_cartesianScale(vector, k) { | |
return [ vector[0] * k, vector[1] * k, vector[2] * k ]; | |
} | |
function d3_geo_cartesianNormalize(d) { | |
var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); | |
d[0] /= l; | |
d[1] /= l; | |
d[2] /= l; | |
} | |
function d3_geo_spherical(cartesian) { | |
return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ]; | |
} | |
function d3_geo_sphericalEqual(a, b) { | |
return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε; | |
} | |
d3.geo.bounds = function() { | |
var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range; | |
var bound = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
bound.point = ringPoint; | |
bound.lineStart = ringStart; | |
bound.lineEnd = ringEnd; | |
dλSum = 0; | |
d3_geo_area.polygonStart(); | |
}, | |
polygonEnd: function() { | |
d3_geo_area.polygonEnd(); | |
bound.point = point; | |
bound.lineStart = lineStart; | |
bound.lineEnd = lineEnd; | |
if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90; | |
range[0] = λ0, range[1] = λ1; | |
} | |
}; | |
function point(λ, φ) { | |
ranges.push(range = [ λ0 = λ, λ1 = λ ]); | |
if (φ < φ0) φ0 = φ; | |
if (φ > φ1) φ1 = φ; | |
} | |
function linePoint(λ, φ) { | |
var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]); | |
if (p0) { | |
var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal); | |
d3_geo_cartesianNormalize(inflection); | |
inflection = d3_geo_spherical(inflection); | |
var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = Math.abs(dλ) > 180; | |
if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) { | |
var φi = inflection[1] * d3_degrees; | |
if (φi > φ1) φ1 = φi; | |
} else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) { | |
var φi = -inflection[1] * d3_degrees; | |
if (φi < φ0) φ0 = φi; | |
} else { | |
if (φ < φ0) φ0 = φ; | |
if (φ > φ1) φ1 = φ; | |
} | |
if (antimeridian) { | |
if (λ < λ_) { | |
if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; | |
} else { | |
if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; | |
} | |
} else { | |
if (λ1 >= λ0) { | |
if (λ < λ0) λ0 = λ; | |
if (λ > λ1) λ1 = λ; | |
} else { | |
if (λ > λ_) { | |
if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ; | |
} else { | |
if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ; | |
} | |
} | |
} | |
} else { | |
point(λ, φ); | |
} | |
p0 = p, λ_ = λ; | |
} | |
function lineStart() { | |
bound.point = linePoint; | |
} | |
function lineEnd() { | |
range[0] = λ0, range[1] = λ1; | |
bound.point = point; | |
p0 = null; | |
} | |
function ringPoint(λ, φ) { | |
if (p0) { | |
var dλ = λ - λ_; | |
dλSum += Math.abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ; | |
} else λ__ = λ, φ__ = φ; | |
d3_geo_area.point(λ, φ); | |
linePoint(λ, φ); | |
} | |
function ringStart() { | |
d3_geo_area.lineStart(); | |
} | |
function ringEnd() { | |
ringPoint(λ__, φ__); | |
d3_geo_area.lineEnd(); | |
if (Math.abs(dλSum) > ε) λ0 = -(λ1 = 180); | |
range[0] = λ0, range[1] = λ1; | |
p0 = null; | |
} | |
function angle(λ0, λ1) { | |
return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1; | |
} | |
function compareRanges(a, b) { | |
return a[0] - b[0]; | |
} | |
function withinRange(x, range) { | |
return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; | |
} | |
return function(feature) { | |
φ1 = λ1 = -(λ0 = φ0 = Infinity); | |
ranges = []; | |
d3.geo.stream(feature, bound); | |
var n = ranges.length; | |
if (n) { | |
ranges.sort(compareRanges); | |
for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) { | |
b = ranges[i]; | |
if (withinRange(b[0], a) || withinRange(b[1], a)) { | |
if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; | |
if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; | |
} else { | |
merged.push(a = b); | |
} | |
} | |
var best = -Infinity, dλ; | |
for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) { | |
b = merged[i]; | |
if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1]; | |
} | |
} | |
ranges = range = null; | |
return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ]; | |
}; | |
}(); | |
d3.geo.centroid = function(object) { | |
d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; | |
d3.geo.stream(object, d3_geo_centroid); | |
var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z; | |
if (m < ε2) { | |
x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1; | |
if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0; | |
m = x * x + y * y + z * z; | |
if (m < ε2) return [ NaN, NaN ]; | |
} | |
return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ]; | |
}; | |
var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2; | |
var d3_geo_centroid = { | |
sphere: d3_noop, | |
point: d3_geo_centroidPoint, | |
lineStart: d3_geo_centroidLineStart, | |
lineEnd: d3_geo_centroidLineEnd, | |
polygonStart: function() { | |
d3_geo_centroid.lineStart = d3_geo_centroidRingStart; | |
}, | |
polygonEnd: function() { | |
d3_geo_centroid.lineStart = d3_geo_centroidLineStart; | |
} | |
}; | |
function d3_geo_centroidPoint(λ, φ) { | |
λ *= d3_radians; | |
var cosφ = Math.cos(φ *= d3_radians); | |
d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ)); | |
} | |
function d3_geo_centroidPointXYZ(x, y, z) { | |
++d3_geo_centroidW0; | |
d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0; | |
d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0; | |
d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0; | |
} | |
function d3_geo_centroidLineStart() { | |
var x0, y0, z0; | |
d3_geo_centroid.point = function(λ, φ) { | |
λ *= d3_radians; | |
var cosφ = Math.cos(φ *= d3_radians); | |
x0 = cosφ * Math.cos(λ); | |
y0 = cosφ * Math.sin(λ); | |
z0 = Math.sin(φ); | |
d3_geo_centroid.point = nextPoint; | |
d3_geo_centroidPointXYZ(x0, y0, z0); | |
}; | |
function nextPoint(λ, φ) { | |
λ *= d3_radians; | |
var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); | |
d3_geo_centroidW1 += w; | |
d3_geo_centroidX1 += w * (x0 + (x0 = x)); | |
d3_geo_centroidY1 += w * (y0 + (y0 = y)); | |
d3_geo_centroidZ1 += w * (z0 + (z0 = z)); | |
d3_geo_centroidPointXYZ(x0, y0, z0); | |
} | |
} | |
function d3_geo_centroidLineEnd() { | |
d3_geo_centroid.point = d3_geo_centroidPoint; | |
} | |
function d3_geo_centroidRingStart() { | |
var λ00, φ00, x0, y0, z0; | |
d3_geo_centroid.point = function(λ, φ) { | |
λ00 = λ, φ00 = φ; | |
d3_geo_centroid.point = nextPoint; | |
λ *= d3_radians; | |
var cosφ = Math.cos(φ *= d3_radians); | |
x0 = cosφ * Math.cos(λ); | |
y0 = cosφ * Math.sin(λ); | |
z0 = Math.sin(φ); | |
d3_geo_centroidPointXYZ(x0, y0, z0); | |
}; | |
d3_geo_centroid.lineEnd = function() { | |
nextPoint(λ00, φ00); | |
d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd; | |
d3_geo_centroid.point = d3_geo_centroidPoint; | |
}; | |
function nextPoint(λ, φ) { | |
λ *= d3_radians; | |
var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u); | |
d3_geo_centroidX2 += v * cx; | |
d3_geo_centroidY2 += v * cy; | |
d3_geo_centroidZ2 += v * cz; | |
d3_geo_centroidW1 += w; | |
d3_geo_centroidX1 += w * (x0 + (x0 = x)); | |
d3_geo_centroidY1 += w * (y0 + (y0 = y)); | |
d3_geo_centroidZ1 += w * (z0 + (z0 = z)); | |
d3_geo_centroidPointXYZ(x0, y0, z0); | |
} | |
} | |
function d3_true() { | |
return true; | |
} | |
function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) { | |
var subject = [], clip = []; | |
segments.forEach(function(segment) { | |
if ((n = segment.length - 1) <= 0) return; | |
var n, p0 = segment[0], p1 = segment[n]; | |
if (d3_geo_sphericalEqual(p0, p1)) { | |
listener.lineStart(); | |
for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]); | |
listener.lineEnd(); | |
return; | |
} | |
var a = { | |
point: p0, | |
points: segment, | |
other: null, | |
visited: false, | |
entry: true, | |
subject: true | |
}, b = { | |
point: p0, | |
points: [ p0 ], | |
other: a, | |
visited: false, | |
entry: false, | |
subject: false | |
}; | |
a.other = b; | |
subject.push(a); | |
clip.push(b); | |
a = { | |
point: p1, | |
points: [ p1 ], | |
other: null, | |
visited: false, | |
entry: false, | |
subject: true | |
}; | |
b = { | |
point: p1, | |
points: [ p1 ], | |
other: a, | |
visited: false, | |
entry: true, | |
subject: false | |
}; | |
a.other = b; | |
subject.push(a); | |
clip.push(b); | |
}); | |
clip.sort(compare); | |
d3_geo_clipPolygonLinkCircular(subject); | |
d3_geo_clipPolygonLinkCircular(clip); | |
if (!subject.length) return; | |
if (inside) for (var i = 1, e = !inside(clip[0].point), n = clip.length; i < n; ++i) { | |
clip[i].entry = e = !e; | |
} | |
var start = subject[0], current, points, point; | |
while (1) { | |
current = start; | |
while (current.visited) if ((current = current.next) === start) return; | |
points = current.points; | |
listener.lineStart(); | |
do { | |
current.visited = current.other.visited = true; | |
if (current.entry) { | |
if (current.subject) { | |
for (var i = 0; i < points.length; i++) listener.point((point = points[i])[0], point[1]); | |
} else { | |
interpolate(current.point, current.next.point, 1, listener); | |
} | |
current = current.next; | |
} else { | |
if (current.subject) { | |
points = current.prev.points; | |
for (var i = points.length; --i >= 0; ) listener.point((point = points[i])[0], point[1]); | |
} else { | |
interpolate(current.point, current.prev.point, -1, listener); | |
} | |
current = current.prev; | |
} | |
current = current.other; | |
points = current.points; | |
} while (!current.visited); | |
listener.lineEnd(); | |
} | |
} | |
function d3_geo_clipPolygonLinkCircular(array) { | |
if (!(n = array.length)) return; | |
var n, i = 0, a = array[0], b; | |
while (++i < n) { | |
a.next = b = array[i]; | |
b.prev = a; | |
a = b; | |
} | |
a.next = b = array[0]; | |
b.prev = a; | |
} | |
function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) { | |
return function(listener) { | |
var line = clipLine(listener); | |
var clip = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
clip.point = pointRing; | |
clip.lineStart = ringStart; | |
clip.lineEnd = ringEnd; | |
segments = []; | |
polygon = []; | |
listener.polygonStart(); | |
}, | |
polygonEnd: function() { | |
clip.point = point; | |
clip.lineStart = lineStart; | |
clip.lineEnd = lineEnd; | |
segments = d3.merge(segments); | |
if (segments.length) { | |
d3_geo_clipPolygon(segments, d3_geo_clipSort, null, interpolate, listener); | |
} else if (polygonContains(polygon)) { | |
listener.lineStart(); | |
interpolate(null, null, 1, listener); | |
listener.lineEnd(); | |
} | |
listener.polygonEnd(); | |
segments = polygon = null; | |
}, | |
sphere: function() { | |
listener.polygonStart(); | |
listener.lineStart(); | |
interpolate(null, null, 1, listener); | |
listener.lineEnd(); | |
listener.polygonEnd(); | |
} | |
}; | |
function point(λ, φ) { | |
if (pointVisible(λ, φ)) listener.point(λ, φ); | |
} | |
function pointLine(λ, φ) { | |
line.point(λ, φ); | |
} | |
function lineStart() { | |
clip.point = pointLine; | |
line.lineStart(); | |
} | |
function lineEnd() { | |
clip.point = point; | |
line.lineEnd(); | |
} | |
var segments; | |
var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygon, ring; | |
function pointRing(λ, φ) { | |
ringListener.point(λ, φ); | |
ring.push([ λ, φ ]); | |
} | |
function ringStart() { | |
ringListener.lineStart(); | |
ring = []; | |
} | |
function ringEnd() { | |
pointRing(ring[0][0], ring[0][1]); | |
ringListener.lineEnd(); | |
var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length; | |
ring.pop(); | |
polygon.push(ring); | |
ring = null; | |
if (!n) return; | |
if (clean & 1) { | |
segment = ringSegments[0]; | |
var n = segment.length - 1, i = -1, point; | |
listener.lineStart(); | |
while (++i < n) listener.point((point = segment[i])[0], point[1]); | |
listener.lineEnd(); | |
return; | |
} | |
if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); | |
segments.push(ringSegments.filter(d3_geo_clipSegmentLength1)); | |
} | |
return clip; | |
}; | |
} | |
function d3_geo_clipSegmentLength1(segment) { | |
return segment.length > 1; | |
} | |
function d3_geo_clipBufferListener() { | |
var lines = [], line; | |
return { | |
lineStart: function() { | |
lines.push(line = []); | |
}, | |
point: function(λ, φ) { | |
line.push([ λ, φ ]); | |
}, | |
lineEnd: d3_noop, | |
buffer: function() { | |
var buffer = lines; | |
lines = []; | |
line = null; | |
return buffer; | |
}, | |
rejoin: function() { | |
if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); | |
} | |
}; | |
} | |
function d3_geo_clipSort(a, b) { | |
return ((a = a.point)[0] < 0 ? a[1] - π / 2 - ε : π / 2 - a[1]) - ((b = b.point)[0] < 0 ? b[1] - π / 2 - ε : π / 2 - b[1]); | |
} | |
function d3_geo_pointInPolygon(point, polygon) { | |
var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, polar = false, southPole = false, winding = 0; | |
d3_geo_areaRingSum.reset(); | |
for (var i = 0, n = polygon.length; i < n; ++i) { | |
var ring = polygon[i], m = ring.length; | |
if (!m) continue; | |
var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1; | |
while (true) { | |
if (j === m) j = 0; | |
point = ring[j]; | |
var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, antimeridian = Math.abs(dλ) > π, k = sinφ0 * sinφ; | |
d3_geo_areaRingSum.add(Math.atan2(k * Math.sin(dλ), cosφ0 * cosφ + k * Math.cos(dλ))); | |
if (Math.abs(φ) < ε) southPole = true; | |
polarAngle += antimeridian ? dλ + (dλ >= 0 ? 2 : -2) * π : dλ; | |
if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) { | |
var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point)); | |
d3_geo_cartesianNormalize(arc); | |
var intersection = d3_geo_cartesianCross(meridianNormal, arc); | |
d3_geo_cartesianNormalize(intersection); | |
var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]); | |
if (parallel > φarc) { | |
winding += antimeridian ^ dλ >= 0 ? 1 : -1; | |
} | |
} | |
if (!j++) break; | |
λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point; | |
} | |
if (Math.abs(polarAngle) > ε) polar = true; | |
} | |
return (!southPole && !polar && d3_geo_areaRingSum < 0 || polarAngle < -ε) ^ winding & 1; | |
} | |
var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, d3_geo_clipAntimeridianPolygonContains); | |
function d3_geo_clipAntimeridianLine(listener) { | |
var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean; | |
return { | |
lineStart: function() { | |
listener.lineStart(); | |
clean = 1; | |
}, | |
point: function(λ1, φ1) { | |
var sλ1 = λ1 > 0 ? π : -π, dλ = Math.abs(λ1 - λ0); | |
if (Math.abs(dλ - π) < ε) { | |
listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? π / 2 : -π / 2); | |
listener.point(sλ0, φ0); | |
listener.lineEnd(); | |
listener.lineStart(); | |
listener.point(sλ1, φ0); | |
listener.point(λ1, φ0); | |
clean = 0; | |
} else if (sλ0 !== sλ1 && dλ >= π) { | |
if (Math.abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε; | |
if (Math.abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε; | |
φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1); | |
listener.point(sλ0, φ0); | |
listener.lineEnd(); | |
listener.lineStart(); | |
listener.point(sλ1, φ0); | |
clean = 0; | |
} | |
listener.point(λ0 = λ1, φ0 = φ1); | |
sλ0 = sλ1; | |
}, | |
lineEnd: function() { | |
listener.lineEnd(); | |
λ0 = φ0 = NaN; | |
}, | |
clean: function() { | |
return 2 - clean; | |
} | |
}; | |
} | |
function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) { | |
var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1); | |
return Math.abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2; | |
} | |
function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { | |
var φ; | |
if (from == null) { | |
φ = direction * π / 2; | |
listener.point(-π, φ); | |
listener.point(0, φ); | |
listener.point(π, φ); | |
listener.point(π, 0); | |
listener.point(π, -φ); | |
listener.point(0, -φ); | |
listener.point(-π, -φ); | |
listener.point(-π, 0); | |
listener.point(-π, φ); | |
} else if (Math.abs(from[0] - to[0]) > ε) { | |
var s = (from[0] < to[0] ? 1 : -1) * π; | |
φ = direction * s / 2; | |
listener.point(-s, φ); | |
listener.point(0, φ); | |
listener.point(s, φ); | |
} else { | |
listener.point(to[0], to[1]); | |
} | |
} | |
var d3_geo_clipAntimeridianPoint = [ -π, 0 ]; | |
function d3_geo_clipAntimeridianPolygonContains(polygon) { | |
return d3_geo_pointInPolygon(d3_geo_clipAntimeridianPoint, polygon); | |
} | |
function d3_geo_clipCircle(radius) { | |
var cr = Math.cos(radius), smallRadius = cr > 0, point = [ radius, 0 ], notHemisphere = Math.abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians); | |
return d3_geo_clip(visible, clipLine, interpolate, polygonContains); | |
function visible(λ, φ) { | |
return Math.cos(λ) * Math.cos(φ) > cr; | |
} | |
function clipLine(listener) { | |
var point0, c0, v0, v00, clean; | |
return { | |
lineStart: function() { | |
v00 = v0 = false; | |
clean = 1; | |
}, | |
point: function(λ, φ) { | |
var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0; | |
if (!point0 && (v00 = v0 = v)) listener.lineStart(); | |
if (v !== v0) { | |
point2 = intersect(point0, point1); | |
if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) { | |
point1[0] += ε; | |
point1[1] += ε; | |
v = visible(point1[0], point1[1]); | |
} | |
} | |
if (v !== v0) { | |
clean = 0; | |
if (v) { | |
listener.lineStart(); | |
point2 = intersect(point1, point0); | |
listener.point(point2[0], point2[1]); | |
} else { | |
point2 = intersect(point0, point1); | |
listener.point(point2[0], point2[1]); | |
listener.lineEnd(); | |
} | |
point0 = point2; | |
} else if (notHemisphere && point0 && smallRadius ^ v) { | |
var t; | |
if (!(c & c0) && (t = intersect(point1, point0, true))) { | |
clean = 0; | |
if (smallRadius) { | |
listener.lineStart(); | |
listener.point(t[0][0], t[0][1]); | |
listener.point(t[1][0], t[1][1]); | |
listener.lineEnd(); | |
} else { | |
listener.point(t[1][0], t[1][1]); | |
listener.lineEnd(); | |
listener.lineStart(); | |
listener.point(t[0][0], t[0][1]); | |
} | |
} | |
} | |
if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) { | |
listener.point(point1[0], point1[1]); | |
} | |
point0 = point1, v0 = v, c0 = c; | |
}, | |
lineEnd: function() { | |
if (v0) listener.lineEnd(); | |
point0 = null; | |
}, | |
clean: function() { | |
return clean | (v00 && v0) << 1; | |
} | |
}; | |
} | |
function intersect(a, b, two) { | |
var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b); | |
var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2; | |
if (!determinant) return !two && a; | |
var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2); | |
d3_geo_cartesianAdd(A, B); | |
var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1); | |
if (t2 < 0) return; | |
var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu); | |
d3_geo_cartesianAdd(q, A); | |
q = d3_geo_spherical(q); | |
if (!two) return q; | |
var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z; | |
if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z; | |
var δλ = λ1 - λ0, polar = Math.abs(δλ - π) < ε, meridian = polar || δλ < ε; | |
if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z; | |
if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (Math.abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) { | |
var q1 = d3_geo_cartesianScale(u, (-w + t) / uu); | |
d3_geo_cartesianAdd(q1, A); | |
return [ q, d3_geo_spherical(q1) ]; | |
} | |
} | |
function code(λ, φ) { | |
var r = smallRadius ? radius : π - radius, code = 0; | |
if (λ < -r) code |= 1; else if (λ > r) code |= 2; | |
if (φ < -r) code |= 4; else if (φ > r) code |= 8; | |
return code; | |
} | |
function polygonContains(polygon) { | |
return d3_geo_pointInPolygon(point, polygon); | |
} | |
} | |
var d3_geo_clipViewMAX = 1e9; | |
function d3_geo_clipView(x0, y0, x1, y1) { | |
return function(listener) { | |
var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), segments, polygon, ring; | |
var clip = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
listener = bufferListener; | |
segments = []; | |
polygon = []; | |
}, | |
polygonEnd: function() { | |
listener = listener_; | |
if ((segments = d3.merge(segments)).length) { | |
listener.polygonStart(); | |
d3_geo_clipPolygon(segments, compare, inside, interpolate, listener); | |
listener.polygonEnd(); | |
} else if (insidePolygon([ x0, y0 ])) { | |
listener.polygonStart(), listener.lineStart(); | |
interpolate(null, null, 1, listener); | |
listener.lineEnd(), listener.polygonEnd(); | |
} | |
segments = polygon = ring = null; | |
} | |
}; | |
function inside(point) { | |
var a = corner(point, -1), i = insidePolygon([ a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0 ]); | |
return i; | |
} | |
function insidePolygon(p) { | |
var wn = 0, n = polygon.length, y = p[1]; | |
for (var i = 0; i < n; ++i) { | |
for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) { | |
b = v[j]; | |
if (a[1] <= y) { | |
if (b[1] > y && isLeft(a, b, p) > 0) ++wn; | |
} else { | |
if (b[1] <= y && isLeft(a, b, p) < 0) --wn; | |
} | |
a = b; | |
} | |
} | |
return wn !== 0; | |
} | |
function isLeft(a, b, c) { | |
return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]); | |
} | |
function interpolate(from, to, direction, listener) { | |
var a = 0, a1 = 0; | |
if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) { | |
do { | |
listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); | |
} while ((a = (a + direction + 4) % 4) !== a1); | |
} else { | |
listener.point(to[0], to[1]); | |
} | |
} | |
function visible(x, y) { | |
return x0 <= x && x <= x1 && y0 <= y && y <= y1; | |
} | |
function point(x, y) { | |
if (visible(x, y)) listener.point(x, y); | |
} | |
var x__, y__, v__, x_, y_, v_, first; | |
function lineStart() { | |
clip.point = linePoint; | |
if (polygon) polygon.push(ring = []); | |
first = true; | |
v_ = false; | |
x_ = y_ = NaN; | |
} | |
function lineEnd() { | |
if (segments) { | |
linePoint(x__, y__); | |
if (v__ && v_) bufferListener.rejoin(); | |
segments.push(bufferListener.buffer()); | |
} | |
clip.point = point; | |
if (v_) listener.lineEnd(); | |
} | |
function linePoint(x, y) { | |
x = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, x)); | |
y = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, y)); | |
var v = visible(x, y); | |
if (polygon) ring.push([ x, y ]); | |
if (first) { | |
x__ = x, y__ = y, v__ = v; | |
first = false; | |
if (v) { | |
listener.lineStart(); | |
listener.point(x, y); | |
} | |
} else { | |
if (v && v_) listener.point(x, y); else { | |
var a = [ x_, y_ ], b = [ x, y ]; | |
if (clipLine(a, b)) { | |
if (!v_) { | |
listener.lineStart(); | |
listener.point(a[0], a[1]); | |
} | |
listener.point(b[0], b[1]); | |
if (!v) listener.lineEnd(); | |
} else if (v) { | |
listener.lineStart(); | |
listener.point(x, y); | |
} | |
} | |
} | |
x_ = x, y_ = y, v_ = v; | |
} | |
return clip; | |
}; | |
function corner(p, direction) { | |
return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; | |
} | |
function compare(a, b) { | |
return comparePoints(a.point, b.point); | |
} | |
function comparePoints(a, b) { | |
var ca = corner(a, 1), cb = corner(b, 1); | |
return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; | |
} | |
function clipLine(a, b) { | |
var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ]; | |
if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1; | |
if (d3_geo_clipViewT(x0 - a[0], dx, t) && d3_geo_clipViewT(a[0] - x1, -dx, t) && d3_geo_clipViewT(y0 - a[1], dy, t) && d3_geo_clipViewT(a[1] - y1, -dy, t)) { | |
if (t[1] < 1) { | |
b[0] = a[0] + t[1] * dx; | |
b[1] = a[1] + t[1] * dy; | |
} | |
if (t[0] > 0) { | |
a[0] += t[0] * dx; | |
a[1] += t[0] * dy; | |
} | |
return true; | |
} | |
return false; | |
} | |
} | |
function d3_geo_clipViewT(num, denominator, t) { | |
if (Math.abs(denominator) < ε) return num <= 0; | |
var u = num / denominator; | |
if (denominator > 0) { | |
if (u > t[1]) return false; | |
if (u > t[0]) t[0] = u; | |
} else { | |
if (u < t[0]) return false; | |
if (u < t[1]) t[1] = u; | |
} | |
return true; | |
} | |
function d3_geo_compose(a, b) { | |
function compose(x, y) { | |
return x = a(x, y), b(x[0], x[1]); | |
} | |
if (a.invert && b.invert) compose.invert = function(x, y) { | |
return x = b.invert(x, y), x && a.invert(x[0], x[1]); | |
}; | |
return compose; | |
} | |
function d3_geo_conic(projectAt) { | |
var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1); | |
p.parallels = function(_) { | |
if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ]; | |
return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180); | |
}; | |
return p; | |
} | |
function d3_geo_conicEqualArea(φ0, φ1) { | |
var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n; | |
function forward(λ, φ) { | |
var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n; | |
return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ]; | |
} | |
forward.invert = function(x, y) { | |
var ρ0_y = ρ0 - y; | |
return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ]; | |
}; | |
return forward; | |
} | |
(d3.geo.conicEqualArea = function() { | |
return d3_geo_conic(d3_geo_conicEqualArea); | |
}).raw = d3_geo_conicEqualArea; | |
d3.geo.albers = function() { | |
return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070); | |
}; | |
d3.geo.albersUsa = function() { | |
var lower48 = d3.geo.albers(); | |
var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]); | |
var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]); | |
var point, pointStream = { | |
point: function(x, y) { | |
point = [ x, y ]; | |
} | |
}, lower48Point, alaskaPoint, hawaiiPoint; | |
function albersUsa(coordinates) { | |
var x = coordinates[0], y = coordinates[1]; | |
point = null; | |
(lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y); | |
return point; | |
} | |
albersUsa.invert = function(coordinates) { | |
var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k; | |
return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates); | |
}; | |
albersUsa.stream = function(stream) { | |
var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream); | |
return { | |
point: function(x, y) { | |
lower48Stream.point(x, y); | |
alaskaStream.point(x, y); | |
hawaiiStream.point(x, y); | |
}, | |
sphere: function() { | |
lower48Stream.sphere(); | |
alaskaStream.sphere(); | |
hawaiiStream.sphere(); | |
}, | |
lineStart: function() { | |
lower48Stream.lineStart(); | |
alaskaStream.lineStart(); | |
hawaiiStream.lineStart(); | |
}, | |
lineEnd: function() { | |
lower48Stream.lineEnd(); | |
alaskaStream.lineEnd(); | |
hawaiiStream.lineEnd(); | |
}, | |
polygonStart: function() { | |
lower48Stream.polygonStart(); | |
alaskaStream.polygonStart(); | |
hawaiiStream.polygonStart(); | |
}, | |
polygonEnd: function() { | |
lower48Stream.polygonEnd(); | |
alaskaStream.polygonEnd(); | |
hawaiiStream.polygonEnd(); | |
} | |
}; | |
}; | |
albersUsa.precision = function(_) { | |
if (!arguments.length) return lower48.precision(); | |
lower48.precision(_); | |
alaska.precision(_); | |
hawaii.precision(_); | |
return albersUsa; | |
}; | |
albersUsa.scale = function(_) { | |
if (!arguments.length) return lower48.scale(); | |
lower48.scale(_); | |
alaska.scale(_ * .35); | |
hawaii.scale(_); | |
return albersUsa.translate(lower48.translate()); | |
}; | |
albersUsa.translate = function(_) { | |
if (!arguments.length) return lower48.translate(); | |
var k = lower48.scale(), x = +_[0], y = +_[1]; | |
lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point; | |
alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; | |
hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point; | |
return albersUsa; | |
}; | |
return albersUsa.scale(1070); | |
}; | |
var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = { | |
point: d3_noop, | |
lineStart: d3_noop, | |
lineEnd: d3_noop, | |
polygonStart: function() { | |
d3_geo_pathAreaPolygon = 0; | |
d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart; | |
}, | |
polygonEnd: function() { | |
d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop; | |
d3_geo_pathAreaSum += Math.abs(d3_geo_pathAreaPolygon / 2); | |
} | |
}; | |
function d3_geo_pathAreaRingStart() { | |
var x00, y00, x0, y0; | |
d3_geo_pathArea.point = function(x, y) { | |
d3_geo_pathArea.point = nextPoint; | |
x00 = x0 = x, y00 = y0 = y; | |
}; | |
function nextPoint(x, y) { | |
d3_geo_pathAreaPolygon += y0 * x - x0 * y; | |
x0 = x, y0 = y; | |
} | |
d3_geo_pathArea.lineEnd = function() { | |
nextPoint(x00, y00); | |
}; | |
} | |
var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1; | |
var d3_geo_pathBounds = { | |
point: d3_geo_pathBoundsPoint, | |
lineStart: d3_noop, | |
lineEnd: d3_noop, | |
polygonStart: d3_noop, | |
polygonEnd: d3_noop | |
}; | |
function d3_geo_pathBoundsPoint(x, y) { | |
if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x; | |
if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x; | |
if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y; | |
if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y; | |
} | |
function d3_geo_pathBuffer() { | |
var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = []; | |
var stream = { | |
point: point, | |
lineStart: function() { | |
stream.point = pointLineStart; | |
}, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
stream.lineEnd = lineEndPolygon; | |
}, | |
polygonEnd: function() { | |
stream.lineEnd = lineEnd; | |
stream.point = point; | |
}, | |
pointRadius: function(_) { | |
pointCircle = d3_geo_pathBufferCircle(_); | |
return stream; | |
}, | |
result: function() { | |
if (buffer.length) { | |
var result = buffer.join(""); | |
buffer = []; | |
return result; | |
} | |
} | |
}; | |
function point(x, y) { | |
buffer.push("M", x, ",", y, pointCircle); | |
} | |
function pointLineStart(x, y) { | |
buffer.push("M", x, ",", y); | |
stream.point = pointLine; | |
} | |
function pointLine(x, y) { | |
buffer.push("L", x, ",", y); | |
} | |
function lineEnd() { | |
stream.point = point; | |
} | |
function lineEndPolygon() { | |
buffer.push("Z"); | |
} | |
return stream; | |
} | |
function d3_geo_pathBufferCircle(radius) { | |
return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z"; | |
} | |
var d3_geo_pathCentroid = { | |
point: d3_geo_pathCentroidPoint, | |
lineStart: d3_geo_pathCentroidLineStart, | |
lineEnd: d3_geo_pathCentroidLineEnd, | |
polygonStart: function() { | |
d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart; | |
}, | |
polygonEnd: function() { | |
d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; | |
d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart; | |
d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd; | |
} | |
}; | |
function d3_geo_pathCentroidPoint(x, y) { | |
d3_geo_centroidX0 += x; | |
d3_geo_centroidY0 += y; | |
++d3_geo_centroidZ0; | |
} | |
function d3_geo_pathCentroidLineStart() { | |
var x0, y0; | |
d3_geo_pathCentroid.point = function(x, y) { | |
d3_geo_pathCentroid.point = nextPoint; | |
d3_geo_pathCentroidPoint(x0 = x, y0 = y); | |
}; | |
function nextPoint(x, y) { | |
var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); | |
d3_geo_centroidX1 += z * (x0 + x) / 2; | |
d3_geo_centroidY1 += z * (y0 + y) / 2; | |
d3_geo_centroidZ1 += z; | |
d3_geo_pathCentroidPoint(x0 = x, y0 = y); | |
} | |
} | |
function d3_geo_pathCentroidLineEnd() { | |
d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint; | |
} | |
function d3_geo_pathCentroidRingStart() { | |
var x00, y00, x0, y0; | |
d3_geo_pathCentroid.point = function(x, y) { | |
d3_geo_pathCentroid.point = nextPoint; | |
d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y); | |
}; | |
function nextPoint(x, y) { | |
var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy); | |
d3_geo_centroidX1 += z * (x0 + x) / 2; | |
d3_geo_centroidY1 += z * (y0 + y) / 2; | |
d3_geo_centroidZ1 += z; | |
z = y0 * x - x0 * y; | |
d3_geo_centroidX2 += z * (x0 + x); | |
d3_geo_centroidY2 += z * (y0 + y); | |
d3_geo_centroidZ2 += z * 3; | |
d3_geo_pathCentroidPoint(x0 = x, y0 = y); | |
} | |
d3_geo_pathCentroid.lineEnd = function() { | |
nextPoint(x00, y00); | |
}; | |
} | |
function d3_geo_pathContext(context) { | |
var pointRadius = 4.5; | |
var stream = { | |
point: point, | |
lineStart: function() { | |
stream.point = pointLineStart; | |
}, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
stream.lineEnd = lineEndPolygon; | |
}, | |
polygonEnd: function() { | |
stream.lineEnd = lineEnd; | |
stream.point = point; | |
}, | |
pointRadius: function(_) { | |
pointRadius = _; | |
return stream; | |
}, | |
result: d3_noop | |
}; | |
function point(x, y) { | |
context.moveTo(x, y); | |
context.arc(x, y, pointRadius, 0, 2 * π); | |
} | |
function pointLineStart(x, y) { | |
context.moveTo(x, y); | |
stream.point = pointLine; | |
} | |
function pointLine(x, y) { | |
context.lineTo(x, y); | |
} | |
function lineEnd() { | |
stream.point = point; | |
} | |
function lineEndPolygon() { | |
context.closePath(); | |
} | |
return stream; | |
} | |
function d3_geo_resample(project) { | |
var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16; | |
function resample(stream) { | |
var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0; | |
var resample = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
stream.polygonStart(); | |
resample.lineStart = ringStart; | |
}, | |
polygonEnd: function() { | |
stream.polygonEnd(); | |
resample.lineStart = lineStart; | |
} | |
}; | |
function point(x, y) { | |
x = project(x, y); | |
stream.point(x[0], x[1]); | |
} | |
function lineStart() { | |
x0 = NaN; | |
resample.point = linePoint; | |
stream.lineStart(); | |
} | |
function linePoint(λ, φ) { | |
var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ); | |
resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); | |
stream.point(x0, y0); | |
} | |
function lineEnd() { | |
resample.point = point; | |
stream.lineEnd(); | |
} | |
function ringStart() { | |
lineStart(); | |
resample.point = ringPoint; | |
resample.lineEnd = ringEnd; | |
} | |
function ringPoint(λ, φ) { | |
linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; | |
resample.point = linePoint; | |
} | |
function ringEnd() { | |
resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream); | |
resample.lineEnd = lineEnd; | |
lineEnd(); | |
} | |
return resample; | |
} | |
function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) { | |
var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy; | |
if (d2 > 4 * δ2 && depth--) { | |
var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = Math.abs(Math.abs(c) - 1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; | |
if (dz * dz / d2 > δ2 || Math.abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { | |
resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream); | |
stream.point(x2, y2); | |
resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream); | |
} | |
} | |
} | |
resample.precision = function(_) { | |
if (!arguments.length) return Math.sqrt(δ2); | |
maxDepth = (δ2 = _ * _) > 0 && 16; | |
return resample; | |
}; | |
return resample; | |
} | |
d3.geo.path = function() { | |
var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream; | |
function path(object) { | |
if (object) { | |
if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); | |
if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream); | |
d3.geo.stream(object, cacheStream); | |
} | |
return contextStream.result(); | |
} | |
path.area = function(object) { | |
d3_geo_pathAreaSum = 0; | |
d3.geo.stream(object, projectStream(d3_geo_pathArea)); | |
return d3_geo_pathAreaSum; | |
}; | |
path.centroid = function(object) { | |
d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0; | |
d3.geo.stream(object, projectStream(d3_geo_pathCentroid)); | |
return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ]; | |
}; | |
path.bounds = function(object) { | |
d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity); | |
d3.geo.stream(object, projectStream(d3_geo_pathBounds)); | |
return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ]; | |
}; | |
path.projection = function(_) { | |
if (!arguments.length) return projection; | |
projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity; | |
return reset(); | |
}; | |
path.context = function(_) { | |
if (!arguments.length) return context; | |
contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_); | |
if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); | |
return reset(); | |
}; | |
path.pointRadius = function(_) { | |
if (!arguments.length) return pointRadius; | |
pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); | |
return path; | |
}; | |
function reset() { | |
cacheStream = null; | |
return path; | |
} | |
return path.projection(d3.geo.albersUsa()).context(null); | |
}; | |
function d3_geo_pathProjectStream(project) { | |
var resample = d3_geo_resample(function(λ, φ) { | |
return project([ λ * d3_degrees, φ * d3_degrees ]); | |
}); | |
return function(stream) { | |
stream = resample(stream); | |
return { | |
point: function(λ, φ) { | |
stream.point(λ * d3_radians, φ * d3_radians); | |
}, | |
sphere: function() { | |
stream.sphere(); | |
}, | |
lineStart: function() { | |
stream.lineStart(); | |
}, | |
lineEnd: function() { | |
stream.lineEnd(); | |
}, | |
polygonStart: function() { | |
stream.polygonStart(); | |
}, | |
polygonEnd: function() { | |
stream.polygonEnd(); | |
} | |
}; | |
}; | |
} | |
d3.geo.projection = d3_geo_projection; | |
d3.geo.projectionMutator = d3_geo_projectionMutator; | |
function d3_geo_projection(project) { | |
return d3_geo_projectionMutator(function() { | |
return project; | |
})(); | |
} | |
function d3_geo_projectionMutator(projectAt) { | |
var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) { | |
x = project(x, y); | |
return [ x[0] * k + δx, δy - x[1] * k ]; | |
}), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream; | |
function projection(point) { | |
point = projectRotate(point[0] * d3_radians, point[1] * d3_radians); | |
return [ point[0] * k + δx, δy - point[1] * k ]; | |
} | |
function invert(point) { | |
point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k); | |
return point && [ point[0] * d3_degrees, point[1] * d3_degrees ]; | |
} | |
projection.stream = function(output) { | |
if (stream) stream.valid = false; | |
stream = d3_geo_projectionRadiansRotate(rotate, preclip(projectResample(postclip(output)))); | |
stream.valid = true; | |
return stream; | |
}; | |
projection.clipAngle = function(_) { | |
if (!arguments.length) return clipAngle; | |
preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians); | |
return invalidate(); | |
}; | |
projection.clipExtent = function(_) { | |
if (!arguments.length) return clipExtent; | |
clipExtent = _; | |
postclip = _ == null ? d3_identity : d3_geo_clipView(_[0][0], _[0][1], _[1][0], _[1][1]); | |
return invalidate(); | |
}; | |
projection.scale = function(_) { | |
if (!arguments.length) return k; | |
k = +_; | |
return reset(); | |
}; | |
projection.translate = function(_) { | |
if (!arguments.length) return [ x, y ]; | |
x = +_[0]; | |
y = +_[1]; | |
return reset(); | |
}; | |
projection.center = function(_) { | |
if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ]; | |
λ = _[0] % 360 * d3_radians; | |
φ = _[1] % 360 * d3_radians; | |
return reset(); | |
}; | |
projection.rotate = function(_) { | |
if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ]; | |
δλ = _[0] % 360 * d3_radians; | |
δφ = _[1] % 360 * d3_radians; | |
δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0; | |
return reset(); | |
}; | |
d3.rebind(projection, projectResample, "precision"); | |
function reset() { | |
projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project); | |
var center = project(λ, φ); | |
δx = x - center[0] * k; | |
δy = y + center[1] * k; | |
return invalidate(); | |
} | |
function invalidate() { | |
if (stream) { | |
stream.valid = false; | |
stream = null; | |
} | |
return projection; | |
} | |
return function() { | |
project = projectAt.apply(this, arguments); | |
projection.invert = project.invert && invert; | |
return reset(); | |
}; | |
} | |
function d3_geo_projectionRadiansRotate(rotate, stream) { | |
return { | |
point: function(x, y) { | |
y = rotate(x * d3_radians, y * d3_radians), x = y[0]; | |
stream.point(x > π ? x - 2 * π : x < -π ? x + 2 * π : x, y[1]); | |
}, | |
sphere: function() { | |
stream.sphere(); | |
}, | |
lineStart: function() { | |
stream.lineStart(); | |
}, | |
lineEnd: function() { | |
stream.lineEnd(); | |
}, | |
polygonStart: function() { | |
stream.polygonStart(); | |
}, | |
polygonEnd: function() { | |
stream.polygonEnd(); | |
} | |
}; | |
} | |
function d3_geo_equirectangular(λ, φ) { | |
return [ λ, φ ]; | |
} | |
(d3.geo.equirectangular = function() { | |
return d3_geo_projection(d3_geo_equirectangular); | |
}).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular; | |
d3.geo.rotation = function(rotate) { | |
rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0); | |
function forward(coordinates) { | |
coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians); | |
return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; | |
} | |
forward.invert = function(coordinates) { | |
coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians); | |
return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates; | |
}; | |
return forward; | |
}; | |
function d3_geo_rotation(δλ, δφ, δγ) { | |
return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_equirectangular; | |
} | |
function d3_geo_forwardRotationλ(δλ) { | |
return function(λ, φ) { | |
return λ += δλ, [ λ > π ? λ - 2 * π : λ < -π ? λ + 2 * π : λ, φ ]; | |
}; | |
} | |
function d3_geo_rotationλ(δλ) { | |
var rotation = d3_geo_forwardRotationλ(δλ); | |
rotation.invert = d3_geo_forwardRotationλ(-δλ); | |
return rotation; | |
} | |
function d3_geo_rotationφγ(δφ, δγ) { | |
var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ); | |
function rotation(λ, φ) { | |
var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ; | |
return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ]; | |
} | |
rotation.invert = function(λ, φ) { | |
var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ; | |
return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ]; | |
}; | |
return rotation; | |
} | |
d3.geo.circle = function() { | |
var origin = [ 0, 0 ], angle, precision = 6, interpolate; | |
function circle() { | |
var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = []; | |
interpolate(null, null, 1, { | |
point: function(x, y) { | |
ring.push(x = rotate(x, y)); | |
x[0] *= d3_degrees, x[1] *= d3_degrees; | |
} | |
}); | |
return { | |
type: "Polygon", | |
coordinates: [ ring ] | |
}; | |
} | |
circle.origin = function(x) { | |
if (!arguments.length) return origin; | |
origin = x; | |
return circle; | |
}; | |
circle.angle = function(x) { | |
if (!arguments.length) return angle; | |
interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians); | |
return circle; | |
}; | |
circle.precision = function(_) { | |
if (!arguments.length) return precision; | |
interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians); | |
return circle; | |
}; | |
return circle.angle(90); | |
}; | |
function d3_geo_circleInterpolate(radius, precision) { | |
var cr = Math.cos(radius), sr = Math.sin(radius); | |
return function(from, to, direction, listener) { | |
if (from != null) { | |
from = d3_geo_circleAngle(cr, from); | |
to = d3_geo_circleAngle(cr, to); | |
if (direction > 0 ? from < to : from > to) from += direction * 2 * π; | |
} else { | |
from = radius + direction * 2 * π; | |
to = radius; | |
} | |
var point; | |
for (var step = direction * precision, t = from; direction > 0 ? t > to : t < to; t -= step) { | |
listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]); | |
} | |
}; | |
} | |
function d3_geo_circleAngle(cr, point) { | |
var a = d3_geo_cartesian(point); | |
a[0] -= cr; | |
d3_geo_cartesianNormalize(a); | |
var angle = d3_acos(-a[1]); | |
return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI); | |
} | |
d3.geo.distance = function(a, b) { | |
var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t; | |
return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ); | |
}; | |
d3.geo.graticule = function() { | |
var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5; | |
function graticule() { | |
return { | |
type: "MultiLineString", | |
coordinates: lines() | |
}; | |
} | |
function lines() { | |
return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) { | |
return Math.abs(x % DX) > ε; | |
}).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) { | |
return Math.abs(y % DY) > ε; | |
}).map(y)); | |
} | |
graticule.lines = function() { | |
return lines().map(function(coordinates) { | |
return { | |
type: "LineString", | |
coordinates: coordinates | |
}; | |
}); | |
}; | |
graticule.outline = function() { | |
return { | |
type: "Polygon", | |
coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ] | |
}; | |
}; | |
graticule.extent = function(_) { | |
if (!arguments.length) return graticule.minorExtent(); | |
return graticule.majorExtent(_).minorExtent(_); | |
}; | |
graticule.majorExtent = function(_) { | |
if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ]; | |
X0 = +_[0][0], X1 = +_[1][0]; | |
Y0 = +_[0][1], Y1 = +_[1][1]; | |
if (X0 > X1) _ = X0, X0 = X1, X1 = _; | |
if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; | |
return graticule.precision(precision); | |
}; | |
graticule.minorExtent = function(_) { | |
if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ]; | |
x0 = +_[0][0], x1 = +_[1][0]; | |
y0 = +_[0][1], y1 = +_[1][1]; | |
if (x0 > x1) _ = x0, x0 = x1, x1 = _; | |
if (y0 > y1) _ = y0, y0 = y1, y1 = _; | |
return graticule.precision(precision); | |
}; | |
graticule.step = function(_) { | |
if (!arguments.length) return graticule.minorStep(); | |
return graticule.majorStep(_).minorStep(_); | |
}; | |
graticule.majorStep = function(_) { | |
if (!arguments.length) return [ DX, DY ]; | |
DX = +_[0], DY = +_[1]; | |
return graticule; | |
}; | |
graticule.minorStep = function(_) { | |
if (!arguments.length) return [ dx, dy ]; | |
dx = +_[0], dy = +_[1]; | |
return graticule; | |
}; | |
graticule.precision = function(_) { | |
if (!arguments.length) return precision; | |
precision = +_; | |
x = d3_geo_graticuleX(y0, y1, 90); | |
y = d3_geo_graticuleY(x0, x1, precision); | |
X = d3_geo_graticuleX(Y0, Y1, 90); | |
Y = d3_geo_graticuleY(X0, X1, precision); | |
return graticule; | |
}; | |
return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]); | |
}; | |
function d3_geo_graticuleX(y0, y1, dy) { | |
var y = d3.range(y0, y1 - ε, dy).concat(y1); | |
return function(x) { | |
return y.map(function(y) { | |
return [ x, y ]; | |
}); | |
}; | |
} | |
function d3_geo_graticuleY(x0, x1, dx) { | |
var x = d3.range(x0, x1 - ε, dx).concat(x1); | |
return function(y) { | |
return x.map(function(x) { | |
return [ x, y ]; | |
}); | |
}; | |
} | |
function d3_source(d) { | |
return d.source; | |
} | |
function d3_target(d) { | |
return d.target; | |
} | |
d3.geo.greatArc = function() { | |
var source = d3_source, source_, target = d3_target, target_; | |
function greatArc() { | |
return { | |
type: "LineString", | |
coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ] | |
}; | |
} | |
greatArc.distance = function() { | |
return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments)); | |
}; | |
greatArc.source = function(_) { | |
if (!arguments.length) return source; | |
source = _, source_ = typeof _ === "function" ? null : _; | |
return greatArc; | |
}; | |
greatArc.target = function(_) { | |
if (!arguments.length) return target; | |
target = _, target_ = typeof _ === "function" ? null : _; | |
return greatArc; | |
}; | |
greatArc.precision = function() { | |
return arguments.length ? greatArc : 0; | |
}; | |
return greatArc; | |
}; | |
d3.geo.interpolate = function(source, target) { | |
return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians); | |
}; | |
function d3_geo_interpolate(x0, y0, x1, y1) { | |
var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d); | |
var interpolate = d ? function(t) { | |
var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1; | |
return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ]; | |
} : function() { | |
return [ x0 * d3_degrees, y0 * d3_degrees ]; | |
}; | |
interpolate.distance = d; | |
return interpolate; | |
} | |
d3.geo.length = function(object) { | |
d3_geo_lengthSum = 0; | |
d3.geo.stream(object, d3_geo_length); | |
return d3_geo_lengthSum; | |
}; | |
var d3_geo_lengthSum; | |
var d3_geo_length = { | |
sphere: d3_noop, | |
point: d3_noop, | |
lineStart: d3_geo_lengthLineStart, | |
lineEnd: d3_noop, | |
polygonStart: d3_noop, | |
polygonEnd: d3_noop | |
}; | |
function d3_geo_lengthLineStart() { | |
var λ0, sinφ0, cosφ0; | |
d3_geo_length.point = function(λ, φ) { | |
λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ); | |
d3_geo_length.point = nextPoint; | |
}; | |
d3_geo_length.lineEnd = function() { | |
d3_geo_length.point = d3_geo_length.lineEnd = d3_noop; | |
}; | |
function nextPoint(λ, φ) { | |
var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = Math.abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t); | |
d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ); | |
λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ; | |
} | |
} | |
function d3_geo_azimuthal(scale, angle) { | |
function azimuthal(λ, φ) { | |
var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ); | |
return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ]; | |
} | |
azimuthal.invert = function(x, y) { | |
var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c); | |
return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ]; | |
}; | |
return azimuthal; | |
} | |
var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) { | |
return Math.sqrt(2 / (1 + cosλcosφ)); | |
}, function(ρ) { | |
return 2 * Math.asin(ρ / 2); | |
}); | |
(d3.geo.azimuthalEqualArea = function() { | |
return d3_geo_projection(d3_geo_azimuthalEqualArea); | |
}).raw = d3_geo_azimuthalEqualArea; | |
var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) { | |
var c = Math.acos(cosλcosφ); | |
return c && c / Math.sin(c); | |
}, d3_identity); | |
(d3.geo.azimuthalEquidistant = function() { | |
return d3_geo_projection(d3_geo_azimuthalEquidistant); | |
}).raw = d3_geo_azimuthalEquidistant; | |
function d3_geo_conicConformal(φ0, φ1) { | |
var cosφ0 = Math.cos(φ0), t = function(φ) { | |
return Math.tan(π / 4 + φ / 2); | |
}, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n; | |
if (!n) return d3_geo_mercator; | |
function forward(λ, φ) { | |
var ρ = Math.abs(Math.abs(φ) - π / 2) < ε ? 0 : F / Math.pow(t(φ), n); | |
return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ]; | |
} | |
forward.invert = function(x, y) { | |
var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y); | |
return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - π / 2 ]; | |
}; | |
return forward; | |
} | |
(d3.geo.conicConformal = function() { | |
return d3_geo_conic(d3_geo_conicConformal); | |
}).raw = d3_geo_conicConformal; | |
function d3_geo_conicEquidistant(φ0, φ1) { | |
var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0; | |
if (Math.abs(n) < ε) return d3_geo_equirectangular; | |
function forward(λ, φ) { | |
var ρ = G - φ; | |
return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ]; | |
} | |
forward.invert = function(x, y) { | |
var ρ0_y = G - y; | |
return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ]; | |
}; | |
return forward; | |
} | |
(d3.geo.conicEquidistant = function() { | |
return d3_geo_conic(d3_geo_conicEquidistant); | |
}).raw = d3_geo_conicEquidistant; | |
var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) { | |
return 1 / cosλcosφ; | |
}, Math.atan); | |
(d3.geo.gnomonic = function() { | |
return d3_geo_projection(d3_geo_gnomonic); | |
}).raw = d3_geo_gnomonic; | |
function d3_geo_mercator(λ, φ) { | |
return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ]; | |
} | |
d3_geo_mercator.invert = function(x, y) { | |
return [ x, 2 * Math.atan(Math.exp(y)) - π / 2 ]; | |
}; | |
function d3_geo_mercatorProjection(project) { | |
var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto; | |
m.scale = function() { | |
var v = scale.apply(m, arguments); | |
return v === m ? clipAuto ? m.clipExtent(null) : m : v; | |
}; | |
m.translate = function() { | |
var v = translate.apply(m, arguments); | |
return v === m ? clipAuto ? m.clipExtent(null) : m : v; | |
}; | |
m.clipExtent = function(_) { | |
var v = clipExtent.apply(m, arguments); | |
if (v === m) { | |
if (clipAuto = _ == null) { | |
var k = π * scale(), t = translate(); | |
clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]); | |
} | |
} else if (clipAuto) { | |
v = null; | |
} | |
return v; | |
}; | |
return m.clipExtent(null); | |
} | |
(d3.geo.mercator = function() { | |
return d3_geo_mercatorProjection(d3_geo_mercator); | |
}).raw = d3_geo_mercator; | |
var d3_geo_orthographic = d3_geo_azimuthal(function() { | |
return 1; | |
}, Math.asin); | |
(d3.geo.orthographic = function() { | |
return d3_geo_projection(d3_geo_orthographic); | |
}).raw = d3_geo_orthographic; | |
var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) { | |
return 1 / (1 + cosλcosφ); | |
}, function(ρ) { | |
return 2 * Math.atan(ρ); | |
}); | |
(d3.geo.stereographic = function() { | |
return d3_geo_projection(d3_geo_stereographic); | |
}).raw = d3_geo_stereographic; | |
function d3_geo_transverseMercator(λ, φ) { | |
var B = Math.cos(φ) * Math.sin(λ); | |
return [ Math.log((1 + B) / (1 - B)) / 2, Math.atan2(Math.tan(φ), Math.cos(λ)) ]; | |
} | |
d3_geo_transverseMercator.invert = function(x, y) { | |
return [ Math.atan2(d3_sinh(x), Math.cos(y)), d3_asin(Math.sin(y) / d3_cosh(x)) ]; | |
}; | |
(d3.geo.transverseMercator = function() { | |
return d3_geo_mercatorProjection(d3_geo_transverseMercator); | |
}).raw = d3_geo_transverseMercator; | |
d3.geom = {}; | |
d3.svg = {}; | |
function d3_svg_line(projection) { | |
var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7; | |
function line(data) { | |
var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y); | |
function segment() { | |
segments.push("M", interpolate(projection(points), tension)); | |
} | |
while (++i < n) { | |
if (defined.call(this, d = data[i], i)) { | |
points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]); | |
} else if (points.length) { | |
segment(); | |
points = []; | |
} | |
} | |
if (points.length) segment(); | |
return segments.length ? segments.join("") : null; | |
} | |
line.x = function(_) { | |
if (!arguments.length) return x; | |
x = _; | |
return line; | |
}; | |
line.y = function(_) { | |
if (!arguments.length) return y; | |
y = _; | |
return line; | |
}; | |
line.defined = function(_) { | |
if (!arguments.length) return defined; | |
defined = _; | |
return line; | |
}; | |
line.interpolate = function(_) { | |
if (!arguments.length) return interpolateKey; | |
if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; | |
return line; | |
}; | |
line.tension = function(_) { | |
if (!arguments.length) return tension; | |
tension = _; | |
return line; | |
}; | |
return line; | |
} | |
d3.svg.line = function() { | |
return d3_svg_line(d3_identity); | |
}; | |
function d3_svg_lineX(d) { | |
return d[0]; | |
} | |
function d3_svg_lineY(d) { | |
return d[1]; | |
} | |
var d3_svg_lineInterpolators = d3.map({ | |
linear: d3_svg_lineLinear, | |
"linear-closed": d3_svg_lineLinearClosed, | |
step: d3_svg_lineStep, | |
"step-before": d3_svg_lineStepBefore, | |
"step-after": d3_svg_lineStepAfter, | |
basis: d3_svg_lineBasis, | |
"basis-open": d3_svg_lineBasisOpen, | |
"basis-closed": d3_svg_lineBasisClosed, | |
bundle: d3_svg_lineBundle, | |
cardinal: d3_svg_lineCardinal, | |
"cardinal-open": d3_svg_lineCardinalOpen, | |
"cardinal-closed": d3_svg_lineCardinalClosed, | |
monotone: d3_svg_lineMonotone | |
}); | |
d3_svg_lineInterpolators.forEach(function(key, value) { | |
value.key = key; | |
value.closed = /-closed$/.test(key); | |
}); | |
function d3_svg_lineLinear(points) { | |
return points.join("L"); | |
} | |
function d3_svg_lineLinearClosed(points) { | |
return d3_svg_lineLinear(points) + "Z"; | |
} | |
function d3_svg_lineStep(points) { | |
var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; | |
while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]); | |
if (n > 1) path.push("H", p[0]); | |
return path.join(""); | |
} | |
function d3_svg_lineStepBefore(points) { | |
var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; | |
while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]); | |
return path.join(""); | |
} | |
function d3_svg_lineStepAfter(points) { | |
var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ]; | |
while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]); | |
return path.join(""); | |
} | |
function d3_svg_lineCardinalOpen(points, tension) { | |
return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension)); | |
} | |
function d3_svg_lineCardinalClosed(points, tension) { | |
return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), | |
points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension)); | |
} | |
function d3_svg_lineCardinal(points, tension) { | |
return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension)); | |
} | |
function d3_svg_lineHermite(points, tangents) { | |
if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) { | |
return d3_svg_lineLinear(points); | |
} | |
var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1; | |
if (quad) { | |
path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1]; | |
p0 = points[1]; | |
pi = 2; | |
} | |
if (tangents.length > 1) { | |
t = tangents[1]; | |
p = points[pi]; | |
pi++; | |
path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; | |
for (var i = 2; i < tangents.length; i++, pi++) { | |
p = points[pi]; | |
t = tangents[i]; | |
path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1]; | |
} | |
} | |
if (quad) { | |
var lp = points[pi]; | |
path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1]; | |
} | |
return path; | |
} | |
function d3_svg_lineCardinalTangents(points, tension) { | |
var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length; | |
while (++i < n) { | |
p0 = p1; | |
p1 = p2; | |
p2 = points[i]; | |
tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]); | |
} | |
return tangents; | |
} | |
function d3_svg_lineBasis(points) { | |
if (points.length < 3) return d3_svg_lineLinear(points); | |
var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; | |
points.push(points[n - 1]); | |
while (++i <= n) { | |
pi = points[i]; | |
px.shift(); | |
px.push(pi[0]); | |
py.shift(); | |
py.push(pi[1]); | |
d3_svg_lineBasisBezier(path, px, py); | |
} | |
points.pop(); | |
path.push("L", pi); | |
return path.join(""); | |
} | |
function d3_svg_lineBasisOpen(points) { | |
if (points.length < 4) return d3_svg_lineLinear(points); | |
var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ]; | |
while (++i < 3) { | |
pi = points[i]; | |
px.push(pi[0]); | |
py.push(pi[1]); | |
} | |
path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)); | |
--i; | |
while (++i < n) { | |
pi = points[i]; | |
px.shift(); | |
px.push(pi[0]); | |
py.shift(); | |
py.push(pi[1]); | |
d3_svg_lineBasisBezier(path, px, py); | |
} | |
return path.join(""); | |
} | |
function d3_svg_lineBasisClosed(points) { | |
var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = []; | |
while (++i < 4) { | |
pi = points[i % n]; | |
px.push(pi[0]); | |
py.push(pi[1]); | |
} | |
path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ]; | |
--i; | |
while (++i < m) { | |
pi = points[i % n]; | |
px.shift(); | |
px.push(pi[0]); | |
py.shift(); | |
py.push(pi[1]); | |
d3_svg_lineBasisBezier(path, px, py); | |
} | |
return path.join(""); | |
} | |
function d3_svg_lineBundle(points, tension) { | |
var n = points.length - 1; | |
if (n) { | |
var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t; | |
while (++i <= n) { | |
p = points[i]; | |
t = i / n; | |
p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx); | |
p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy); | |
} | |
} | |
return d3_svg_lineBasis(points); | |
} | |
function d3_svg_lineDot4(a, b) { | |
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; | |
} | |
var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ]; | |
function d3_svg_lineBasisBezier(path, x, y) { | |
path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y)); | |
} | |
function d3_svg_lineSlope(p0, p1) { | |
return (p1[1] - p0[1]) / (p1[0] - p0[0]); | |
} | |
function d3_svg_lineFiniteDifferences(points) { | |
var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1); | |
while (++i < j) { | |
m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2; | |
} | |
m[i] = d; | |
return m; | |
} | |
function d3_svg_lineMonotoneTangents(points) { | |
var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1; | |
while (++i < j) { | |
d = d3_svg_lineSlope(points[i], points[i + 1]); | |
if (Math.abs(d) < 1e-6) { | |
m[i] = m[i + 1] = 0; | |
} else { | |
a = m[i] / d; | |
b = m[i + 1] / d; | |
s = a * a + b * b; | |
if (s > 9) { | |
s = d * 3 / Math.sqrt(s); | |
m[i] = s * a; | |
m[i + 1] = s * b; | |
} | |
} | |
} | |
i = -1; | |
while (++i <= j) { | |
s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i])); | |
tangents.push([ s || 0, m[i] * s || 0 ]); | |
} | |
return tangents; | |
} | |
function d3_svg_lineMonotone(points) { | |
return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points)); | |
} | |
d3.geom.hull = function(vertices) { | |
var x = d3_svg_lineX, y = d3_svg_lineY; | |
if (arguments.length) return hull(vertices); | |
function hull(data) { | |
if (data.length < 3) return []; | |
var fx = d3_functor(x), fy = d3_functor(y), n = data.length, vertices, plen = n - 1, points = [], stack = [], d, i, j, h = 0, x1, y1, x2, y2, u, v, a, sp; | |
if (fx === d3_svg_lineX && y === d3_svg_lineY) vertices = data; else for (i = 0, | |
vertices = []; i < n; ++i) { | |
vertices.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]); | |
} | |
for (i = 1; i < n; ++i) { | |
if (vertices[i][1] < vertices[h][1] || vertices[i][1] == vertices[h][1] && vertices[i][0] < vertices[h][0]) h = i; | |
} | |
for (i = 0; i < n; ++i) { | |
if (i === h) continue; | |
y1 = vertices[i][1] - vertices[h][1]; | |
x1 = vertices[i][0] - vertices[h][0]; | |
points.push({ | |
angle: Math.atan2(y1, x1), | |
index: i | |
}); | |
} | |
points.sort(function(a, b) { | |
return a.angle - b.angle; | |
}); | |
a = points[0].angle; | |
v = points[0].index; | |
u = 0; | |
for (i = 1; i < plen; ++i) { | |
j = points[i].index; | |
if (a == points[i].angle) { | |
x1 = vertices[v][0] - vertices[h][0]; | |
y1 = vertices[v][1] - vertices[h][1]; | |
x2 = vertices[j][0] - vertices[h][0]; | |
y2 = vertices[j][1] - vertices[h][1]; | |
if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) { | |
points[i].index = -1; | |
continue; | |
} else { | |
points[u].index = -1; | |
} | |
} | |
a = points[i].angle; | |
u = i; | |
v = j; | |
} | |
stack.push(h); | |
for (i = 0, j = 0; i < 2; ++j) { | |
if (points[j].index > -1) { | |
stack.push(points[j].index); | |
i++; | |
} | |
} | |
sp = stack.length; | |
for (;j < plen; ++j) { | |
if (points[j].index < 0) continue; | |
while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) { | |
--sp; | |
} | |
stack[sp++] = points[j].index; | |
} | |
var poly = []; | |
for (i = sp - 1; i >= 0; --i) poly.push(data[stack[i]]); | |
return poly; | |
} | |
hull.x = function(_) { | |
return arguments.length ? (x = _, hull) : x; | |
}; | |
hull.y = function(_) { | |
return arguments.length ? (y = _, hull) : y; | |
}; | |
return hull; | |
}; | |
function d3_geom_hullCCW(i1, i2, i3, v) { | |
var t, a, b, c, d, e, f; | |
t = v[i1]; | |
a = t[0]; | |
b = t[1]; | |
t = v[i2]; | |
c = t[0]; | |
d = t[1]; | |
t = v[i3]; | |
e = t[0]; | |
f = t[1]; | |
return (f - b) * (c - a) - (d - b) * (e - a) > 0; | |
} | |
d3.geom.polygon = function(coordinates) { | |
d3_subclass(coordinates, d3_geom_polygonPrototype); | |
return coordinates; | |
}; | |
var d3_geom_polygonPrototype = d3.geom.polygon.prototype = []; | |
d3_geom_polygonPrototype.area = function() { | |
var i = -1, n = this.length, a, b = this[n - 1], area = 0; | |
while (++i < n) { | |
a = b; | |
b = this[i]; | |
area += a[1] * b[0] - a[0] * b[1]; | |
} | |
return area * .5; | |
}; | |
d3_geom_polygonPrototype.centroid = function(k) { | |
var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c; | |
if (!arguments.length) k = -1 / (6 * this.area()); | |
while (++i < n) { | |
a = b; | |
b = this[i]; | |
c = a[0] * b[1] - b[0] * a[1]; | |
x += (a[0] + b[0]) * c; | |
y += (a[1] + b[1]) * c; | |
} | |
return [ x * k, y * k ]; | |
}; | |
d3_geom_polygonPrototype.clip = function(subject) { | |
var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d; | |
while (++i < n) { | |
input = subject.slice(); | |
subject.length = 0; | |
b = this[i]; | |
c = input[(m = input.length - closed) - 1]; | |
j = -1; | |
while (++j < m) { | |
d = input[j]; | |
if (d3_geom_polygonInside(d, a, b)) { | |
if (!d3_geom_polygonInside(c, a, b)) { | |
subject.push(d3_geom_polygonIntersect(c, d, a, b)); | |
} | |
subject.push(d); | |
} else if (d3_geom_polygonInside(c, a, b)) { | |
subject.push(d3_geom_polygonIntersect(c, d, a, b)); | |
} | |
c = d; | |
} | |
if (closed) subject.push(subject[0]); | |
a = b; | |
} | |
return subject; | |
}; | |
function d3_geom_polygonInside(p, a, b) { | |
return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]); | |
} | |
function d3_geom_polygonIntersect(c, d, a, b) { | |
var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21); | |
return [ x1 + ua * x21, y1 + ua * y21 ]; | |
} | |
function d3_geom_polygonClosed(coordinates) { | |
var a = coordinates[0], b = coordinates[coordinates.length - 1]; | |
return !(a[0] - b[0] || a[1] - b[1]); | |
} | |
d3.geom.delaunay = function(vertices) { | |
var edges = vertices.map(function() { | |
return []; | |
}), triangles = []; | |
d3_geom_voronoiTessellate(vertices, function(e) { | |
edges[e.region.l.index].push(vertices[e.region.r.index]); | |
}); | |
edges.forEach(function(edge, i) { | |
var v = vertices[i], cx = v[0], cy = v[1]; | |
edge.forEach(function(v) { | |
v.angle = Math.atan2(v[0] - cx, v[1] - cy); | |
}); | |
edge.sort(function(a, b) { | |
return a.angle - b.angle; | |
}); | |
for (var j = 0, m = edge.length - 1; j < m; j++) { | |
triangles.push([ v, edge[j], edge[j + 1] ]); | |
} | |
}); | |
return triangles; | |
}; | |
d3.geom.voronoi = function(points) { | |
var x = d3_svg_lineX, y = d3_svg_lineY, clipPolygon = null; | |
if (arguments.length) return voronoi(points); | |
function voronoi(data) { | |
var points, polygons = data.map(function() { | |
return []; | |
}), fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length, Z = 1e6; | |
if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (points = new Array(n), | |
i = 0; i < n; ++i) { | |
points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]; | |
} | |
d3_geom_voronoiTessellate(points, function(e) { | |
var s1, s2, x1, x2, y1, y2; | |
if (e.a === 1 && e.b >= 0) { | |
s1 = e.ep.r; | |
s2 = e.ep.l; | |
} else { | |
s1 = e.ep.l; | |
s2 = e.ep.r; | |
} | |
if (e.a === 1) { | |
y1 = s1 ? s1.y : -Z; | |
x1 = e.c - e.b * y1; | |
y2 = s2 ? s2.y : Z; | |
x2 = e.c - e.b * y2; | |
} else { | |
x1 = s1 ? s1.x : -Z; | |
y1 = e.c - e.a * x1; | |
x2 = s2 ? s2.x : Z; | |
y2 = e.c - e.a * x2; | |
} | |
var v1 = [ x1, y1 ], v2 = [ x2, y2 ]; | |
polygons[e.region.l.index].push(v1, v2); | |
polygons[e.region.r.index].push(v1, v2); | |
}); | |
polygons = polygons.map(function(polygon, i) { | |
var cx = points[i][0], cy = points[i][1], angle = polygon.map(function(v) { | |
return Math.atan2(v[0] - cx, v[1] - cy); | |
}), order = d3.range(polygon.length).sort(function(a, b) { | |
return angle[a] - angle[b]; | |
}); | |
return order.filter(function(d, i) { | |
return !i || angle[d] - angle[order[i - 1]] > ε; | |
}).map(function(d) { | |
return polygon[d]; | |
}); | |
}); | |
polygons.forEach(function(polygon, i) { | |
var n = polygon.length; | |
if (!n) return polygon.push([ -Z, -Z ], [ -Z, Z ], [ Z, Z ], [ Z, -Z ]); | |
if (n > 2) return; | |
var p0 = points[i], p1 = polygon[0], p2 = polygon[1], x0 = p0[0], y0 = p0[1], x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1], dx = Math.abs(x2 - x1), dy = y2 - y1; | |
if (Math.abs(dy) < ε) { | |
var y = y0 < y1 ? -Z : Z; | |
polygon.push([ -Z, y ], [ Z, y ]); | |
} else if (dx < ε) { | |
var x = x0 < x1 ? -Z : Z; | |
polygon.push([ x, -Z ], [ x, Z ]); | |
} else { | |
var y = (x2 - x1) * (y1 - y0) < (x1 - x0) * (y2 - y1) ? Z : -Z, z = Math.abs(dy) - dx; | |
if (Math.abs(z) < ε) { | |
polygon.push([ dy < 0 ? y : -y, y ]); | |
} else { | |
if (z > 0) y *= -1; | |
polygon.push([ -Z, y ], [ Z, y ]); | |
} | |
} | |
}); | |
if (clipPolygon) for (i = 0; i < n; ++i) clipPolygon.clip(polygons[i]); | |
for (i = 0; i < n; ++i) polygons[i].point = data[i]; | |
return polygons; | |
} | |
voronoi.x = function(_) { | |
return arguments.length ? (x = _, voronoi) : x; | |
}; | |
voronoi.y = function(_) { | |
return arguments.length ? (y = _, voronoi) : y; | |
}; | |
voronoi.clipExtent = function(_) { | |
if (!arguments.length) return clipPolygon && [ clipPolygon[0], clipPolygon[2] ]; | |
if (_ == null) clipPolygon = null; else { | |
var x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], y2 = +_[1][1]; | |
clipPolygon = d3.geom.polygon([ [ x1, y1 ], [ x1, y2 ], [ x2, y2 ], [ x2, y1 ] ]); | |
} | |
return voronoi; | |
}; | |
voronoi.size = function(_) { | |
if (!arguments.length) return clipPolygon && clipPolygon[2]; | |
return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]); | |
}; | |
voronoi.links = function(data) { | |
var points, graph = data.map(function() { | |
return []; | |
}), links = [], fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length; | |
if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (points = new Array(n), | |
i = 0; i < n; ++i) { | |
points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]; | |
} | |
d3_geom_voronoiTessellate(points, function(e) { | |
var l = e.region.l.index, r = e.region.r.index; | |
if (graph[l][r]) return; | |
graph[l][r] = graph[r][l] = true; | |
links.push({ | |
source: data[l], | |
target: data[r] | |
}); | |
}); | |
return links; | |
}; | |
voronoi.triangles = function(data) { | |
if (x === d3_svg_lineX && y === d3_svg_lineY) return d3.geom.delaunay(data); | |
var points = new Array(n), fx = d3_functor(x), fy = d3_functor(y), d, i = -1, n = data.length; | |
while (++i < n) { | |
(points[i] = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]).data = d; | |
} | |
return d3.geom.delaunay(points).map(function(triangle) { | |
return triangle.map(function(point) { | |
return point.data; | |
}); | |
}); | |
}; | |
return voronoi; | |
}; | |
var d3_geom_voronoiOpposite = { | |
l: "r", | |
r: "l" | |
}; | |
function d3_geom_voronoiTessellate(points, callback) { | |
var Sites = { | |
list: points.map(function(v, i) { | |
return { | |
index: i, | |
x: v[0], | |
y: v[1] | |
}; | |
}).sort(function(a, b) { | |
return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0; | |
}), | |
bottomSite: null | |
}; | |
var EdgeList = { | |
list: [], | |
leftEnd: null, | |
rightEnd: null, | |
init: function() { | |
EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l"); | |
EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l"); | |
EdgeList.leftEnd.r = EdgeList.rightEnd; | |
EdgeList.rightEnd.l = EdgeList.leftEnd; | |
EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd); | |
}, | |
createHalfEdge: function(edge, side) { | |
return { | |
edge: edge, | |
side: side, | |
vertex: null, | |
l: null, | |
r: null | |
}; | |
}, | |
insert: function(lb, he) { | |
he.l = lb; | |
he.r = lb.r; | |
lb.r.l = he; | |
lb.r = he; | |
}, | |
leftBound: function(p) { | |
var he = EdgeList.leftEnd; | |
do { | |
he = he.r; | |
} while (he != EdgeList.rightEnd && Geom.rightOf(he, p)); | |
he = he.l; | |
return he; | |
}, | |
del: function(he) { | |
he.l.r = he.r; | |
he.r.l = he.l; | |
he.edge = null; | |
}, | |
right: function(he) { | |
return he.r; | |
}, | |
left: function(he) { | |
return he.l; | |
}, | |
leftRegion: function(he) { | |
return he.edge == null ? Sites.bottomSite : he.edge.region[he.side]; | |
}, | |
rightRegion: function(he) { | |
return he.edge == null ? Sites.bottomSite : he.edge.region[d3_geom_voronoiOpposite[he.side]]; | |
} | |
}; | |
var Geom = { | |
bisect: function(s1, s2) { | |
var newEdge = { | |
region: { | |
l: s1, | |
r: s2 | |
}, | |
ep: { | |
l: null, | |
r: null | |
} | |
}; | |
var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy; | |
newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5; | |
if (adx > ady) { | |
newEdge.a = 1; | |
newEdge.b = dy / dx; | |
newEdge.c /= dx; | |
} else { | |
newEdge.b = 1; | |
newEdge.a = dx / dy; | |
newEdge.c /= dy; | |
} | |
return newEdge; | |
}, | |
intersect: function(el1, el2) { | |
var e1 = el1.edge, e2 = el2.edge; | |
if (!e1 || !e2 || e1.region.r == e2.region.r) { | |
return null; | |
} | |
var d = e1.a * e2.b - e1.b * e2.a; | |
if (Math.abs(d) < 1e-10) { | |
return null; | |
} | |
var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e; | |
if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) { | |
el = el1; | |
e = e1; | |
} else { | |
el = el2; | |
e = e2; | |
} | |
var rightOfSite = xint >= e.region.r.x; | |
if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") { | |
return null; | |
} | |
return { | |
x: xint, | |
y: yint | |
}; | |
}, | |
rightOf: function(he, p) { | |
var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x; | |
if (rightOfSite && he.side === "l") { | |
return 1; | |
} | |
if (!rightOfSite && he.side === "r") { | |
return 0; | |
} | |
if (e.a === 1) { | |
var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0; | |
if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) { | |
above = fast = dyp >= e.b * dxp; | |
} else { | |
above = p.x + p.y * e.b > e.c; | |
if (e.b < 0) { | |
above = !above; | |
} | |
if (!above) { | |
fast = 1; | |
} | |
} | |
if (!fast) { | |
var dxs = topsite.x - e.region.l.x; | |
above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b); | |
if (e.b < 0) { | |
above = !above; | |
} | |
} | |
} else { | |
var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y; | |
above = t1 * t1 > t2 * t2 + t3 * t3; | |
} | |
return he.side === "l" ? above : !above; | |
}, | |
endPoint: function(edge, side, site) { | |
edge.ep[side] = site; | |
if (!edge.ep[d3_geom_voronoiOpposite[side]]) return; | |
callback(edge); | |
}, | |
distance: function(s, t) { | |
var dx = s.x - t.x, dy = s.y - t.y; | |
return Math.sqrt(dx * dx + dy * dy); | |
} | |
}; | |
var EventQueue = { | |
list: [], | |
insert: function(he, site, offset) { | |
he.vertex = site; | |
he.ystar = site.y + offset; | |
for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) { | |
var next = list[i]; | |
if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) { | |
continue; | |
} else { | |
break; | |
} | |
} | |
list.splice(i, 0, he); | |
}, | |
del: function(he) { | |
for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {} | |
ls.splice(i, 1); | |
}, | |
empty: function() { | |
return EventQueue.list.length === 0; | |
}, | |
nextEvent: function(he) { | |
for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) { | |
if (ls[i] == he) return ls[i + 1]; | |
} | |
return null; | |
}, | |
min: function() { | |
var elem = EventQueue.list[0]; | |
return { | |
x: elem.vertex.x, | |
y: elem.ystar | |
}; | |
}, | |
extractMin: function() { | |
return EventQueue.list.shift(); | |
} | |
}; | |
EdgeList.init(); | |
Sites.bottomSite = Sites.list.shift(); | |
var newSite = Sites.list.shift(), newIntStar; | |
var lbnd, rbnd, llbnd, rrbnd, bisector; | |
var bot, top, temp, p, v; | |
var e, pm; | |
while (true) { | |
if (!EventQueue.empty()) { | |
newIntStar = EventQueue.min(); | |
} | |
if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) { | |
lbnd = EdgeList.leftBound(newSite); | |
rbnd = EdgeList.right(lbnd); | |
bot = EdgeList.rightRegion(lbnd); | |
e = Geom.bisect(bot, newSite); | |
bisector = EdgeList.createHalfEdge(e, "l"); | |
EdgeList.insert(lbnd, bisector); | |
p = Geom.intersect(lbnd, bisector); | |
if (p) { | |
EventQueue.del(lbnd); | |
EventQueue.insert(lbnd, p, Geom.distance(p, newSite)); | |
} | |
lbnd = bisector; | |
bisector = EdgeList.createHalfEdge(e, "r"); | |
EdgeList.insert(lbnd, bisector); | |
p = Geom.intersect(bisector, rbnd); | |
if (p) { | |
EventQueue.insert(bisector, p, Geom.distance(p, newSite)); | |
} | |
newSite = Sites.list.shift(); | |
} else if (!EventQueue.empty()) { | |
lbnd = EventQueue.extractMin(); | |
llbnd = EdgeList.left(lbnd); | |
rbnd = EdgeList.right(lbnd); | |
rrbnd = EdgeList.right(rbnd); | |
bot = EdgeList.leftRegion(lbnd); | |
top = EdgeList.rightRegion(rbnd); | |
v = lbnd.vertex; | |
Geom.endPoint(lbnd.edge, lbnd.side, v); | |
Geom.endPoint(rbnd.edge, rbnd.side, v); | |
EdgeList.del(lbnd); | |
EventQueue.del(rbnd); | |
EdgeList.del(rbnd); | |
pm = "l"; | |
if (bot.y > top.y) { | |
temp = bot; | |
bot = top; | |
top = temp; | |
pm = "r"; | |
} | |
e = Geom.bisect(bot, top); | |
bisector = EdgeList.createHalfEdge(e, pm); | |
EdgeList.insert(llbnd, bisector); | |
Geom.endPoint(e, d3_geom_voronoiOpposite[pm], v); | |
p = Geom.intersect(llbnd, bisector); | |
if (p) { | |
EventQueue.del(llbnd); | |
EventQueue.insert(llbnd, p, Geom.distance(p, bot)); | |
} | |
p = Geom.intersect(bisector, rrbnd); | |
if (p) { | |
EventQueue.insert(bisector, p, Geom.distance(p, bot)); | |
} | |
} else { | |
break; | |
} | |
} | |
for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) { | |
callback(lbnd.edge); | |
} | |
} | |
d3.geom.quadtree = function(points, x1, y1, x2, y2) { | |
var x = d3_svg_lineX, y = d3_svg_lineY, compat; | |
if (compat = arguments.length) { | |
x = d3_geom_quadtreeCompatX; | |
y = d3_geom_quadtreeCompatY; | |
if (compat === 3) { | |
y2 = y1; | |
x2 = x1; | |
y1 = x1 = 0; | |
} | |
return quadtree(points); | |
} | |
function quadtree(data) { | |
var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_; | |
if (x1 != null) { | |
x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2; | |
} else { | |
x2_ = y2_ = -(x1_ = y1_ = Infinity); | |
xs = [], ys = []; | |
n = data.length; | |
if (compat) for (i = 0; i < n; ++i) { | |
d = data[i]; | |
if (d.x < x1_) x1_ = d.x; | |
if (d.y < y1_) y1_ = d.y; | |
if (d.x > x2_) x2_ = d.x; | |
if (d.y > y2_) y2_ = d.y; | |
xs.push(d.x); | |
ys.push(d.y); | |
} else for (i = 0; i < n; ++i) { | |
var x_ = +fx(d = data[i], i), y_ = +fy(d, i); | |
if (x_ < x1_) x1_ = x_; | |
if (y_ < y1_) y1_ = y_; | |
if (x_ > x2_) x2_ = x_; | |
if (y_ > y2_) y2_ = y_; | |
xs.push(x_); | |
ys.push(y_); | |
} | |
} | |
var dx = x2_ - x1_, dy = y2_ - y1_; | |
if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy; | |
function insert(n, d, x, y, x1, y1, x2, y2) { | |
if (isNaN(x) || isNaN(y)) return; | |
if (n.leaf) { | |
var nx = n.x, ny = n.y; | |
if (nx != null) { | |
if (Math.abs(nx - x) + Math.abs(ny - y) < .01) { | |
insertChild(n, d, x, y, x1, y1, x2, y2); | |
} else { | |
var nPoint = n.point; | |
n.x = n.y = n.point = null; | |
insertChild(n, nPoint, nx, ny, x1, y1, x2, y2); | |
insertChild(n, d, x, y, x1, y1, x2, y2); | |
} | |
} else { | |
n.x = x, n.y = y, n.point = d; | |
} | |
} else { | |
insertChild(n, d, x, y, x1, y1, x2, y2); | |
} | |
} | |
function insertChild(n, d, x, y, x1, y1, x2, y2) { | |
var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = x >= sx, bottom = y >= sy, i = (bottom << 1) + right; | |
n.leaf = false; | |
n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode()); | |
if (right) x1 = sx; else x2 = sx; | |
if (bottom) y1 = sy; else y2 = sy; | |
insert(n, d, x, y, x1, y1, x2, y2); | |
} | |
var root = d3_geom_quadtreeNode(); | |
root.add = function(d) { | |
insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_); | |
}; | |
root.visit = function(f) { | |
d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_); | |
}; | |
i = -1; | |
if (x1 == null) { | |
while (++i < n) { | |
insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_); | |
} | |
--i; | |
} else data.forEach(root.add); | |
xs = ys = data = d = null; | |
return root; | |
} | |
quadtree.x = function(_) { | |
return arguments.length ? (x = _, quadtree) : x; | |
}; | |
quadtree.y = function(_) { | |
return arguments.length ? (y = _, quadtree) : y; | |
}; | |
quadtree.extent = function(_) { | |
if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ]; | |
if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], | |
y2 = +_[1][1]; | |
return quadtree; | |
}; | |
quadtree.size = function(_) { | |
if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ]; | |
if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1]; | |
return quadtree; | |
}; | |
return quadtree; | |
}; | |
function d3_geom_quadtreeCompatX(d) { | |
return d.x; | |
} | |
function d3_geom_quadtreeCompatY(d) { | |
return d.y; | |
} | |
function d3_geom_quadtreeNode() { | |
return { | |
leaf: true, | |
nodes: [], | |
point: null, | |
x: null, | |
y: null | |
}; | |
} | |
function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) { | |
if (!f(node, x1, y1, x2, y2)) { | |
var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes; | |
if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy); | |
if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy); | |
if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2); | |
if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2); | |
} | |
} | |
d3.interpolateRgb = d3_interpolateRgb; | |
function d3_interpolateRgb(a, b) { | |
a = d3.rgb(a); | |
b = d3.rgb(b); | |
var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab; | |
return function(t) { | |
return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t)); | |
}; | |
} | |
d3.interpolateObject = d3_interpolateObject; | |
function d3_interpolateObject(a, b) { | |
var i = {}, c = {}, k; | |
for (k in a) { | |
if (k in b) { | |
i[k] = d3_interpolate(a[k], b[k]); | |
} else { | |
c[k] = a[k]; | |
} | |
} | |
for (k in b) { | |
if (!(k in a)) { | |
c[k] = b[k]; | |
} | |
} | |
return function(t) { | |
for (k in i) c[k] = i[k](t); | |
return c; | |
}; | |
} | |
d3.interpolateNumber = d3_interpolateNumber; | |
function d3_interpolateNumber(a, b) { | |
b -= a = +a; | |
return function(t) { | |
return a + b * t; | |
}; | |
} | |
d3.interpolateString = d3_interpolateString; | |
function d3_interpolateString(a, b) { | |
var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o; | |
a = a + "", b = b + ""; | |
d3_interpolate_number.lastIndex = 0; | |
for (i = 0; m = d3_interpolate_number.exec(b); ++i) { | |
if (m.index) s.push(b.substring(s0, s1 = m.index)); | |
q.push({ | |
i: s.length, | |
x: m[0] | |
}); | |
s.push(null); | |
s0 = d3_interpolate_number.lastIndex; | |
} | |
if (s0 < b.length) s.push(b.substring(s0)); | |
for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) { | |
o = q[i]; | |
if (o.x == m[0]) { | |
if (o.i) { | |
if (s[o.i + 1] == null) { | |
s[o.i - 1] += o.x; | |
s.splice(o.i, 1); | |
for (j = i + 1; j < n; ++j) q[j].i--; | |
} else { | |
s[o.i - 1] += o.x + s[o.i + 1]; | |
s.splice(o.i, 2); | |
for (j = i + 1; j < n; ++j) q[j].i -= 2; | |
} | |
} else { | |
if (s[o.i + 1] == null) { | |
s[o.i] = o.x; | |
} else { | |
s[o.i] = o.x + s[o.i + 1]; | |
s.splice(o.i + 1, 1); | |
for (j = i + 1; j < n; ++j) q[j].i--; | |
} | |
} | |
q.splice(i, 1); | |
n--; | |
i--; | |
} else { | |
o.x = d3_interpolateNumber(parseFloat(m[0]), parseFloat(o.x)); | |
} | |
} | |
while (i < n) { | |
o = q.pop(); | |
if (s[o.i + 1] == null) { | |
s[o.i] = o.x; | |
} else { | |
s[o.i] = o.x + s[o.i + 1]; | |
s.splice(o.i + 1, 1); | |
} | |
n--; | |
} | |
if (s.length === 1) { | |
return s[0] == null ? (o = q[0].x, function(t) { | |
return o(t) + ""; | |
}) : function() { | |
return b; | |
}; | |
} | |
return function(t) { | |
for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t); | |
return s.join(""); | |
}; | |
} | |
var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g; | |
d3.interpolate = d3_interpolate; | |
function d3_interpolate(a, b) { | |
var i = d3.interpolators.length, f; | |
while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ; | |
return f; | |
} | |
d3.interpolators = [ function(a, b) { | |
var t = typeof b; | |
return (t === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_Color ? d3_interpolateRgb : t === "object" ? Array.isArray(b) ? d3_interpolateArray : d3_interpolateObject : d3_interpolateNumber)(a, b); | |
} ]; | |
d3.interpolateArray = d3_interpolateArray; | |
function d3_interpolateArray(a, b) { | |
var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i; | |
for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i])); | |
for (;i < na; ++i) c[i] = a[i]; | |
for (;i < nb; ++i) c[i] = b[i]; | |
return function(t) { | |
for (i = 0; i < n0; ++i) c[i] = x[i](t); | |
return c; | |
}; | |
} | |
var d3_ease_default = function() { | |
return d3_identity; | |
}; | |
var d3_ease = d3.map({ | |
linear: d3_ease_default, | |
poly: d3_ease_poly, | |
quad: function() { | |
return d3_ease_quad; | |
}, | |
cubic: function() { | |
return d3_ease_cubic; | |
}, | |
sin: function() { | |
return d3_ease_sin; | |
}, | |
exp: function() { | |
return d3_ease_exp; | |
}, | |
circle: function() { | |
return d3_ease_circle; | |
}, | |
elastic: d3_ease_elastic, | |
back: d3_ease_back, | |
bounce: function() { | |
return d3_ease_bounce; | |
} | |
}); | |
var d3_ease_mode = d3.map({ | |
"in": d3_identity, | |
out: d3_ease_reverse, | |
"in-out": d3_ease_reflect, | |
"out-in": function(f) { | |
return d3_ease_reflect(d3_ease_reverse(f)); | |
} | |
}); | |
d3.ease = function(name) { | |
var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in"; | |
t = d3_ease.get(t) || d3_ease_default; | |
m = d3_ease_mode.get(m) || d3_identity; | |
return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1)))); | |
}; | |
function d3_ease_clamp(f) { | |
return function(t) { | |
return t <= 0 ? 0 : t >= 1 ? 1 : f(t); | |
}; | |
} | |
function d3_ease_reverse(f) { | |
return function(t) { | |
return 1 - f(1 - t); | |
}; | |
} | |
function d3_ease_reflect(f) { | |
return function(t) { | |
return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t)); | |
}; | |
} | |
function d3_ease_quad(t) { | |
return t * t; | |
} | |
function d3_ease_cubic(t) { | |
return t * t * t; | |
} | |
function d3_ease_cubicInOut(t) { | |
if (t <= 0) return 0; | |
if (t >= 1) return 1; | |
var t2 = t * t, t3 = t2 * t; | |
return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75); | |
} | |
function d3_ease_poly(e) { | |
return function(t) { | |
return Math.pow(t, e); | |
}; | |
} | |
function d3_ease_sin(t) { | |
return 1 - Math.cos(t * π / 2); | |
} | |
function d3_ease_exp(t) { | |
return Math.pow(2, 10 * (t - 1)); | |
} | |
function d3_ease_circle(t) { | |
return 1 - Math.sqrt(1 - t * t); | |
} | |
function d3_ease_elastic(a, p) { | |
var s; | |
if (arguments.length < 2) p = .45; | |
if (arguments.length) s = p / (2 * π) * Math.asin(1 / a); else a = 1, s = p / 4; | |
return function(t) { | |
return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * π / p); | |
}; | |
} | |
function d3_ease_back(s) { | |
if (!s) s = 1.70158; | |
return function(t) { | |
return t * t * ((s + 1) * t - s); | |
}; | |
} | |
function d3_ease_bounce(t) { | |
return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375; | |
} | |
d3.interpolateHcl = d3_interpolateHcl; | |
function d3_interpolateHcl(a, b) { | |
a = d3.hcl(a); | |
b = d3.hcl(b); | |
var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al; | |
if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac; | |
if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; | |
return function(t) { | |
return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + ""; | |
}; | |
} | |
d3.interpolateHsl = d3_interpolateHsl; | |
function d3_interpolateHsl(a, b) { | |
a = d3.hsl(a); | |
b = d3.hsl(b); | |
var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al; | |
if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as; | |
if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; | |
return function(t) { | |
return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + ""; | |
}; | |
} | |
d3.interpolateLab = d3_interpolateLab; | |
function d3_interpolateLab(a, b) { | |
a = d3.lab(a); | |
b = d3.lab(b); | |
var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab; | |
return function(t) { | |
return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + ""; | |
}; | |
} | |
d3.interpolateRound = d3_interpolateRound; | |
function d3_interpolateRound(a, b) { | |
b -= a; | |
return function(t) { | |
return Math.round(a + b * t); | |
}; | |
} | |
d3.transform = function(string) { | |
var g = d3_document.createElementNS(d3.ns.prefix.svg, "g"); | |
return (d3.transform = function(string) { | |
if (string != null) { | |
g.setAttribute("transform", string); | |
var t = g.transform.baseVal.consolidate(); | |
} | |
return new d3_transform(t ? t.matrix : d3_transformIdentity); | |
})(string); | |
}; | |
function d3_transform(m) { | |
var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0; | |
if (r0[0] * r1[1] < r1[0] * r0[1]) { | |
r0[0] *= -1; | |
r0[1] *= -1; | |
kx *= -1; | |
kz *= -1; | |
} | |
this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees; | |
this.translate = [ m.e, m.f ]; | |
this.scale = [ kx, ky ]; | |
this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0; | |
} | |
d3_transform.prototype.toString = function() { | |
return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")"; | |
}; | |
function d3_transformDot(a, b) { | |
return a[0] * b[0] + a[1] * b[1]; | |
} | |
function d3_transformNormalize(a) { | |
var k = Math.sqrt(d3_transformDot(a, a)); | |
if (k) { | |
a[0] /= k; | |
a[1] /= k; | |
} | |
return k; | |
} | |
function d3_transformCombine(a, b, k) { | |
a[0] += k * b[0]; | |
a[1] += k * b[1]; | |
return a; | |
} | |
var d3_transformIdentity = { | |
a: 1, | |
b: 0, | |
c: 0, | |
d: 1, | |
e: 0, | |
f: 0 | |
}; | |
d3.interpolateTransform = d3_interpolateTransform; | |
function d3_interpolateTransform(a, b) { | |
var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale; | |
if (ta[0] != tb[0] || ta[1] != tb[1]) { | |
s.push("translate(", null, ",", null, ")"); | |
q.push({ | |
i: 1, | |
x: d3_interpolateNumber(ta[0], tb[0]) | |
}, { | |
i: 3, | |
x: d3_interpolateNumber(ta[1], tb[1]) | |
}); | |
} else if (tb[0] || tb[1]) { | |
s.push("translate(" + tb + ")"); | |
} else { | |
s.push(""); | |
} | |
if (ra != rb) { | |
if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360; | |
q.push({ | |
i: s.push(s.pop() + "rotate(", null, ")") - 2, | |
x: d3_interpolateNumber(ra, rb) | |
}); | |
} else if (rb) { | |
s.push(s.pop() + "rotate(" + rb + ")"); | |
} | |
if (wa != wb) { | |
q.push({ | |
i: s.push(s.pop() + "skewX(", null, ")") - 2, | |
x: d3_interpolateNumber(wa, wb) | |
}); | |
} else if (wb) { | |
s.push(s.pop() + "skewX(" + wb + ")"); | |
} | |
if (ka[0] != kb[0] || ka[1] != kb[1]) { | |
n = s.push(s.pop() + "scale(", null, ",", null, ")"); | |
q.push({ | |
i: n - 4, | |
x: d3_interpolateNumber(ka[0], kb[0]) | |
}, { | |
i: n - 2, | |
x: d3_interpolateNumber(ka[1], kb[1]) | |
}); | |
} else if (kb[0] != 1 || kb[1] != 1) { | |
s.push(s.pop() + "scale(" + kb + ")"); | |
} | |
n = q.length; | |
return function(t) { | |
var i = -1, o; | |
while (++i < n) s[(o = q[i]).i] = o.x(t); | |
return s.join(""); | |
}; | |
} | |
function d3_uninterpolateNumber(a, b) { | |
b = b - (a = +a) ? 1 / (b - a) : 0; | |
return function(x) { | |
return (x - a) * b; | |
}; | |
} | |
function d3_uninterpolateClamp(a, b) { | |
b = b - (a = +a) ? 1 / (b - a) : 0; | |
return function(x) { | |
return Math.max(0, Math.min(1, (x - a) * b)); | |
}; | |
} | |
d3.layout = {}; | |
d3.layout.bundle = function() { | |
return function(links) { | |
var paths = [], i = -1, n = links.length; | |
while (++i < n) paths.push(d3_layout_bundlePath(links[i])); | |
return paths; | |
}; | |
}; | |
function d3_layout_bundlePath(link) { | |
var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ]; | |
while (start !== lca) { | |
start = start.parent; | |
points.push(start); | |
} | |
var k = points.length; | |
while (end !== lca) { | |
points.splice(k, 0, end); | |
end = end.parent; | |
} | |
return points; | |
} | |
function d3_layout_bundleAncestors(node) { | |
var ancestors = [], parent = node.parent; | |
while (parent != null) { | |
ancestors.push(node); | |
node = parent; | |
parent = parent.parent; | |
} | |
ancestors.push(node); | |
return ancestors; | |
} | |
function d3_layout_bundleLeastCommonAncestor(a, b) { | |
if (a === b) return a; | |
var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null; | |
while (aNode === bNode) { | |
sharedNode = aNode; | |
aNode = aNodes.pop(); | |
bNode = bNodes.pop(); | |
} | |
return sharedNode; | |
} | |
d3.layout.chord = function() { | |
var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords; | |
function relayout() { | |
var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j; | |
chords = []; | |
groups = []; | |
k = 0, i = -1; | |
while (++i < n) { | |
x = 0, j = -1; | |
while (++j < n) { | |
x += matrix[i][j]; | |
} | |
groupSums.push(x); | |
subgroupIndex.push(d3.range(n)); | |
k += x; | |
} | |
if (sortGroups) { | |
groupIndex.sort(function(a, b) { | |
return sortGroups(groupSums[a], groupSums[b]); | |
}); | |
} | |
if (sortSubgroups) { | |
subgroupIndex.forEach(function(d, i) { | |
d.sort(function(a, b) { | |
return sortSubgroups(matrix[i][a], matrix[i][b]); | |
}); | |
}); | |
} | |
k = (2 * π - padding * n) / k; | |
x = 0, i = -1; | |
while (++i < n) { | |
x0 = x, j = -1; | |
while (++j < n) { | |
var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k; | |
subgroups[di + "-" + dj] = { | |
index: di, | |
subindex: dj, | |
startAngle: a0, | |
endAngle: a1, | |
value: v | |
}; | |
} | |
groups[di] = { | |
index: di, | |
startAngle: x0, | |
endAngle: x, | |
value: (x - x0) / k | |
}; | |
x += padding; | |
} | |
i = -1; | |
while (++i < n) { | |
j = i - 1; | |
while (++j < n) { | |
var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i]; | |
if (source.value || target.value) { | |
chords.push(source.value < target.value ? { | |
source: target, | |
target: source | |
} : { | |
source: source, | |
target: target | |
}); | |
} | |
} | |
} | |
if (sortChords) resort(); | |
} | |
function resort() { | |
chords.sort(function(a, b) { | |
return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2); | |
}); | |
} | |
chord.matrix = function(x) { | |
if (!arguments.length) return matrix; | |
n = (matrix = x) && matrix.length; | |
chords = groups = null; | |
return chord; | |
}; | |
chord.padding = function(x) { | |
if (!arguments.length) return padding; | |
padding = x; | |
chords = groups = null; | |
return chord; | |
}; | |
chord.sortGroups = function(x) { | |
if (!arguments.length) return sortGroups; | |
sortGroups = x; | |
chords = groups = null; | |
return chord; | |
}; | |
chord.sortSubgroups = function(x) { | |
if (!arguments.length) return sortSubgroups; | |
sortSubgroups = x; | |
chords = null; | |
return chord; | |
}; | |
chord.sortChords = function(x) { | |
if (!arguments.length) return sortChords; | |
sortChords = x; | |
if (chords) resort(); | |
return chord; | |
}; | |
chord.chords = function() { | |
if (!chords) relayout(); | |
return chords; | |
}; | |
chord.groups = function() { | |
if (!groups) relayout(); | |
return groups; | |
}; | |
return chord; | |
}; | |
d3.layout.force = function() { | |
var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, nodes = [], links = [], distances, strengths, charges; | |
function repulse(node) { | |
return function(quad, x1, _, x2) { | |
if (quad.point !== node) { | |
var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy); | |
if ((x2 - x1) * dn < theta) { | |
var k = quad.charge * dn * dn; | |
node.px -= dx * k; | |
node.py -= dy * k; | |
return true; | |
} | |
if (quad.point && isFinite(dn)) { | |
var k = quad.pointCharge * dn * dn; | |
node.px -= dx * k; | |
node.py -= dy * k; | |
} | |
} | |
return !quad.charge; | |
}; | |
} | |
force.tick = function() { | |
if ((alpha *= .99) < .005) { | |
event.end({ | |
type: "end", | |
alpha: alpha = 0 | |
}); | |
return true; | |
} | |
var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y; | |
for (i = 0; i < m; ++i) { | |
o = links[i]; | |
s = o.source; | |
t = o.target; | |
x = t.x - s.x; | |
y = t.y - s.y; | |
if (l = x * x + y * y) { | |
l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l; | |
x *= l; | |
y *= l; | |
t.x -= x * (k = s.weight / (t.weight + s.weight)); | |
t.y -= y * k; | |
s.x += x * (k = 1 - k); | |
s.y += y * k; | |
} | |
} | |
if (k = alpha * gravity) { | |
x = size[0] / 2; | |
y = size[1] / 2; | |
i = -1; | |
if (k) while (++i < n) { | |
o = nodes[i]; | |
o.x += (x - o.x) * k; | |
o.y += (y - o.y) * k; | |
} | |
} | |
if (charge) { | |
d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges); | |
i = -1; | |
while (++i < n) { | |
if (!(o = nodes[i]).fixed) { | |
q.visit(repulse(o)); | |
} | |
} | |
} | |
i = -1; | |
while (++i < n) { | |
o = nodes[i]; | |
if (o.fixed) { | |
o.x = o.px; | |
o.y = o.py; | |
} else { | |
o.x -= (o.px - (o.px = o.x)) * friction; | |
o.y -= (o.py - (o.py = o.y)) * friction; | |
} | |
} | |
event.tick({ | |
type: "tick", | |
alpha: alpha | |
}); | |
}; | |
force.nodes = function(x) { | |
if (!arguments.length) return nodes; | |
nodes = x; | |
return force; | |
}; | |
force.links = function(x) { | |
if (!arguments.length) return links; | |
links = x; | |
return force; | |
}; | |
force.size = function(x) { | |
if (!arguments.length) return size; | |
size = x; | |
return force; | |
}; | |
force.linkDistance = function(x) { | |
if (!arguments.length) return linkDistance; | |
linkDistance = typeof x === "function" ? x : +x; | |
return force; | |
}; | |
force.distance = force.linkDistance; | |
force.linkStrength = function(x) { | |
if (!arguments.length) return linkStrength; | |
linkStrength = typeof x === "function" ? x : +x; | |
return force; | |
}; | |
force.friction = function(x) { | |
if (!arguments.length) return friction; | |
friction = +x; | |
return force; | |
}; | |
force.charge = function(x) { | |
if (!arguments.length) return charge; | |
charge = typeof x === "function" ? x : +x; | |
return force; | |
}; | |
force.gravity = function(x) { | |
if (!arguments.length) return gravity; | |
gravity = +x; | |
return force; | |
}; | |
force.theta = function(x) { | |
if (!arguments.length) return theta; | |
theta = +x; | |
return force; | |
}; | |
force.alpha = function(x) { | |
if (!arguments.length) return alpha; | |
x = +x; | |
if (alpha) { | |
if (x > 0) alpha = x; else alpha = 0; | |
} else if (x > 0) { | |
event.start({ | |
type: "start", | |
alpha: alpha = x | |
}); | |
d3.timer(force.tick); | |
} | |
return force; | |
}; | |
force.start = function() { | |
var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o; | |
for (i = 0; i < n; ++i) { | |
(o = nodes[i]).index = i; | |
o.weight = 0; | |
} | |
for (i = 0; i < m; ++i) { | |
o = links[i]; | |
if (typeof o.source == "number") o.source = nodes[o.source]; | |
if (typeof o.target == "number") o.target = nodes[o.target]; | |
++o.source.weight; | |
++o.target.weight; | |
} | |
for (i = 0; i < n; ++i) { | |
o = nodes[i]; | |
if (isNaN(o.x)) o.x = position("x", w); | |
if (isNaN(o.y)) o.y = position("y", h); | |
if (isNaN(o.px)) o.px = o.x; | |
if (isNaN(o.py)) o.py = o.y; | |
} | |
distances = []; | |
if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance; | |
strengths = []; | |
if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength; | |
charges = []; | |
if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge; | |
function position(dimension, size) { | |
var neighbors = neighbor(i), j = -1, m = neighbors.length, x; | |
while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x; | |
return Math.random() * size; | |
} | |
function neighbor() { | |
if (!neighbors) { | |
neighbors = []; | |
for (j = 0; j < n; ++j) { | |
neighbors[j] = []; | |
} | |
for (j = 0; j < m; ++j) { | |
var o = links[j]; | |
neighbors[o.source.index].push(o.target); | |
neighbors[o.target.index].push(o.source); | |
} | |
} | |
return neighbors[i]; | |
} | |
return force.resume(); | |
}; | |
force.resume = function() { | |
return force.alpha(.1); | |
}; | |
force.stop = function() { | |
return force.alpha(0); | |
}; | |
force.drag = function() { | |
if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend); | |
if (!arguments.length) return drag; | |
this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag); | |
}; | |
function dragmove(d) { | |
d.px = d3.event.x, d.py = d3.event.y; | |
force.resume(); | |
} | |
return d3.rebind(force, event, "on"); | |
}; | |
function d3_layout_forceDragstart(d) { | |
d.fixed |= 2; | |
} | |
function d3_layout_forceDragend(d) { | |
d.fixed &= ~6; | |
} | |
function d3_layout_forceMouseover(d) { | |
d.fixed |= 4; | |
d.px = d.x, d.py = d.y; | |
} | |
function d3_layout_forceMouseout(d) { | |
d.fixed &= ~4; | |
} | |
function d3_layout_forceAccumulate(quad, alpha, charges) { | |
var cx = 0, cy = 0; | |
quad.charge = 0; | |
if (!quad.leaf) { | |
var nodes = quad.nodes, n = nodes.length, i = -1, c; | |
while (++i < n) { | |
c = nodes[i]; | |
if (c == null) continue; | |
d3_layout_forceAccumulate(c, alpha, charges); | |
quad.charge += c.charge; | |
cx += c.charge * c.cx; | |
cy += c.charge * c.cy; | |
} | |
} | |
if (quad.point) { | |
if (!quad.leaf) { | |
quad.point.x += Math.random() - .5; | |
quad.point.y += Math.random() - .5; | |
} | |
var k = alpha * charges[quad.point.index]; | |
quad.charge += quad.pointCharge = k; | |
cx += k * quad.point.x; | |
cy += k * quad.point.y; | |
} | |
quad.cx = cx / quad.charge; | |
quad.cy = cy / quad.charge; | |
} | |
var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1; | |
d3.layout.hierarchy = function() { | |
var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue; | |
function recurse(node, depth, nodes) { | |
var childs = children.call(hierarchy, node, depth); | |
node.depth = depth; | |
nodes.push(node); | |
if (childs && (n = childs.length)) { | |
var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d; | |
while (++i < n) { | |
d = recurse(childs[i], j, nodes); | |
d.parent = node; | |
c.push(d); | |
v += d.value; | |
} | |
if (sort) c.sort(sort); | |
if (value) node.value = v; | |
} else if (value) { | |
node.value = +value.call(hierarchy, node, depth) || 0; | |
} | |
return node; | |
} | |
function revalue(node, depth) { | |
var children = node.children, v = 0; | |
if (children && (n = children.length)) { | |
var i = -1, n, j = depth + 1; | |
while (++i < n) v += revalue(children[i], j); | |
} else if (value) { | |
v = +value.call(hierarchy, node, depth) || 0; | |
} | |
if (value) node.value = v; | |
return v; | |
} | |
function hierarchy(d) { | |
var nodes = []; | |
recurse(d, 0, nodes); | |
return nodes; | |
} | |
hierarchy.sort = function(x) { | |
if (!arguments.length) return sort; | |
sort = x; | |
return hierarchy; | |
}; | |
hierarchy.children = function(x) { | |
if (!arguments.length) return children; | |
children = x; | |
return hierarchy; | |
}; | |
hierarchy.value = function(x) { | |
if (!arguments.length) return value; | |
value = x; | |
return hierarchy; | |
}; | |
hierarchy.revalue = function(root) { | |
revalue(root, 0); | |
return root; | |
}; | |
return hierarchy; | |
}; | |
function d3_layout_hierarchyRebind(object, hierarchy) { | |
d3.rebind(object, hierarchy, "sort", "children", "value"); | |
object.nodes = object; | |
object.links = d3_layout_hierarchyLinks; | |
return object; | |
} | |
function d3_layout_hierarchyChildren(d) { | |
return d.children; | |
} | |
function d3_layout_hierarchyValue(d) { | |
return d.value; | |
} | |
function d3_layout_hierarchySort(a, b) { | |
return b.value - a.value; | |
} | |
function d3_layout_hierarchyLinks(nodes) { | |
return d3.merge(nodes.map(function(parent) { | |
return (parent.children || []).map(function(child) { | |
return { | |
source: parent, | |
target: child | |
}; | |
}); | |
})); | |
} | |
d3.layout.partition = function() { | |
var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ]; | |
function position(node, x, dx, dy) { | |
var children = node.children; | |
node.x = x; | |
node.y = node.depth * dy; | |
node.dx = dx; | |
node.dy = dy; | |
if (children && (n = children.length)) { | |
var i = -1, n, c, d; | |
dx = node.value ? dx / node.value : 0; | |
while (++i < n) { | |
position(c = children[i], x, d = c.value * dx, dy); | |
x += d; | |
} | |
} | |
} | |
function depth(node) { | |
var children = node.children, d = 0; | |
if (children && (n = children.length)) { | |
var i = -1, n; | |
while (++i < n) d = Math.max(d, depth(children[i])); | |
} | |
return 1 + d; | |
} | |
function partition(d, i) { | |
var nodes = hierarchy.call(this, d, i); | |
position(nodes[0], 0, size[0], size[1] / depth(nodes[0])); | |
return nodes; | |
} | |
partition.size = function(x) { | |
if (!arguments.length) return size; | |
size = x; | |
return partition; | |
}; | |
return d3_layout_hierarchyRebind(partition, hierarchy); | |
}; | |
d3.layout.pie = function() { | |
var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * π; | |
function pie(data) { | |
var values = data.map(function(d, i) { | |
return +value.call(pie, d, i); | |
}); | |
var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle); | |
var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a) / d3.sum(values); | |
var index = d3.range(data.length); | |
if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) { | |
return values[j] - values[i]; | |
} : function(i, j) { | |
return sort(data[i], data[j]); | |
}); | |
var arcs = []; | |
index.forEach(function(i) { | |
var d; | |
arcs[i] = { | |
data: data[i], | |
value: d = values[i], | |
startAngle: a, | |
endAngle: a += d * k | |
}; | |
}); | |
return arcs; | |
} | |
pie.value = function(x) { | |
if (!arguments.length) return value; | |
value = x; | |
return pie; | |
}; | |
pie.sort = function(x) { | |
if (!arguments.length) return sort; | |
sort = x; | |
return pie; | |
}; | |
pie.startAngle = function(x) { | |
if (!arguments.length) return startAngle; | |
startAngle = x; | |
return pie; | |
}; | |
pie.endAngle = function(x) { | |
if (!arguments.length) return endAngle; | |
endAngle = x; | |
return pie; | |
}; | |
return pie; | |
}; | |
var d3_layout_pieSortByValue = {}; | |
d3.layout.stack = function() { | |
var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY; | |
function stack(data, index) { | |
var series = data.map(function(d, i) { | |
return values.call(stack, d, i); | |
}); | |
var points = series.map(function(d) { | |
return d.map(function(v, i) { | |
return [ x.call(stack, v, i), y.call(stack, v, i) ]; | |
}); | |
}); | |
var orders = order.call(stack, points, index); | |
series = d3.permute(series, orders); | |
points = d3.permute(points, orders); | |
var offsets = offset.call(stack, points, index); | |
var n = series.length, m = series[0].length, i, j, o; | |
for (j = 0; j < m; ++j) { | |
out.call(stack, series[0][j], o = offsets[j], points[0][j][1]); | |
for (i = 1; i < n; ++i) { | |
out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]); | |
} | |
} | |
return data; | |
} | |
stack.values = function(x) { | |
if (!arguments.length) return values; | |
values = x; | |
return stack; | |
}; | |
stack.order = function(x) { | |
if (!arguments.length) return order; | |
order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault; | |
return stack; | |
}; | |
stack.offset = function(x) { | |
if (!arguments.length) return offset; | |
offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero; | |
return stack; | |
}; | |
stack.x = function(z) { | |
if (!arguments.length) return x; | |
x = z; | |
return stack; | |
}; | |
stack.y = function(z) { | |
if (!arguments.length) return y; | |
y = z; | |
return stack; | |
}; | |
stack.out = function(z) { | |
if (!arguments.length) return out; | |
out = z; | |
return stack; | |
}; | |
return stack; | |
}; | |
function d3_layout_stackX(d) { | |
return d.x; | |
} | |
function d3_layout_stackY(d) { | |
return d.y; | |
} | |
function d3_layout_stackOut(d, y0, y) { | |
d.y0 = y0; | |
d.y = y; | |
} | |
var d3_layout_stackOrders = d3.map({ | |
"inside-out": function(data) { | |
var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) { | |
return max[a] - max[b]; | |
}), top = 0, bottom = 0, tops = [], bottoms = []; | |
for (i = 0; i < n; ++i) { | |
j = index[i]; | |
if (top < bottom) { | |
top += sums[j]; | |
tops.push(j); | |
} else { | |
bottom += sums[j]; | |
bottoms.push(j); | |
} | |
} | |
return bottoms.reverse().concat(tops); | |
}, | |
reverse: function(data) { | |
return d3.range(data.length).reverse(); | |
}, | |
"default": d3_layout_stackOrderDefault | |
}); | |
var d3_layout_stackOffsets = d3.map({ | |
silhouette: function(data) { | |
var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = []; | |
for (j = 0; j < m; ++j) { | |
for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; | |
if (o > max) max = o; | |
sums.push(o); | |
} | |
for (j = 0; j < m; ++j) { | |
y0[j] = (max - sums[j]) / 2; | |
} | |
return y0; | |
}, | |
wiggle: function(data) { | |
var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = []; | |
y0[0] = o = o0 = 0; | |
for (j = 1; j < m; ++j) { | |
for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1]; | |
for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) { | |
for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) { | |
s3 += (data[k][j][1] - data[k][j - 1][1]) / dx; | |
} | |
s2 += s3 * data[i][j][1]; | |
} | |
y0[j] = o -= s1 ? s2 / s1 * dx : 0; | |
if (o < o0) o0 = o; | |
} | |
for (j = 0; j < m; ++j) y0[j] -= o0; | |
return y0; | |
}, | |
expand: function(data) { | |
var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = []; | |
for (j = 0; j < m; ++j) { | |
for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; | |
if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k; | |
} | |
for (j = 0; j < m; ++j) y0[j] = 0; | |
return y0; | |
}, | |
zero: d3_layout_stackOffsetZero | |
}); | |
function d3_layout_stackOrderDefault(data) { | |
return d3.range(data.length); | |
} | |
function d3_layout_stackOffsetZero(data) { | |
var j = -1, m = data[0].length, y0 = []; | |
while (++j < m) y0[j] = 0; | |
return y0; | |
} | |
function d3_layout_stackMaxIndex(array) { | |
var i = 1, j = 0, v = array[0][1], k, n = array.length; | |
for (;i < n; ++i) { | |
if ((k = array[i][1]) > v) { | |
j = i; | |
v = k; | |
} | |
} | |
return j; | |
} | |
function d3_layout_stackReduceSum(d) { | |
return d.reduce(d3_layout_stackSum, 0); | |
} | |
function d3_layout_stackSum(p, d) { | |
return p + d[1]; | |
} | |
d3.layout.histogram = function() { | |
var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges; | |
function histogram(data, i) { | |
var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x; | |
while (++i < m) { | |
bin = bins[i] = []; | |
bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]); | |
bin.y = 0; | |
} | |
if (m > 0) { | |
i = -1; | |
while (++i < n) { | |
x = values[i]; | |
if (x >= range[0] && x <= range[1]) { | |
bin = bins[d3.bisect(thresholds, x, 1, m) - 1]; | |
bin.y += k; | |
bin.push(data[i]); | |
} | |
} | |
} | |
return bins; | |
} | |
histogram.value = function(x) { | |
if (!arguments.length) return valuer; | |
valuer = x; | |
return histogram; | |
}; | |
histogram.range = function(x) { | |
if (!arguments.length) return ranger; | |
ranger = d3_functor(x); | |
return histogram; | |
}; | |
histogram.bins = function(x) { | |
if (!arguments.length) return binner; | |
binner = typeof x === "number" ? function(range) { | |
return d3_layout_histogramBinFixed(range, x); | |
} : d3_functor(x); | |
return histogram; | |
}; | |
histogram.frequency = function(x) { | |
if (!arguments.length) return frequency; | |
frequency = !!x; | |
return histogram; | |
}; | |
return histogram; | |
}; | |
function d3_layout_histogramBinSturges(range, values) { | |
return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1)); | |
} | |
function d3_layout_histogramBinFixed(range, n) { | |
var x = -1, b = +range[0], m = (range[1] - b) / n, f = []; | |
while (++x <= n) f[x] = m * x + b; | |
return f; | |
} | |
function d3_layout_histogramRange(values) { | |
return [ d3.min(values), d3.max(values) ]; | |
} | |
d3.layout.tree = function() { | |
var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false; | |
function tree(d, i) { | |
var nodes = hierarchy.call(this, d, i), root = nodes[0]; | |
function firstWalk(node, previousSibling) { | |
var children = node.children, layout = node._tree; | |
if (children && (n = children.length)) { | |
var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1; | |
while (++i < n) { | |
child = children[i]; | |
firstWalk(child, previousChild); | |
ancestor = apportion(child, previousChild, ancestor); | |
previousChild = child; | |
} | |
d3_layout_treeShift(node); | |
var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim); | |
if (previousSibling) { | |
layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); | |
layout.mod = layout.prelim - midpoint; | |
} else { | |
layout.prelim = midpoint; | |
} | |
} else { | |
if (previousSibling) { | |
layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); | |
} | |
} | |
} | |
function secondWalk(node, x) { | |
node.x = node._tree.prelim + x; | |
var children = node.children; | |
if (children && (n = children.length)) { | |
var i = -1, n; | |
x += node._tree.mod; | |
while (++i < n) { | |
secondWalk(children[i], x); | |
} | |
} | |
} | |
function apportion(node, previousSibling, ancestor) { | |
if (previousSibling) { | |
var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift; | |
while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) { | |
vom = d3_layout_treeLeft(vom); | |
vop = d3_layout_treeRight(vop); | |
vop._tree.ancestor = node; | |
shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip); | |
if (shift > 0) { | |
d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift); | |
sip += shift; | |
sop += shift; | |
} | |
sim += vim._tree.mod; | |
sip += vip._tree.mod; | |
som += vom._tree.mod; | |
sop += vop._tree.mod; | |
} | |
if (vim && !d3_layout_treeRight(vop)) { | |
vop._tree.thread = vim; | |
vop._tree.mod += sim - sop; | |
} | |
if (vip && !d3_layout_treeLeft(vom)) { | |
vom._tree.thread = vip; | |
vom._tree.mod += sip - som; | |
ancestor = node; | |
} | |
} | |
return ancestor; | |
} | |
d3_layout_treeVisitAfter(root, function(node, previousSibling) { | |
node._tree = { | |
ancestor: node, | |
prelim: 0, | |
mod: 0, | |
change: 0, | |
shift: 0, | |
number: previousSibling ? previousSibling._tree.number + 1 : 0 | |
}; | |
}); | |
firstWalk(root); | |
secondWalk(root, -root._tree.prelim); | |
var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1; | |
d3_layout_treeVisitAfter(root, nodeSize ? function(node) { | |
node.x *= size[0]; | |
node.y = node.depth * size[1]; | |
delete node._tree; | |
} : function(node) { | |
node.x = (node.x - x0) / (x1 - x0) * size[0]; | |
node.y = node.depth / y1 * size[1]; | |
delete node._tree; | |
}); | |
return nodes; | |
} | |
tree.separation = function(x) { | |
if (!arguments.length) return separation; | |
separation = x; | |
return tree; | |
}; | |
tree.size = function(x) { | |
if (!arguments.length) return nodeSize ? null : size; | |
nodeSize = (size = x) == null; | |
return tree; | |
}; | |
tree.nodeSize = function(x) { | |
if (!arguments.length) return nodeSize ? size : null; | |
nodeSize = (size = x) != null; | |
return tree; | |
}; | |
return d3_layout_hierarchyRebind(tree, hierarchy); | |
}; | |
function d3_layout_treeSeparation(a, b) { | |
return a.parent == b.parent ? 1 : 2; | |
} | |
function d3_layout_treeLeft(node) { | |
var children = node.children; | |
return children && children.length ? children[0] : node._tree.thread; | |
} | |
function d3_layout_treeRight(node) { | |
var children = node.children, n; | |
return children && (n = children.length) ? children[n - 1] : node._tree.thread; | |
} | |
function d3_layout_treeSearch(node, compare) { | |
var children = node.children; | |
if (children && (n = children.length)) { | |
var child, n, i = -1; | |
while (++i < n) { | |
if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) { | |
node = child; | |
} | |
} | |
} | |
return node; | |
} | |
function d3_layout_treeRightmost(a, b) { | |
return a.x - b.x; | |
} | |
function d3_layout_treeLeftmost(a, b) { | |
return b.x - a.x; | |
} | |
function d3_layout_treeDeepest(a, b) { | |
return a.depth - b.depth; | |
} | |
function d3_layout_treeVisitAfter(node, callback) { | |
function visit(node, previousSibling) { | |
var children = node.children; | |
if (children && (n = children.length)) { | |
var child, previousChild = null, i = -1, n; | |
while (++i < n) { | |
child = children[i]; | |
visit(child, previousChild); | |
previousChild = child; | |
} | |
} | |
callback(node, previousSibling); | |
} | |
visit(node, null); | |
} | |
function d3_layout_treeShift(node) { | |
var shift = 0, change = 0, children = node.children, i = children.length, child; | |
while (--i >= 0) { | |
child = children[i]._tree; | |
child.prelim += shift; | |
child.mod += shift; | |
shift += child.shift + (change += child.change); | |
} | |
} | |
function d3_layout_treeMove(ancestor, node, shift) { | |
ancestor = ancestor._tree; | |
node = node._tree; | |
var change = shift / (node.number - ancestor.number); | |
ancestor.change += change; | |
node.change -= change; | |
node.shift += shift; | |
node.prelim += shift; | |
node.mod += shift; | |
} | |
function d3_layout_treeAncestor(vim, node, ancestor) { | |
return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor; | |
} | |
d3.layout.pack = function() { | |
var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius; | |
function pack(d, i) { | |
var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() { | |
return radius; | |
}; | |
root.x = root.y = 0; | |
d3_layout_treeVisitAfter(root, function(d) { | |
d.r = +r(d.value); | |
}); | |
d3_layout_treeVisitAfter(root, d3_layout_packSiblings); | |
if (padding) { | |
var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2; | |
d3_layout_treeVisitAfter(root, function(d) { | |
d.r += dr; | |
}); | |
d3_layout_treeVisitAfter(root, d3_layout_packSiblings); | |
d3_layout_treeVisitAfter(root, function(d) { | |
d.r -= dr; | |
}); | |
} | |
d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h)); | |
return nodes; | |
} | |
pack.size = function(_) { | |
if (!arguments.length) return size; | |
size = _; | |
return pack; | |
}; | |
pack.radius = function(_) { | |
if (!arguments.length) return radius; | |
radius = _ == null || typeof _ === "function" ? _ : +_; | |
return pack; | |
}; | |
pack.padding = function(_) { | |
if (!arguments.length) return padding; | |
padding = +_; | |
return pack; | |
}; | |
return d3_layout_hierarchyRebind(pack, hierarchy); | |
}; | |
function d3_layout_packSort(a, b) { | |
return a.value - b.value; | |
} | |
function d3_layout_packInsert(a, b) { | |
var c = a._pack_next; | |
a._pack_next = b; | |
b._pack_prev = a; | |
b._pack_next = c; | |
c._pack_prev = b; | |
} | |
function d3_layout_packSplice(a, b) { | |
a._pack_next = b; | |
b._pack_prev = a; | |
} | |
function d3_layout_packIntersects(a, b) { | |
var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r; | |
return .999 * dr * dr > dx * dx + dy * dy; | |
} | |
function d3_layout_packSiblings(node) { | |
if (!(nodes = node.children) || !(n = nodes.length)) return; | |
var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n; | |
function bound(node) { | |
xMin = Math.min(node.x - node.r, xMin); | |
xMax = Math.max(node.x + node.r, xMax); | |
yMin = Math.min(node.y - node.r, yMin); | |
yMax = Math.max(node.y + node.r, yMax); | |
} | |
nodes.forEach(d3_layout_packLink); | |
a = nodes[0]; | |
a.x = -a.r; | |
a.y = 0; | |
bound(a); | |
if (n > 1) { | |
b = nodes[1]; | |
b.x = b.r; | |
b.y = 0; | |
bound(b); | |
if (n > 2) { | |
c = nodes[2]; | |
d3_layout_packPlace(a, b, c); | |
bound(c); | |
d3_layout_packInsert(a, c); | |
a._pack_prev = c; | |
d3_layout_packInsert(c, b); | |
b = a._pack_next; | |
for (i = 3; i < n; i++) { | |
d3_layout_packPlace(a, b, c = nodes[i]); | |
var isect = 0, s1 = 1, s2 = 1; | |
for (j = b._pack_next; j !== b; j = j._pack_next, s1++) { | |
if (d3_layout_packIntersects(j, c)) { | |
isect = 1; | |
break; | |
} | |
} | |
if (isect == 1) { | |
for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) { | |
if (d3_layout_packIntersects(k, c)) { | |
break; | |
} | |
} | |
} | |
if (isect) { | |
if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b); | |
i--; | |
} else { | |
d3_layout_packInsert(a, c); | |
b = c; | |
bound(c); | |
} | |
} | |
} | |
} | |
var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0; | |
for (i = 0; i < n; i++) { | |
c = nodes[i]; | |
c.x -= cx; | |
c.y -= cy; | |
cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y)); | |
} | |
node.r = cr; | |
nodes.forEach(d3_layout_packUnlink); | |
} | |
function d3_layout_packLink(node) { | |
node._pack_next = node._pack_prev = node; | |
} | |
function d3_layout_packUnlink(node) { | |
delete node._pack_next; | |
delete node._pack_prev; | |
} | |
function d3_layout_packTransform(node, x, y, k) { | |
var children = node.children; | |
node.x = x += k * node.x; | |
node.y = y += k * node.y; | |
node.r *= k; | |
if (children) { | |
var i = -1, n = children.length; | |
while (++i < n) d3_layout_packTransform(children[i], x, y, k); | |
} | |
} | |
function d3_layout_packPlace(a, b, c) { | |
var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y; | |
if (db && (dx || dy)) { | |
var da = b.r + c.r, dc = dx * dx + dy * dy; | |
da *= da; | |
db *= db; | |
var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc); | |
c.x = a.x + x * dx + y * dy; | |
c.y = a.y + x * dy - y * dx; | |
} else { | |
c.x = a.x + db; | |
c.y = a.y; | |
} | |
} | |
d3.layout.cluster = function() { | |
var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false; | |
function cluster(d, i) { | |
var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0; | |
d3_layout_treeVisitAfter(root, function(node) { | |
var children = node.children; | |
if (children && children.length) { | |
node.x = d3_layout_clusterX(children); | |
node.y = d3_layout_clusterY(children); | |
} else { | |
node.x = previousNode ? x += separation(node, previousNode) : 0; | |
node.y = 0; | |
previousNode = node; | |
} | |
}); | |
var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2; | |
d3_layout_treeVisitAfter(root, nodeSize ? function(node) { | |
node.x = (node.x - root.x) * size[0]; | |
node.y = (root.y - node.y) * size[1]; | |
} : function(node) { | |
node.x = (node.x - x0) / (x1 - x0) * size[0]; | |
node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1]; | |
}); | |
return nodes; | |
} | |
cluster.separation = function(x) { | |
if (!arguments.length) return separation; | |
separation = x; | |
return cluster; | |
}; | |
cluster.size = function(x) { | |
if (!arguments.length) return nodeSize ? null : size; | |
nodeSize = (size = x) == null; | |
return cluster; | |
}; | |
cluster.nodeSize = function(x) { | |
if (!arguments.length) return nodeSize ? size : null; | |
nodeSize = (size = x) != null; | |
return cluster; | |
}; | |
return d3_layout_hierarchyRebind(cluster, hierarchy); | |
}; | |
function d3_layout_clusterY(children) { | |
return 1 + d3.max(children, function(child) { | |
return child.y; | |
}); | |
} | |
function d3_layout_clusterX(children) { | |
return children.reduce(function(x, child) { | |
return x + child.x; | |
}, 0) / children.length; | |
} | |
function d3_layout_clusterLeft(node) { | |
var children = node.children; | |
return children && children.length ? d3_layout_clusterLeft(children[0]) : node; | |
} | |
function d3_layout_clusterRight(node) { | |
var children = node.children, n; | |
return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node; | |
} | |
d3.layout.treemap = function() { | |
var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5)); | |
function scale(children, k) { | |
var i = -1, n = children.length, child, area; | |
while (++i < n) { | |
area = (child = children[i]).value * (k < 0 ? 0 : k); | |
child.area = isNaN(area) || area <= 0 ? 0 : area; | |
} | |
} | |
function squarify(node) { | |
var children = node.children; | |
if (children && children.length) { | |
var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n; | |
scale(remaining, rect.dx * rect.dy / node.value); | |
row.area = 0; | |
while ((n = remaining.length) > 0) { | |
row.push(child = remaining[n - 1]); | |
row.area += child.area; | |
if (mode !== "squarify" || (score = worst(row, u)) <= best) { | |
remaining.pop(); | |
best = score; | |
} else { | |
row.area -= row.pop().area; | |
position(row, u, rect, false); | |
u = Math.min(rect.dx, rect.dy); | |
row.length = row.area = 0; | |
best = Infinity; | |
} | |
} | |
if (row.length) { | |
position(row, u, rect, true); | |
row.length = row.area = 0; | |
} | |
children.forEach(squarify); | |
} | |
} | |
function stickify(node) { | |
var children = node.children; | |
if (children && children.length) { | |
var rect = pad(node), remaining = children.slice(), child, row = []; | |
scale(remaining, rect.dx * rect.dy / node.value); | |
row.area = 0; | |
while (child = remaining.pop()) { | |
row.push(child); | |
row.area += child.area; | |
if (child.z != null) { | |
position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length); | |
row.length = row.area = 0; | |
} | |
} | |
children.forEach(stickify); | |
} | |
} | |
function worst(row, u) { | |
var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length; | |
while (++i < n) { | |
if (!(r = row[i].area)) continue; | |
if (r < rmin) rmin = r; | |
if (r > rmax) rmax = r; | |
} | |
s *= s; | |
u *= u; | |
return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity; | |
} | |
function position(row, u, rect, flush) { | |
var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o; | |
if (u == rect.dx) { | |
if (flush || v > rect.dy) v = rect.dy; | |
while (++i < n) { | |
o = row[i]; | |
o.x = x; | |
o.y = y; | |
o.dy = v; | |
x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0); | |
} | |
o.z = true; | |
o.dx += rect.x + rect.dx - x; | |
rect.y += v; | |
rect.dy -= v; | |
} else { | |
if (flush || v > rect.dx) v = rect.dx; | |
while (++i < n) { | |
o = row[i]; | |
o.x = x; | |
o.y = y; | |
o.dx = v; | |
y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0); | |
} | |
o.z = false; | |
o.dy += rect.y + rect.dy - y; | |
rect.x += v; | |
rect.dx -= v; | |
} | |
} | |
function treemap(d) { | |
var nodes = stickies || hierarchy(d), root = nodes[0]; | |
root.x = 0; | |
root.y = 0; | |
root.dx = size[0]; | |
root.dy = size[1]; | |
if (stickies) hierarchy.revalue(root); | |
scale([ root ], root.dx * root.dy / root.value); | |
(stickies ? stickify : squarify)(root); | |
if (sticky) stickies = nodes; | |
return nodes; | |
} | |
treemap.size = function(x) { | |
if (!arguments.length) return size; | |
size = x; | |
return treemap; | |
}; | |
treemap.padding = function(x) { | |
if (!arguments.length) return padding; | |
function padFunction(node) { | |
var p = x.call(treemap, node, node.depth); | |
return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p); | |
} | |
function padConstant(node) { | |
return d3_layout_treemapPad(node, x); | |
} | |
var type; | |
pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], | |
padConstant) : padConstant; | |
return treemap; | |
}; | |
treemap.round = function(x) { | |
if (!arguments.length) return round != Number; | |
round = x ? Math.round : Number; | |
return treemap; | |
}; | |
treemap.sticky = function(x) { | |
if (!arguments.length) return sticky; | |
sticky = x; | |
stickies = null; | |
return treemap; | |
}; | |
treemap.ratio = function(x) { | |
if (!arguments.length) return ratio; | |
ratio = x; | |
return treemap; | |
}; | |
treemap.mode = function(x) { | |
if (!arguments.length) return mode; | |
mode = x + ""; | |
return treemap; | |
}; | |
return d3_layout_hierarchyRebind(treemap, hierarchy); | |
}; | |
function d3_layout_treemapPadNull(node) { | |
return { | |
x: node.x, | |
y: node.y, | |
dx: node.dx, | |
dy: node.dy | |
}; | |
} | |
function d3_layout_treemapPad(node, padding) { | |
var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2]; | |
if (dx < 0) { | |
x += dx / 2; | |
dx = 0; | |
} | |
if (dy < 0) { | |
y += dy / 2; | |
dy = 0; | |
} | |
return { | |
x: x, | |
y: y, | |
dx: dx, | |
dy: dy | |
}; | |
} | |
d3.random = { | |
normal: function(µ, σ) { | |
var n = arguments.length; | |
if (n < 2) σ = 1; | |
if (n < 1) µ = 0; | |
return function() { | |
var x, y, r; | |
do { | |
x = Math.random() * 2 - 1; | |
y = Math.random() * 2 - 1; | |
r = x * x + y * y; | |
} while (!r || r > 1); | |
return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r); | |
}; | |
}, | |
logNormal: function() { | |
var random = d3.random.normal.apply(d3, arguments); | |
return function() { | |
return Math.exp(random()); | |
}; | |
}, | |
irwinHall: function(m) { | |
return function() { | |
for (var s = 0, j = 0; j < m; j++) s += Math.random(); | |
return s / m; | |
}; | |
} | |
}; | |
d3.scale = {}; | |
function d3_scaleExtent(domain) { | |
var start = domain[0], stop = domain[domain.length - 1]; | |
return start < stop ? [ start, stop ] : [ stop, start ]; | |
} | |
function d3_scaleRange(scale) { | |
return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range()); | |
} | |
function d3_scale_bilinear(domain, range, uninterpolate, interpolate) { | |
var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]); | |
return function(x) { | |
return i(u(x)); | |
}; | |
} | |
function d3_scale_nice(domain, nice) { | |
var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx; | |
if (x1 < x0) { | |
dx = i0, i0 = i1, i1 = dx; | |
dx = x0, x0 = x1, x1 = dx; | |
} | |
domain[i0] = nice.floor(x0); | |
domain[i1] = nice.ceil(x1); | |
return domain; | |
} | |
function d3_scale_niceStep(step) { | |
return step ? { | |
floor: function(x) { | |
return Math.floor(x / step) * step; | |
}, | |
ceil: function(x) { | |
return Math.ceil(x / step) * step; | |
} | |
} : d3_scale_niceIdentity; | |
} | |
var d3_scale_niceIdentity = { | |
floor: d3_identity, | |
ceil: d3_identity | |
}; | |
function d3_scale_polylinear(domain, range, uninterpolate, interpolate) { | |
var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1; | |
if (domain[k] < domain[0]) { | |
domain = domain.slice().reverse(); | |
range = range.slice().reverse(); | |
} | |
while (++j <= k) { | |
u.push(uninterpolate(domain[j - 1], domain[j])); | |
i.push(interpolate(range[j - 1], range[j])); | |
} | |
return function(x) { | |
var j = d3.bisect(domain, x, 1, k) - 1; | |
return i[j](u[j](x)); | |
}; | |
} | |
d3.scale.linear = function() { | |
return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false); | |
}; | |
function d3_scale_linear(domain, range, interpolate, clamp) { | |
var output, input; | |
function rescale() { | |
var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber; | |
output = linear(domain, range, uninterpolate, interpolate); | |
input = linear(range, domain, uninterpolate, d3_interpolate); | |
return scale; | |
} | |
function scale(x) { | |
return output(x); | |
} | |
scale.invert = function(y) { | |
return input(y); | |
}; | |
scale.domain = function(x) { | |
if (!arguments.length) return domain; | |
domain = x.map(Number); | |
return rescale(); | |
}; | |
scale.range = function(x) { | |
if (!arguments.length) return range; | |
range = x; | |
return rescale(); | |
}; | |
scale.rangeRound = function(x) { | |
return scale.range(x).interpolate(d3_interpolateRound); | |
}; | |
scale.clamp = function(x) { | |
if (!arguments.length) return clamp; | |
clamp = x; | |
return rescale(); | |
}; | |
scale.interpolate = function(x) { | |
if (!arguments.length) return interpolate; | |
interpolate = x; | |
return rescale(); | |
}; | |
scale.ticks = function(m) { | |
return d3_scale_linearTicks(domain, m); | |
}; | |
scale.tickFormat = function(m, format) { | |
return d3_scale_linearTickFormat(domain, m, format); | |
}; | |
scale.nice = function(m) { | |
d3_scale_linearNice(domain, m); | |
return rescale(); | |
}; | |
scale.copy = function() { | |
return d3_scale_linear(domain, range, interpolate, clamp); | |
}; | |
return rescale(); | |
} | |
function d3_scale_linearRebind(scale, linear) { | |
return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp"); | |
} | |
function d3_scale_linearNice(domain, m) { | |
return d3_scale_nice(domain, d3_scale_niceStep(m ? d3_scale_linearTickRange(domain, m)[2] : d3_scale_linearNiceStep(domain))); | |
} | |
function d3_scale_linearNiceStep(domain) { | |
var extent = d3_scaleExtent(domain), span = extent[1] - extent[0]; | |
return Math.pow(10, Math.round(Math.log(span) / Math.LN10) - 1); | |
} | |
function d3_scale_linearTickRange(domain, m) { | |
var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step; | |
if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2; | |
extent[0] = Math.ceil(extent[0] / step) * step; | |
extent[1] = Math.floor(extent[1] / step) * step + step * .5; | |
extent[2] = step; | |
return extent; | |
} | |
function d3_scale_linearTicks(domain, m) { | |
return d3.range.apply(d3, d3_scale_linearTickRange(domain, m)); | |
} | |
function d3_scale_linearTickFormat(domain, m, format) { | |
var precision = -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01); | |
return d3.format(format ? format.replace(d3_format_re, function(a, b, c, d, e, f, g, h, i, j) { | |
return [ b, c, d, e, f, g, h, i || "." + (precision - (j === "%") * 2), j ].join(""); | |
}) : ",." + precision + "f"); | |
} | |
d3.scale.log = function() { | |
return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]); | |
}; | |
function d3_scale_log(linear, base, positive, domain) { | |
function log(x) { | |
return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base); | |
} | |
function pow(x) { | |
return positive ? Math.pow(base, x) : -Math.pow(base, -x); | |
} | |
function scale(x) { | |
return linear(log(x)); | |
} | |
scale.invert = function(x) { | |
return pow(linear.invert(x)); | |
}; | |
scale.domain = function(x) { | |
if (!arguments.length) return domain; | |
positive = x[0] >= 0; | |
linear.domain((domain = x.map(Number)).map(log)); | |
return scale; | |
}; | |
scale.base = function(_) { | |
if (!arguments.length) return base; | |
base = +_; | |
linear.domain(domain.map(log)); | |
return scale; | |
}; | |
scale.nice = function() { | |
var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative); | |
linear.domain(niced); | |
domain = niced.map(pow); | |
return scale; | |
}; | |
scale.ticks = function() { | |
var extent = d3_scaleExtent(domain), ticks = []; | |
if (extent.every(isFinite)) { | |
var u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base; | |
if (positive) { | |
for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k); | |
ticks.push(pow(i)); | |
} else { | |
ticks.push(pow(i)); | |
for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k); | |
} | |
for (i = 0; ticks[i] < u; i++) {} | |
for (j = ticks.length; ticks[j - 1] > v; j--) {} | |
ticks = ticks.slice(i, j); | |
} | |
return ticks; | |
}; | |
scale.tickFormat = function(n, format) { | |
if (!arguments.length) return d3_scale_logFormat; | |
if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== "function") format = d3.format(format); | |
var k = Math.max(.1, n / scale.ticks().length), f = positive ? (e = 1e-12, Math.ceil) : (e = -1e-12, | |
Math.floor), e; | |
return function(d) { | |
return d / pow(f(log(d) + e)) <= k ? format(d) : ""; | |
}; | |
}; | |
scale.copy = function() { | |
return d3_scale_log(linear.copy(), base, positive, domain); | |
}; | |
return d3_scale_linearRebind(scale, linear); | |
} | |
var d3_scale_logFormat = d3.format(".0e"), d3_scale_logNiceNegative = { | |
floor: function(x) { | |
return -Math.ceil(-x); | |
}, | |
ceil: function(x) { | |
return -Math.floor(-x); | |
} | |
}; | |
d3.scale.pow = function() { | |
return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]); | |
}; | |
function d3_scale_pow(linear, exponent, domain) { | |
var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent); | |
function scale(x) { | |
return linear(powp(x)); | |
} | |
scale.invert = function(x) { | |
return powb(linear.invert(x)); | |
}; | |
scale.domain = function(x) { | |
if (!arguments.length) return domain; | |
linear.domain((domain = x.map(Number)).map(powp)); | |
return scale; | |
}; | |
scale.ticks = function(m) { | |
return d3_scale_linearTicks(domain, m); | |
}; | |
scale.tickFormat = function(m, format) { | |
return d3_scale_linearTickFormat(domain, m, format); | |
}; | |
scale.nice = function(m) { | |
return scale.domain(d3_scale_linearNice(domain, m)); | |
}; | |
scale.exponent = function(x) { | |
if (!arguments.length) return exponent; | |
powp = d3_scale_powPow(exponent = x); | |
powb = d3_scale_powPow(1 / exponent); | |
linear.domain(domain.map(powp)); | |
return scale; | |
}; | |
scale.copy = function() { | |
return d3_scale_pow(linear.copy(), exponent, domain); | |
}; | |
return d3_scale_linearRebind(scale, linear); | |
} | |
function d3_scale_powPow(e) { | |
return function(x) { | |
return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e); | |
}; | |
} | |
d3.scale.sqrt = function() { | |
return d3.scale.pow().exponent(.5); | |
}; | |
d3.scale.ordinal = function() { | |
return d3_scale_ordinal([], { | |
t: "range", | |
a: [ [] ] | |
}); | |
}; | |
function d3_scale_ordinal(domain, ranger) { | |
var index, range, rangeBand; | |
function scale(x) { | |
return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length]; | |
} | |
function steps(start, step) { | |
return d3.range(domain.length).map(function(i) { | |
return start + step * i; | |
}); | |
} | |
scale.domain = function(x) { | |
if (!arguments.length) return domain; | |
domain = []; | |
index = new d3_Map(); | |
var i = -1, n = x.length, xi; | |
while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi)); | |
return scale[ranger.t].apply(scale, ranger.a); | |
}; | |
scale.range = function(x) { | |
if (!arguments.length) return range; | |
range = x; | |
rangeBand = 0; | |
ranger = { | |
t: "range", | |
a: arguments | |
}; | |
return scale; | |
}; | |
scale.rangePoints = function(x, padding) { | |
if (arguments.length < 2) padding = 0; | |
var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding); | |
range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step); | |
rangeBand = 0; | |
ranger = { | |
t: "rangePoints", | |
a: arguments | |
}; | |
return scale; | |
}; | |
scale.rangeBands = function(x, padding, outerPadding) { | |
if (arguments.length < 2) padding = 0; | |
if (arguments.length < 3) outerPadding = padding; | |
var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding); | |
range = steps(start + step * outerPadding, step); | |
if (reverse) range.reverse(); | |
rangeBand = step * (1 - padding); | |
ranger = { | |
t: "rangeBands", | |
a: arguments | |
}; | |
return scale; | |
}; | |
scale.rangeRoundBands = function(x, padding, outerPadding) { | |
if (arguments.length < 2) padding = 0; | |
if (arguments.length < 3) outerPadding = padding; | |
var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step; | |
range = steps(start + Math.round(error / 2), step); | |
if (reverse) range.reverse(); | |
rangeBand = Math.round(step * (1 - padding)); | |
ranger = { | |
t: "rangeRoundBands", | |
a: arguments | |
}; | |
return scale; | |
}; | |
scale.rangeBand = function() { | |
return rangeBand; | |
}; | |
scale.rangeExtent = function() { | |
return d3_scaleExtent(ranger.a[0]); | |
}; | |
scale.copy = function() { | |
return d3_scale_ordinal(domain, ranger); | |
}; | |
return scale.domain(domain); | |
} | |
d3.scale.category10 = function() { | |
return d3.scale.ordinal().range(d3_category10); | |
}; | |
d3.scale.category20 = function() { | |
return d3.scale.ordinal().range(d3_category20); | |
}; | |
d3.scale.category20b = function() { | |
return d3.scale.ordinal().range(d3_category20b); | |
}; | |
d3.scale.category20c = function() { | |
return d3.scale.ordinal().range(d3_category20c); | |
}; | |
var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString); | |
var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString); | |
var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString); | |
var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString); | |
d3.scale.quantile = function() { | |
return d3_scale_quantile([], []); | |
}; | |
function d3_scale_quantile(domain, range) { | |
var thresholds; | |
function rescale() { | |
var k = 0, q = range.length; | |
thresholds = []; | |
while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q); | |
return scale; | |
} | |
function scale(x) { | |
if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)]; | |
} | |
scale.domain = function(x) { | |
if (!arguments.length) return domain; | |
domain = x.filter(function(d) { | |
return !isNaN(d); | |
}).sort(d3.ascending); | |
return rescale(); | |
}; | |
scale.range = function(x) { | |
if (!arguments.length) return range; | |
range = x; | |
return rescale(); | |
}; | |
scale.quantiles = function() { | |
return thresholds; | |
}; | |
scale.invertExtent = function(y) { | |
y = range.indexOf(y); | |
return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ]; | |
}; | |
scale.copy = function() { | |
return d3_scale_quantile(domain, range); | |
}; | |
return rescale(); | |
} | |
d3.scale.quantize = function() { | |
return d3_scale_quantize(0, 1, [ 0, 1 ]); | |
}; | |
function d3_scale_quantize(x0, x1, range) { | |
var kx, i; | |
function scale(x) { | |
return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))]; | |
} | |
function rescale() { | |
kx = range.length / (x1 - x0); | |
i = range.length - 1; | |
return scale; | |
} | |
scale.domain = function(x) { | |
if (!arguments.length) return [ x0, x1 ]; | |
x0 = +x[0]; | |
x1 = +x[x.length - 1]; | |
return rescale(); | |
}; | |
scale.range = function(x) { | |
if (!arguments.length) return range; | |
range = x; | |
return rescale(); | |
}; | |
scale.invertExtent = function(y) { | |
y = range.indexOf(y); | |
y = y < 0 ? NaN : y / kx + x0; | |
return [ y, y + 1 / kx ]; | |
}; | |
scale.copy = function() { | |
return d3_scale_quantize(x0, x1, range); | |
}; | |
return rescale(); | |
} | |
d3.scale.threshold = function() { | |
return d3_scale_threshold([ .5 ], [ 0, 1 ]); | |
}; | |
function d3_scale_threshold(domain, range) { | |
function scale(x) { | |
if (x <= x) return range[d3.bisect(domain, x)]; | |
} | |
scale.domain = function(_) { | |
if (!arguments.length) return domain; | |
domain = _; | |
return scale; | |
}; | |
scale.range = function(_) { | |
if (!arguments.length) return range; | |
range = _; | |
return scale; | |
}; | |
scale.invertExtent = function(y) { | |
y = range.indexOf(y); | |
return [ domain[y - 1], domain[y] ]; | |
}; | |
scale.copy = function() { | |
return d3_scale_threshold(domain, range); | |
}; | |
return scale; | |
} | |
d3.scale.identity = function() { | |
return d3_scale_identity([ 0, 1 ]); | |
}; | |
function d3_scale_identity(domain) { | |
function identity(x) { | |
return +x; | |
} | |
identity.invert = identity; | |
identity.domain = identity.range = function(x) { | |
if (!arguments.length) return domain; | |
domain = x.map(identity); | |
return identity; | |
}; | |
identity.ticks = function(m) { | |
return d3_scale_linearTicks(domain, m); | |
}; | |
identity.tickFormat = function(m, format) { | |
return d3_scale_linearTickFormat(domain, m, format); | |
}; | |
identity.copy = function() { | |
return d3_scale_identity(domain); | |
}; | |
return identity; | |
} | |
d3.svg.arc = function() { | |
var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle; | |
function arc() { | |
var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, | |
a0 = a1, a1 = da), a1 - a0), df = da < π ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1); | |
return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z"; | |
} | |
arc.innerRadius = function(v) { | |
if (!arguments.length) return innerRadius; | |
innerRadius = d3_functor(v); | |
return arc; | |
}; | |
arc.outerRadius = function(v) { | |
if (!arguments.length) return outerRadius; | |
outerRadius = d3_functor(v); | |
return arc; | |
}; | |
arc.startAngle = function(v) { | |
if (!arguments.length) return startAngle; | |
startAngle = d3_functor(v); | |
return arc; | |
}; | |
arc.endAngle = function(v) { | |
if (!arguments.length) return endAngle; | |
endAngle = d3_functor(v); | |
return arc; | |
}; | |
arc.centroid = function() { | |
var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset; | |
return [ Math.cos(a) * r, Math.sin(a) * r ]; | |
}; | |
return arc; | |
}; | |
var d3_svg_arcOffset = -π / 2, d3_svg_arcMax = 2 * π - 1e-6; | |
function d3_svg_arcInnerRadius(d) { | |
return d.innerRadius; | |
} | |
function d3_svg_arcOuterRadius(d) { | |
return d.outerRadius; | |
} | |
function d3_svg_arcStartAngle(d) { | |
return d.startAngle; | |
} | |
function d3_svg_arcEndAngle(d) { | |
return d.endAngle; | |
} | |
d3.svg.line.radial = function() { | |
var line = d3_svg_line(d3_svg_lineRadial); | |
line.radius = line.x, delete line.x; | |
line.angle = line.y, delete line.y; | |
return line; | |
}; | |
function d3_svg_lineRadial(points) { | |
var point, i = -1, n = points.length, r, a; | |
while (++i < n) { | |
point = points[i]; | |
r = point[0]; | |
a = point[1] + d3_svg_arcOffset; | |
point[0] = r * Math.cos(a); | |
point[1] = r * Math.sin(a); | |
} | |
return points; | |
} | |
function d3_svg_area(projection) { | |
var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7; | |
function area(data) { | |
var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() { | |
return x; | |
} : d3_functor(x1), fy1 = y0 === y1 ? function() { | |
return y; | |
} : d3_functor(y1), x, y; | |
function segment() { | |
segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z"); | |
} | |
while (++i < n) { | |
if (defined.call(this, d = data[i], i)) { | |
points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]); | |
points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]); | |
} else if (points0.length) { | |
segment(); | |
points0 = []; | |
points1 = []; | |
} | |
} | |
if (points0.length) segment(); | |
return segments.length ? segments.join("") : null; | |
} | |
area.x = function(_) { | |
if (!arguments.length) return x1; | |
x0 = x1 = _; | |
return area; | |
}; | |
area.x0 = function(_) { | |
if (!arguments.length) return x0; | |
x0 = _; | |
return area; | |
}; | |
area.x1 = function(_) { | |
if (!arguments.length) return x1; | |
x1 = _; | |
return area; | |
}; | |
area.y = function(_) { | |
if (!arguments.length) return y1; | |
y0 = y1 = _; | |
return area; | |
}; | |
area.y0 = function(_) { | |
if (!arguments.length) return y0; | |
y0 = _; | |
return area; | |
}; | |
area.y1 = function(_) { | |
if (!arguments.length) return y1; | |
y1 = _; | |
return area; | |
}; | |
area.defined = function(_) { | |
if (!arguments.length) return defined; | |
defined = _; | |
return area; | |
}; | |
area.interpolate = function(_) { | |
if (!arguments.length) return interpolateKey; | |
if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key; | |
interpolateReverse = interpolate.reverse || interpolate; | |
L = interpolate.closed ? "M" : "L"; | |
return area; | |
}; | |
area.tension = function(_) { | |
if (!arguments.length) return tension; | |
tension = _; | |
return area; | |
}; | |
return area; | |
} | |
d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter; | |
d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore; | |
d3.svg.area = function() { | |
return d3_svg_area(d3_identity); | |
}; | |
d3.svg.area.radial = function() { | |
var area = d3_svg_area(d3_svg_lineRadial); | |
area.radius = area.x, delete area.x; | |
area.innerRadius = area.x0, delete area.x0; | |
area.outerRadius = area.x1, delete area.x1; | |
area.angle = area.y, delete area.y; | |
area.startAngle = area.y0, delete area.y0; | |
area.endAngle = area.y1, delete area.y1; | |
return area; | |
}; | |
d3.svg.chord = function() { | |
var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle; | |
function chord(d, i) { | |
var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i); | |
return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z"; | |
} | |
function subgroup(self, f, d, i) { | |
var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset; | |
return { | |
r: r, | |
a0: a0, | |
a1: a1, | |
p0: [ r * Math.cos(a0), r * Math.sin(a0) ], | |
p1: [ r * Math.cos(a1), r * Math.sin(a1) ] | |
}; | |
} | |
function equals(a, b) { | |
return a.a0 == b.a0 && a.a1 == b.a1; | |
} | |
function arc(r, p, a) { | |
return "A" + r + "," + r + " 0 " + +(a > π) + ",1 " + p; | |
} | |
function curve(r0, p0, r1, p1) { | |
return "Q 0,0 " + p1; | |
} | |
chord.radius = function(v) { | |
if (!arguments.length) return radius; | |
radius = d3_functor(v); | |
return chord; | |
}; | |
chord.source = function(v) { | |
if (!arguments.length) return source; | |
source = d3_functor(v); | |
return chord; | |
}; | |
chord.target = function(v) { | |
if (!arguments.length) return target; | |
target = d3_functor(v); | |
return chord; | |
}; | |
chord.startAngle = function(v) { | |
if (!arguments.length) return startAngle; | |
startAngle = d3_functor(v); | |
return chord; | |
}; | |
chord.endAngle = function(v) { | |
if (!arguments.length) return endAngle; | |
endAngle = d3_functor(v); | |
return chord; | |
}; | |
return chord; | |
}; | |
function d3_svg_chordRadius(d) { | |
return d.radius; | |
} | |
d3.svg.diagonal = function() { | |
var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection; | |
function diagonal(d, i) { | |
var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, { | |
x: p0.x, | |
y: m | |
}, { | |
x: p3.x, | |
y: m | |
}, p3 ]; | |
p = p.map(projection); | |
return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3]; | |
} | |
diagonal.source = function(x) { | |
if (!arguments.length) return source; | |
source = d3_functor(x); | |
return diagonal; | |
}; | |
diagonal.target = function(x) { | |
if (!arguments.length) return target; | |
target = d3_functor(x); | |
return diagonal; | |
}; | |
diagonal.projection = function(x) { | |
if (!arguments.length) return projection; | |
projection = x; | |
return diagonal; | |
}; | |
return diagonal; | |
}; | |
function d3_svg_diagonalProjection(d) { | |
return [ d.x, d.y ]; | |
} | |
d3.svg.diagonal.radial = function() { | |
var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection; | |
diagonal.projection = function(x) { | |
return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection; | |
}; | |
return diagonal; | |
}; | |
function d3_svg_diagonalRadialProjection(projection) { | |
return function() { | |
var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset; | |
return [ r * Math.cos(a), r * Math.sin(a) ]; | |
}; | |
} | |
d3.svg.symbol = function() { | |
var type = d3_svg_symbolType, size = d3_svg_symbolSize; | |
function symbol(d, i) { | |
return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i)); | |
} | |
symbol.type = function(x) { | |
if (!arguments.length) return type; | |
type = d3_functor(x); | |
return symbol; | |
}; | |
symbol.size = function(x) { | |
if (!arguments.length) return size; | |
size = d3_functor(x); | |
return symbol; | |
}; | |
return symbol; | |
}; | |
function d3_svg_symbolSize() { | |
return 64; | |
} | |
function d3_svg_symbolType() { | |
return "circle"; | |
} | |
function d3_svg_symbolCircle(size) { | |
var r = Math.sqrt(size / π); | |
return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z"; | |
} | |
var d3_svg_symbols = d3.map({ | |
circle: d3_svg_symbolCircle, | |
cross: function(size) { | |
var r = Math.sqrt(size / 5) / 2; | |
return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z"; | |
}, | |
diamond: function(size) { | |
var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30; | |
return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z"; | |
}, | |
square: function(size) { | |
var r = Math.sqrt(size) / 2; | |
return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z"; | |
}, | |
"triangle-down": function(size) { | |
var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; | |
return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z"; | |
}, | |
"triangle-up": function(size) { | |
var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2; | |
return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z"; | |
} | |
}); | |
d3.svg.symbolTypes = d3_svg_symbols.keys(); | |
var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians); | |
function d3_transition(groups, id) { | |
d3_subclass(groups, d3_transitionPrototype); | |
groups.id = id; | |
return groups; | |
} | |
var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit; | |
d3_transitionPrototype.call = d3_selectionPrototype.call; | |
d3_transitionPrototype.empty = d3_selectionPrototype.empty; | |
d3_transitionPrototype.node = d3_selectionPrototype.node; | |
d3_transitionPrototype.size = d3_selectionPrototype.size; | |
d3.transition = function(selection) { | |
return arguments.length ? d3_transitionInheritId ? selection.transition() : selection : d3_selectionRoot.transition(); | |
}; | |
d3.transition.prototype = d3_transitionPrototype; | |
d3_transitionPrototype.select = function(selector) { | |
var id = this.id, subgroups = [], subgroup, subnode, node; | |
selector = d3_selection_selector(selector); | |
for (var j = -1, m = this.length; ++j < m; ) { | |
subgroups.push(subgroup = []); | |
for (var group = this[j], i = -1, n = group.length; ++i < n; ) { | |
if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) { | |
if ("__data__" in node) subnode.__data__ = node.__data__; | |
d3_transitionNode(subnode, i, id, node.__transition__[id]); | |
subgroup.push(subnode); | |
} else { | |
subgroup.push(null); | |
} | |
} | |
} | |
return d3_transition(subgroups, id); | |
}; | |
d3_transitionPrototype.selectAll = function(selector) { | |
var id = this.id, subgroups = [], subgroup, subnodes, node, subnode, transition; | |
selector = d3_selection_selectorAll(selector); | |
for (var j = -1, m = this.length; ++j < m; ) { | |
for (var group = this[j], i = -1, n = group.length; ++i < n; ) { | |
if (node = group[i]) { | |
transition = node.__transition__[id]; | |
subnodes = selector.call(node, node.__data__, i, j); | |
subgroups.push(subgroup = []); | |
for (var k = -1, o = subnodes.length; ++k < o; ) { | |
if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition); | |
subgroup.push(subnode); | |
} | |
} | |
} | |
} | |
return d3_transition(subgroups, id); | |
}; | |
d3_transitionPrototype.filter = function(filter) { | |
var subgroups = [], subgroup, group, node; | |
if (typeof filter !== "function") filter = d3_selection_filter(filter); | |
for (var j = 0, m = this.length; j < m; j++) { | |
subgroups.push(subgroup = []); | |
for (var group = this[j], i = 0, n = group.length; i < n; i++) { | |
if ((node = group[i]) && filter.call(node, node.__data__, i)) { | |
subgroup.push(node); | |
} | |
} | |
} | |
return d3_transition(subgroups, this.id); | |
}; | |
d3_transitionPrototype.tween = function(name, tween) { | |
var id = this.id; | |
if (arguments.length < 2) return this.node().__transition__[id].tween.get(name); | |
return d3_selection_each(this, tween == null ? function(node) { | |
node.__transition__[id].tween.remove(name); | |
} : function(node) { | |
node.__transition__[id].tween.set(name, tween); | |
}); | |
}; | |
function d3_transition_tween(groups, name, value, tween) { | |
var id = groups.id; | |
return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) { | |
node.__transition__[id].tween.set(name, tween(value.call(node, node.__data__, i, j))); | |
} : (value = tween(value), function(node) { | |
node.__transition__[id].tween.set(name, value); | |
})); | |
} | |
d3_transitionPrototype.attr = function(nameNS, value) { | |
if (arguments.length < 2) { | |
for (value in nameNS) this.attr(value, nameNS[value]); | |
return this; | |
} | |
var interpolate = nameNS == "transform" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS); | |
function attrNull() { | |
this.removeAttribute(name); | |
} | |
function attrNullNS() { | |
this.removeAttributeNS(name.space, name.local); | |
} | |
function attrTween(b) { | |
return b == null ? attrNull : (b += "", function() { | |
var a = this.getAttribute(name), i; | |
return a !== b && (i = interpolate(a, b), function(t) { | |
this.setAttribute(name, i(t)); | |
}); | |
}); | |
} | |
function attrTweenNS(b) { | |
return b == null ? attrNullNS : (b += "", function() { | |
var a = this.getAttributeNS(name.space, name.local), i; | |
return a !== b && (i = interpolate(a, b), function(t) { | |
this.setAttributeNS(name.space, name.local, i(t)); | |
}); | |
}); | |
} | |
return d3_transition_tween(this, "attr." + nameNS, value, name.local ? attrTweenNS : attrTween); | |
}; | |
d3_transitionPrototype.attrTween = function(nameNS, tween) { | |
var name = d3.ns.qualify(nameNS); | |
function attrTween(d, i) { | |
var f = tween.call(this, d, i, this.getAttribute(name)); | |
return f && function(t) { | |
this.setAttribute(name, f(t)); | |
}; | |
} | |
function attrTweenNS(d, i) { | |
var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local)); | |
return f && function(t) { | |
this.setAttributeNS(name.space, name.local, f(t)); | |
}; | |
} | |
return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween); | |
}; | |
d3_transitionPrototype.style = function(name, value, priority) { | |
var n = arguments.length; | |
if (n < 3) { | |
if (typeof name !== "string") { | |
if (n < 2) value = ""; | |
for (priority in name) this.style(priority, name[priority], value); | |
return this; | |
} | |
priority = ""; | |
} | |
function styleNull() { | |
this.style.removeProperty(name); | |
} | |
function styleString(b) { | |
return b == null ? styleNull : (b += "", function() { | |
var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i; | |
return a !== b && (i = d3_interpolate(a, b), function(t) { | |
this.style.setProperty(name, i(t), priority); | |
}); | |
}); | |
} | |
return d3_transition_tween(this, "style." + name, value, styleString); | |
}; | |
d3_transitionPrototype.styleTween = function(name, tween, priority) { | |
if (arguments.length < 3) priority = ""; | |
function styleTween(d, i) { | |
var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name)); | |
return f && function(t) { | |
this.style.setProperty(name, f(t), priority); | |
}; | |
} | |
return this.tween("style." + name, styleTween); | |
}; | |
d3_transitionPrototype.text = function(value) { | |
return d3_transition_tween(this, "text", value, d3_transition_text); | |
}; | |
function d3_transition_text(b) { | |
if (b == null) b = ""; | |
return function() { | |
this.textContent = b; | |
}; | |
} | |
d3_transitionPrototype.remove = function() { | |
return this.each("end.transition", function() { | |
var p; | |
if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this); | |
}); | |
}; | |
d3_transitionPrototype.ease = function(value) { | |
var id = this.id; | |
if (arguments.length < 1) return this.node().__transition__[id].ease; | |
if (typeof value !== "function") value = d3.ease.apply(d3, arguments); | |
return d3_selection_each(this, function(node) { | |
node.__transition__[id].ease = value; | |
}); | |
}; | |
d3_transitionPrototype.delay = function(value) { | |
var id = this.id; | |
return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { | |
node.__transition__[id].delay = value.call(node, node.__data__, i, j) | 0; | |
} : (value |= 0, function(node) { | |
node.__transition__[id].delay = value; | |
})); | |
}; | |
d3_transitionPrototype.duration = function(value) { | |
var id = this.id; | |
return d3_selection_each(this, typeof value === "function" ? function(node, i, j) { | |
node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j) | 0); | |
} : (value = Math.max(1, value | 0), function(node) { | |
node.__transition__[id].duration = value; | |
})); | |
}; | |
d3_transitionPrototype.each = function(type, listener) { | |
var id = this.id; | |
if (arguments.length < 2) { | |
var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId; | |
d3_transitionInheritId = id; | |
d3_selection_each(this, function(node, i, j) { | |
d3_transitionInherit = node.__transition__[id]; | |
type.call(node, node.__data__, i, j); | |
}); | |
d3_transitionInherit = inherit; | |
d3_transitionInheritId = inheritId; | |
} else { | |
d3_selection_each(this, function(node) { | |
var transition = node.__transition__[id]; | |
(transition.event || (transition.event = d3.dispatch("start", "end"))).on(type, listener); | |
}); | |
} | |
return this; | |
}; | |
d3_transitionPrototype.transition = function() { | |
var id0 = this.id, id1 = ++d3_transitionId, subgroups = [], subgroup, group, node, transition; | |
for (var j = 0, m = this.length; j < m; j++) { | |
subgroups.push(subgroup = []); | |
for (var group = this[j], i = 0, n = group.length; i < n; i++) { | |
if (node = group[i]) { | |
transition = Object.create(node.__transition__[id0]); | |
transition.delay += transition.duration; | |
d3_transitionNode(node, i, id1, transition); | |
} | |
subgroup.push(node); | |
} | |
} | |
return d3_transition(subgroups, id1); | |
}; | |
function d3_transitionNode(node, i, id, inherit) { | |
var lock = node.__transition__ || (node.__transition__ = { | |
active: 0, | |
count: 0 | |
}), transition = lock[id]; | |
if (!transition) { | |
var time = inherit.time; | |
transition = lock[id] = { | |
tween: new d3_Map(), | |
time: time, | |
ease: inherit.ease, | |
delay: inherit.delay, | |
duration: inherit.duration | |
}; | |
++lock.count; | |
d3.timer(function(elapsed) { | |
var d = node.__data__, ease = transition.ease, delay = transition.delay, duration = transition.duration, tweened = []; | |
if (delay <= elapsed) return start(elapsed); | |
d3_timer_replace(start, delay, time); | |
function start(elapsed) { | |
if (lock.active > id) return stop(); | |
lock.active = id; | |
transition.event && transition.event.start.call(node, d, i); | |
transition.tween.forEach(function(key, value) { | |
if (value = value.call(node, d, i)) { | |
tweened.push(value); | |
} | |
}); | |
if (tick(elapsed)) return 1; | |
d3_timer_replace(tick, 0, time); | |
} | |
function tick(elapsed) { | |
if (lock.active !== id) return stop(); | |
var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length; | |
while (n > 0) { | |
tweened[--n].call(node, e); | |
} | |
if (t >= 1) { | |
stop(); | |
transition.event && transition.event.end.call(node, d, i); | |
return 1; | |
} | |
} | |
function stop() { | |
if (--lock.count) delete lock[id]; else delete node.__transition__; | |
return 1; | |
} | |
}, 0, time); | |
} | |
} | |
d3.svg.axis = function() { | |
var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0; | |
function axis(g) { | |
g.each(function() { | |
var g = d3.select(this); | |
var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_; | |
var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".tick.minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", ".tick").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1); | |
var tick = g.selectAll(".tick.major").data(ticks, String), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick major").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform; | |
var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), | |
d3.transition(path)); | |
var scale1 = scale.copy(), scale0 = this.__chart__ || scale1; | |
this.__chart__ = scale1; | |
tickEnter.append("line"); | |
tickEnter.append("text"); | |
var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text"); | |
switch (orient) { | |
case "bottom": | |
{ | |
tickTransform = d3_svg_axisX; | |
subtickEnter.attr("y2", tickMinorSize); | |
subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize); | |
lineEnter.attr("y2", tickMajorSize); | |
textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding); | |
lineUpdate.attr("x2", 0).attr("y2", tickMajorSize); | |
textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding); | |
text.attr("dy", ".71em").style("text-anchor", "middle"); | |
pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize); | |
break; | |
} | |
case "top": | |
{ | |
tickTransform = d3_svg_axisX; | |
subtickEnter.attr("y2", -tickMinorSize); | |
subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize); | |
lineEnter.attr("y2", -tickMajorSize); | |
textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding)); | |
lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize); | |
textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding)); | |
text.attr("dy", "0em").style("text-anchor", "middle"); | |
pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize); | |
break; | |
} | |
case "left": | |
{ | |
tickTransform = d3_svg_axisY; | |
subtickEnter.attr("x2", -tickMinorSize); | |
subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0); | |
lineEnter.attr("x2", -tickMajorSize); | |
textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)); | |
lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0); | |
textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0); | |
text.attr("dy", ".32em").style("text-anchor", "end"); | |
pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize); | |
break; | |
} | |
case "right": | |
{ | |
tickTransform = d3_svg_axisY; | |
subtickEnter.attr("x2", tickMinorSize); | |
subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0); | |
lineEnter.attr("x2", tickMajorSize); | |
textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding); | |
lineUpdate.attr("x2", tickMajorSize).attr("y2", 0); | |
textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0); | |
text.attr("dy", ".32em").style("text-anchor", "start"); | |
pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize); | |
break; | |
} | |
} | |
if (scale.rangeBand) { | |
var dx = scale1.rangeBand() / 2, x = function(d) { | |
return scale1(d) + dx; | |
}; | |
tickEnter.call(tickTransform, x); | |
tickUpdate.call(tickTransform, x); | |
} else { | |
tickEnter.call(tickTransform, scale0); | |
tickUpdate.call(tickTransform, scale1); | |
tickExit.call(tickTransform, scale1); | |
subtickEnter.call(tickTransform, scale0); | |
subtickUpdate.call(tickTransform, scale1); | |
subtickExit.call(tickTransform, scale1); | |
} | |
}); | |
} | |
axis.scale = function(x) { | |
if (!arguments.length) return scale; | |
scale = x; | |
return axis; | |
}; | |
axis.orient = function(x) { | |
if (!arguments.length) return orient; | |
orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient; | |
return axis; | |
}; | |
axis.ticks = function() { | |
if (!arguments.length) return tickArguments_; | |
tickArguments_ = arguments; | |
return axis; | |
}; | |
axis.tickValues = function(x) { | |
if (!arguments.length) return tickValues; | |
tickValues = x; | |
return axis; | |
}; | |
axis.tickFormat = function(x) { | |
if (!arguments.length) return tickFormat_; | |
tickFormat_ = x; | |
return axis; | |
}; | |
axis.tickSize = function(x, y) { | |
if (!arguments.length) return tickMajorSize; | |
var n = arguments.length - 1; | |
tickMajorSize = +x; | |
tickMinorSize = n > 1 ? +y : tickMajorSize; | |
tickEndSize = n > 0 ? +arguments[n] : tickMajorSize; | |
return axis; | |
}; | |
axis.tickPadding = function(x) { | |
if (!arguments.length) return tickPadding; | |
tickPadding = +x; | |
return axis; | |
}; | |
axis.tickSubdivide = function(x) { | |
if (!arguments.length) return tickSubdivide; | |
tickSubdivide = +x; | |
return axis; | |
}; | |
return axis; | |
}; | |
var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = { | |
top: 1, | |
right: 1, | |
bottom: 1, | |
left: 1 | |
}; | |
function d3_svg_axisX(selection, x) { | |
selection.attr("transform", function(d) { | |
return "translate(" + x(d) + ",0)"; | |
}); | |
} | |
function d3_svg_axisY(selection, y) { | |
selection.attr("transform", function(d) { | |
return "translate(0," + y(d) + ")"; | |
}); | |
} | |
function d3_svg_axisSubdivide(scale, ticks, m) { | |
subticks = []; | |
if (m && ticks.length > 1) { | |
var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v; | |
while (++i < n) { | |
for (j = m; --j > 0; ) { | |
if ((v = +ticks[i] - j * d) >= extent[0]) { | |
subticks.push(v); | |
} | |
} | |
} | |
for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) { | |
subticks.push(v); | |
} | |
} | |
return subticks; | |
} | |
d3.svg.brush = function() { | |
var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], clamp = [ true, true ], extentDomain; | |
function brush(g) { | |
g.each(function() { | |
var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e; | |
g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart); | |
bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair"); | |
fg.enter().append("rect").attr("class", "extent").style("cursor", "move"); | |
tz.enter().append("g").attr("class", function(d) { | |
return "resize " + d; | |
}).style("cursor", function(d) { | |
return d3_svg_brushCursor[d]; | |
}).append("rect").attr("x", function(d) { | |
return /[ew]$/.test(d) ? -3 : null; | |
}).attr("y", function(d) { | |
return /^[ns]/.test(d) ? -3 : null; | |
}).attr("width", 6).attr("height", 6).style("visibility", "hidden"); | |
tz.style("display", brush.empty() ? "none" : null); | |
tz.exit().remove(); | |
if (x) { | |
e = d3_scaleRange(x); | |
bg.attr("x", e[0]).attr("width", e[1] - e[0]); | |
redrawX(g); | |
} | |
if (y) { | |
e = d3_scaleRange(y); | |
bg.attr("y", e[0]).attr("height", e[1] - e[0]); | |
redrawY(g); | |
} | |
redraw(g); | |
}); | |
} | |
function redraw(g) { | |
g.selectAll(".resize").attr("transform", function(d) { | |
return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")"; | |
}); | |
} | |
function redrawX(g) { | |
g.select(".extent").attr("x", extent[0][0]); | |
g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]); | |
} | |
function redrawY(g) { | |
g.select(".extent").attr("y", extent[0][1]); | |
g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]); | |
} | |
function brushstart() { | |
var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = mouse(), offset; | |
var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup); | |
if (d3.event.changedTouches) { | |
w.on("touchmove.brush", brushmove).on("touchend.brush", brushend); | |
} else { | |
w.on("mousemove.brush", brushmove).on("mouseup.brush", brushend); | |
} | |
if (dragging) { | |
origin[0] = extent[0][0] - origin[0]; | |
origin[1] = extent[0][1] - origin[1]; | |
} else if (resizing) { | |
var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing); | |
offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ]; | |
origin[0] = extent[ex][0]; | |
origin[1] = extent[ey][1]; | |
} else if (d3.event.altKey) center = origin.slice(); | |
g.style("pointer-events", "none").selectAll(".resize").style("display", null); | |
d3.select("body").style("cursor", eventTarget.style("cursor")); | |
event_({ | |
type: "brushstart" | |
}); | |
brushmove(); | |
function mouse() { | |
var touches = d3.event.changedTouches; | |
return touches ? d3.touches(target, touches)[0] : d3.mouse(target); | |
} | |
function keydown() { | |
if (d3.event.keyCode == 32) { | |
if (!dragging) { | |
center = null; | |
origin[0] -= extent[1][0]; | |
origin[1] -= extent[1][1]; | |
dragging = 2; | |
} | |
d3_eventPreventDefault(); | |
} | |
} | |
function keyup() { | |
if (d3.event.keyCode == 32 && dragging == 2) { | |
origin[0] += extent[1][0]; | |
origin[1] += extent[1][1]; | |
dragging = 0; | |
d3_eventPreventDefault(); | |
} | |
} | |
function brushmove() { | |
var point = mouse(), moved = false; | |
if (offset) { | |
point[0] += offset[0]; | |
point[1] += offset[1]; | |
} | |
if (!dragging) { | |
if (d3.event.altKey) { | |
if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ]; | |
origin[0] = extent[+(point[0] < center[0])][0]; | |
origin[1] = extent[+(point[1] < center[1])][1]; | |
} else center = null; | |
} | |
if (resizingX && move1(point, x, 0)) { | |
redrawX(g); | |
moved = true; | |
} | |
if (resizingY && move1(point, y, 1)) { | |
redrawY(g); | |
moved = true; | |
} | |
if (moved) { | |
redraw(g); | |
event_({ | |
type: "brush", | |
mode: dragging ? "move" : "resize" | |
}); | |
} | |
} | |
function move1(point, scale, i) { | |
var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max; | |
if (dragging) { | |
r0 -= position; | |
r1 -= size + position; | |
} | |
min = clamp[i] ? Math.max(r0, Math.min(r1, point[i])) : point[i]; | |
if (dragging) { | |
max = (min += position) + size; | |
} else { | |
if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min)); | |
if (position < min) { | |
max = min; | |
min = position; | |
} else { | |
max = position; | |
} | |
} | |
if (extent[0][i] !== min || extent[1][i] !== max) { | |
extentDomain = null; | |
extent[0][i] = min; | |
extent[1][i] = max; | |
return true; | |
} | |
} | |
function brushend() { | |
brushmove(); | |
g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null); | |
d3.select("body").style("cursor", null); | |
w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null); | |
dragRestore(); | |
event_({ | |
type: "brushend" | |
}); | |
} | |
} | |
brush.x = function(z) { | |
if (!arguments.length) return x; | |
x = z; | |
resizes = d3_svg_brushResizes[!x << 1 | !y]; | |
return brush; | |
}; | |
brush.y = function(z) { | |
if (!arguments.length) return y; | |
y = z; | |
resizes = d3_svg_brushResizes[!x << 1 | !y]; | |
return brush; | |
}; | |
brush.clamp = function(z) { | |
if (!arguments.length) return x && y ? clamp : x || y ? clamp[+!x] : null; | |
if (x && y) clamp = [ !!z[0], !!z[1] ]; else if (x || y) clamp[+!x] = !!z; | |
return brush; | |
}; | |
brush.extent = function(z) { | |
var x0, x1, y0, y1, t; | |
if (!arguments.length) { | |
z = extentDomain || extent; | |
if (x) { | |
x0 = z[0][0], x1 = z[1][0]; | |
if (!extentDomain) { | |
x0 = extent[0][0], x1 = extent[1][0]; | |
if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1); | |
if (x1 < x0) t = x0, x0 = x1, x1 = t; | |
} | |
} | |
if (y) { | |
y0 = z[0][1], y1 = z[1][1]; | |
if (!extentDomain) { | |
y0 = extent[0][1], y1 = extent[1][1]; | |
if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1); | |
if (y1 < y0) t = y0, y0 = y1, y1 = t; | |
} | |
} | |
return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ]; | |
} | |
extentDomain = [ [ 0, 0 ], [ 0, 0 ] ]; | |
if (x) { | |
x0 = z[0], x1 = z[1]; | |
if (y) x0 = x0[0], x1 = x1[0]; | |
extentDomain[0][0] = x0, extentDomain[1][0] = x1; | |
if (x.invert) x0 = x(x0), x1 = x(x1); | |
if (x1 < x0) t = x0, x0 = x1, x1 = t; | |
extent[0][0] = x0 | 0, extent[1][0] = x1 | 0; | |
} | |
if (y) { | |
y0 = z[0], y1 = z[1]; | |
if (x) y0 = y0[1], y1 = y1[1]; | |
extentDomain[0][1] = y0, extentDomain[1][1] = y1; | |
if (y.invert) y0 = y(y0), y1 = y(y1); | |
if (y1 < y0) t = y0, y0 = y1, y1 = t; | |
extent[0][1] = y0 | 0, extent[1][1] = y1 | 0; | |
} | |
return brush; | |
}; | |
brush.clear = function() { | |
extentDomain = null; | |
extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0; | |
return brush; | |
}; | |
brush.empty = function() { | |
return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1]; | |
}; | |
return d3.rebind(brush, event, "on"); | |
}; | |
var d3_svg_brushCursor = { | |
n: "ns-resize", | |
e: "ew-resize", | |
s: "ns-resize", | |
w: "ew-resize", | |
nw: "nwse-resize", | |
ne: "nesw-resize", | |
se: "nwse-resize", | |
sw: "nesw-resize" | |
}; | |
var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ]; | |
d3.time = {}; | |
var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]; | |
function d3_time_utc() { | |
this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]); | |
} | |
d3_time_utc.prototype = { | |
getDate: function() { | |
return this._.getUTCDate(); | |
}, | |
getDay: function() { | |
return this._.getUTCDay(); | |
}, | |
getFullYear: function() { | |
return this._.getUTCFullYear(); | |
}, | |
getHours: function() { | |
return this._.getUTCHours(); | |
}, | |
getMilliseconds: function() { | |
return this._.getUTCMilliseconds(); | |
}, | |
getMinutes: function() { | |
return this._.getUTCMinutes(); | |
}, | |
getMonth: function() { | |
return this._.getUTCMonth(); | |
}, | |
getSeconds: function() { | |
return this._.getUTCSeconds(); | |
}, | |
getTime: function() { | |
return this._.getTime(); | |
}, | |
getTimezoneOffset: function() { | |
return 0; | |
}, | |
valueOf: function() { | |
return this._.valueOf(); | |
}, | |
setDate: function() { | |
d3_time_prototype.setUTCDate.apply(this._, arguments); | |
}, | |
setDay: function() { | |
d3_time_prototype.setUTCDay.apply(this._, arguments); | |
}, | |
setFullYear: function() { | |
d3_time_prototype.setUTCFullYear.apply(this._, arguments); | |
}, | |
setHours: function() { | |
d3_time_prototype.setUTCHours.apply(this._, arguments); | |
}, | |
setMilliseconds: function() { | |
d3_time_prototype.setUTCMilliseconds.apply(this._, arguments); | |
}, | |
setMinutes: function() { | |
d3_time_prototype.setUTCMinutes.apply(this._, arguments); | |
}, | |
setMonth: function() { | |
d3_time_prototype.setUTCMonth.apply(this._, arguments); | |
}, | |
setSeconds: function() { | |
d3_time_prototype.setUTCSeconds.apply(this._, arguments); | |
}, | |
setTime: function() { | |
d3_time_prototype.setTime.apply(this._, arguments); | |
} | |
}; | |
var d3_time_prototype = Date.prototype; | |
var d3_time_formatDateTime = "%a %b %e %X %Y", d3_time_formatDate = "%m/%d/%Y", d3_time_formatTime = "%H:%M:%S"; | |
var d3_time_days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], d3_time_dayAbbreviations = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]; | |
function d3_time_interval(local, step, number) { | |
function round(date) { | |
var d0 = local(date), d1 = offset(d0, 1); | |
return date - d0 < d1 - date ? d0 : d1; | |
} | |
function ceil(date) { | |
step(date = local(new d3_time(date - 1)), 1); | |
return date; | |
} | |
function offset(date, k) { | |
step(date = new d3_time(+date), k); | |
return date; | |
} | |
function range(t0, t1, dt) { | |
var time = ceil(t0), times = []; | |
if (dt > 1) { | |
while (time < t1) { | |
if (!(number(time) % dt)) times.push(new Date(+time)); | |
step(time, 1); | |
} | |
} else { | |
while (time < t1) times.push(new Date(+time)), step(time, 1); | |
} | |
return times; | |
} | |
function range_utc(t0, t1, dt) { | |
try { | |
d3_time = d3_time_utc; | |
var utc = new d3_time_utc(); | |
utc._ = t0; | |
return range(utc, t1, dt); | |
} finally { | |
d3_time = Date; | |
} | |
} | |
local.floor = local; | |
local.round = round; | |
local.ceil = ceil; | |
local.offset = offset; | |
local.range = range; | |
var utc = local.utc = d3_time_interval_utc(local); | |
utc.floor = utc; | |
utc.round = d3_time_interval_utc(round); | |
utc.ceil = d3_time_interval_utc(ceil); | |
utc.offset = d3_time_interval_utc(offset); | |
utc.range = range_utc; | |
return local; | |
} | |
function d3_time_interval_utc(method) { | |
return function(date, k) { | |
try { | |
d3_time = d3_time_utc; | |
var utc = new d3_time_utc(); | |
utc._ = date; | |
return method(utc, k)._; | |
} finally { | |
d3_time = Date; | |
} | |
}; | |
} | |
d3.time.year = d3_time_interval(function(date) { | |
date = d3.time.day(date); | |
date.setMonth(0, 1); | |
return date; | |
}, function(date, offset) { | |
date.setFullYear(date.getFullYear() + offset); | |
}, function(date) { | |
return date.getFullYear(); | |
}); | |
d3.time.years = d3.time.year.range; | |
d3.time.years.utc = d3.time.year.utc.range; | |
d3.time.day = d3_time_interval(function(date) { | |
var day = new d3_time(2e3, 0); | |
day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); | |
return day; | |
}, function(date, offset) { | |
date.setDate(date.getDate() + offset); | |
}, function(date) { | |
return date.getDate() - 1; | |
}); | |
d3.time.days = d3.time.day.range; | |
d3.time.days.utc = d3.time.day.utc.range; | |
d3.time.dayOfYear = function(date) { | |
var year = d3.time.year(date); | |
return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5); | |
}; | |
d3_time_daySymbols.forEach(function(day, i) { | |
day = day.toLowerCase(); | |
i = 7 - i; | |
var interval = d3.time[day] = d3_time_interval(function(date) { | |
(date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7); | |
return date; | |
}, function(date, offset) { | |
date.setDate(date.getDate() + Math.floor(offset) * 7); | |
}, function(date) { | |
var day = d3.time.year(date).getDay(); | |
return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i); | |
}); | |
d3.time[day + "s"] = interval.range; | |
d3.time[day + "s"].utc = interval.utc.range; | |
d3.time[day + "OfYear"] = function(date) { | |
var day = d3.time.year(date).getDay(); | |
return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7); | |
}; | |
}); | |
d3.time.week = d3.time.sunday; | |
d3.time.weeks = d3.time.sunday.range; | |
d3.time.weeks.utc = d3.time.sunday.utc.range; | |
d3.time.weekOfYear = d3.time.sundayOfYear; | |
d3.time.format = function(template) { | |
var n = template.length; | |
function format(date) { | |
var string = [], i = -1, j = 0, c, p, f; | |
while (++i < n) { | |
if (template.charCodeAt(i) === 37) { | |
string.push(template.substring(j, i)); | |
if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i); | |
if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p); | |
string.push(c); | |
j = i + 1; | |
} | |
} | |
string.push(template.substring(j, i)); | |
return string.join(""); | |
} | |
format.parse = function(string) { | |
var d = { | |
y: 1900, | |
m: 0, | |
d: 1, | |
H: 0, | |
M: 0, | |
S: 0, | |
L: 0 | |
}, i = d3_time_parse(d, template, string, 0); | |
if (i != string.length) return null; | |
if ("p" in d) d.H = d.H % 12 + d.p * 12; | |
var date = new d3_time(); | |
if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("w" in d && ("W" in d || "U" in d)) { | |
date.setFullYear(d.y, 0, 1); | |
date.setFullYear(d.y, 0, "W" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7); | |
} else date.setFullYear(d.y, d.m, d.d); | |
date.setHours(d.H, d.M, d.S, d.L); | |
return date; | |
}; | |
format.toString = function() { | |
return template; | |
}; | |
return format; | |
}; | |
function d3_time_parse(date, template, string, j) { | |
var c, p, i = 0, n = template.length, m = string.length; | |
while (i < n) { | |
if (j >= m) return -1; | |
c = template.charCodeAt(i++); | |
if (c === 37) { | |
p = d3_time_parsers[template.charAt(i++)]; | |
if (!p || (j = p(date, string, j)) < 0) return -1; | |
} else if (c != string.charCodeAt(j++)) { | |
return -1; | |
} | |
} | |
return j; | |
} | |
function d3_time_formatRe(names) { | |
return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i"); | |
} | |
function d3_time_formatLookup(names) { | |
var map = new d3_Map(), i = -1, n = names.length; | |
while (++i < n) map.set(names[i].toLowerCase(), i); | |
return map; | |
} | |
function d3_time_formatPad(value, fill, width) { | |
var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; | |
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); | |
} | |
var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayLookup = d3_time_formatLookup(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_dayAbbrevLookup = d3_time_formatLookup(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations), d3_time_percentRe = /^%/; | |
var d3_time_formatPads = { | |
"-": "", | |
_: " ", | |
"0": "0" | |
}; | |
var d3_time_formats = { | |
a: function(d) { | |
return d3_time_dayAbbreviations[d.getDay()]; | |
}, | |
A: function(d) { | |
return d3_time_days[d.getDay()]; | |
}, | |
b: function(d) { | |
return d3_time_monthAbbreviations[d.getMonth()]; | |
}, | |
B: function(d) { | |
return d3_time_months[d.getMonth()]; | |
}, | |
c: d3.time.format(d3_time_formatDateTime), | |
d: function(d, p) { | |
return d3_time_formatPad(d.getDate(), p, 2); | |
}, | |
e: function(d, p) { | |
return d3_time_formatPad(d.getDate(), p, 2); | |
}, | |
H: function(d, p) { | |
return d3_time_formatPad(d.getHours(), p, 2); | |
}, | |
I: function(d, p) { | |
return d3_time_formatPad(d.getHours() % 12 || 12, p, 2); | |
}, | |
j: function(d, p) { | |
return d3_time_formatPad(1 + d3.time.dayOfYear(d), p, 3); | |
}, | |
L: function(d, p) { | |
return d3_time_formatPad(d.getMilliseconds(), p, 3); | |
}, | |
m: function(d, p) { | |
return d3_time_formatPad(d.getMonth() + 1, p, 2); | |
}, | |
M: function(d, p) { | |
return d3_time_formatPad(d.getMinutes(), p, 2); | |
}, | |
p: function(d) { | |
return d.getHours() >= 12 ? "PM" : "AM"; | |
}, | |
S: function(d, p) { | |
return d3_time_formatPad(d.getSeconds(), p, 2); | |
}, | |
U: function(d, p) { | |
return d3_time_formatPad(d3.time.sundayOfYear(d), p, 2); | |
}, | |
w: function(d) { | |
return d.getDay(); | |
}, | |
W: function(d, p) { | |
return d3_time_formatPad(d3.time.mondayOfYear(d), p, 2); | |
}, | |
x: d3.time.format(d3_time_formatDate), | |
X: d3.time.format(d3_time_formatTime), | |
y: function(d, p) { | |
return d3_time_formatPad(d.getFullYear() % 100, p, 2); | |
}, | |
Y: function(d, p) { | |
return d3_time_formatPad(d.getFullYear() % 1e4, p, 4); | |
}, | |
Z: d3_time_zone, | |
"%": function() { | |
return "%"; | |
} | |
}; | |
var d3_time_parsers = { | |
a: d3_time_parseWeekdayAbbrev, | |
A: d3_time_parseWeekday, | |
b: d3_time_parseMonthAbbrev, | |
B: d3_time_parseMonth, | |
c: d3_time_parseLocaleFull, | |
d: d3_time_parseDay, | |
e: d3_time_parseDay, | |
H: d3_time_parseHour24, | |
I: d3_time_parseHour24, | |
j: d3_time_parseDayOfYear, | |
L: d3_time_parseMilliseconds, | |
m: d3_time_parseMonthNumber, | |
M: d3_time_parseMinutes, | |
p: d3_time_parseAmPm, | |
S: d3_time_parseSeconds, | |
U: d3_time_parseWeekNumberSunday, | |
w: d3_time_parseWeekdayNumber, | |
W: d3_time_parseWeekNumberMonday, | |
x: d3_time_parseLocaleDate, | |
X: d3_time_parseLocaleTime, | |
y: d3_time_parseYear, | |
Y: d3_time_parseFullYear, | |
"%": d3_time_parseLiteralPercent | |
}; | |
function d3_time_parseWeekdayAbbrev(date, string, i) { | |
d3_time_dayAbbrevRe.lastIndex = 0; | |
var n = d3_time_dayAbbrevRe.exec(string.substring(i)); | |
return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; | |
} | |
function d3_time_parseWeekday(date, string, i) { | |
d3_time_dayRe.lastIndex = 0; | |
var n = d3_time_dayRe.exec(string.substring(i)); | |
return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; | |
} | |
function d3_time_parseWeekdayNumber(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 1)); | |
return n ? (date.w = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseWeekNumberSunday(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i)); | |
return n ? (date.U = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseWeekNumberMonday(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i)); | |
return n ? (date.W = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseMonthAbbrev(date, string, i) { | |
d3_time_monthAbbrevRe.lastIndex = 0; | |
var n = d3_time_monthAbbrevRe.exec(string.substring(i)); | |
return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; | |
} | |
function d3_time_parseMonth(date, string, i) { | |
d3_time_monthRe.lastIndex = 0; | |
var n = d3_time_monthRe.exec(string.substring(i)); | |
return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; | |
} | |
function d3_time_parseLocaleFull(date, string, i) { | |
return d3_time_parse(date, d3_time_formats.c.toString(), string, i); | |
} | |
function d3_time_parseLocaleDate(date, string, i) { | |
return d3_time_parse(date, d3_time_formats.x.toString(), string, i); | |
} | |
function d3_time_parseLocaleTime(date, string, i) { | |
return d3_time_parse(date, d3_time_formats.X.toString(), string, i); | |
} | |
function d3_time_parseFullYear(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 4)); | |
return n ? (date.y = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseYear(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1; | |
} | |
function d3_time_expandYear(d) { | |
return d + (d > 68 ? 1900 : 2e3); | |
} | |
function d3_time_parseMonthNumber(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.m = n[0] - 1, i + n[0].length) : -1; | |
} | |
function d3_time_parseDay(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.d = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseDayOfYear(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 3)); | |
return n ? (date.j = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseHour24(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.H = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseMinutes(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.M = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseSeconds(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 2)); | |
return n ? (date.S = +n[0], i + n[0].length) : -1; | |
} | |
function d3_time_parseMilliseconds(date, string, i) { | |
d3_time_numberRe.lastIndex = 0; | |
var n = d3_time_numberRe.exec(string.substring(i, i + 3)); | |
return n ? (date.L = +n[0], i + n[0].length) : -1; | |
} | |
var d3_time_numberRe = /^\s*\d+/; | |
function d3_time_parseAmPm(date, string, i) { | |
var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase()); | |
return n == null ? -1 : (date.p = n, i); | |
} | |
var d3_time_amPmLookup = d3.map({ | |
am: 0, | |
pm: 1 | |
}); | |
function d3_time_zone(d) { | |
var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60; | |
return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2); | |
} | |
function d3_time_parseLiteralPercent(date, string, i) { | |
d3_time_percentRe.lastIndex = 0; | |
var n = d3_time_percentRe.exec(string.substring(i, i + 1)); | |
return n ? i + n[0].length : -1; | |
} | |
d3.time.format.utc = function(template) { | |
var local = d3.time.format(template); | |
function format(date) { | |
try { | |
d3_time = d3_time_utc; | |
var utc = new d3_time(); | |
utc._ = date; | |
return local(utc); | |
} finally { | |
d3_time = Date; | |
} | |
} | |
format.parse = function(string) { | |
try { | |
d3_time = d3_time_utc; | |
var date = local.parse(string); | |
return date && date._; | |
} finally { | |
d3_time = Date; | |
} | |
}; | |
format.toString = local.toString; | |
return format; | |
}; | |
var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ"); | |
d3.time.format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso; | |
function d3_time_formatIsoNative(date) { | |
return date.toISOString(); | |
} | |
d3_time_formatIsoNative.parse = function(string) { | |
var date = new Date(string); | |
return isNaN(date) ? null : date; | |
}; | |
d3_time_formatIsoNative.toString = d3_time_formatIso.toString; | |
d3.time.second = d3_time_interval(function(date) { | |
return new d3_time(Math.floor(date / 1e3) * 1e3); | |
}, function(date, offset) { | |
date.setTime(date.getTime() + Math.floor(offset) * 1e3); | |
}, function(date) { | |
return date.getSeconds(); | |
}); | |
d3.time.seconds = d3.time.second.range; | |
d3.time.seconds.utc = d3.time.second.utc.range; | |
d3.time.minute = d3_time_interval(function(date) { | |
return new d3_time(Math.floor(date / 6e4) * 6e4); | |
}, function(date, offset) { | |
date.setTime(date.getTime() + Math.floor(offset) * 6e4); | |
}, function(date) { | |
return date.getMinutes(); | |
}); | |
d3.time.minutes = d3.time.minute.range; | |
d3.time.minutes.utc = d3.time.minute.utc.range; | |
d3.time.hour = d3_time_interval(function(date) { | |
var timezone = date.getTimezoneOffset() / 60; | |
return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5); | |
}, function(date, offset) { | |
date.setTime(date.getTime() + Math.floor(offset) * 36e5); | |
}, function(date) { | |
return date.getHours(); | |
}); | |
d3.time.hours = d3.time.hour.range; | |
d3.time.hours.utc = d3.time.hour.utc.range; | |
d3.time.month = d3_time_interval(function(date) { | |
date = d3.time.day(date); | |
date.setDate(1); | |
return date; | |
}, function(date, offset) { | |
date.setMonth(date.getMonth() + offset); | |
}, function(date) { | |
return date.getMonth(); | |
}); | |
d3.time.months = d3.time.month.range; | |
d3.time.months.utc = d3.time.month.utc.range; | |
function d3_time_scale(linear, methods, format) { | |
function scale(x) { | |
return linear(x); | |
} | |
scale.invert = function(x) { | |
return d3_time_scaleDate(linear.invert(x)); | |
}; | |
scale.domain = function(x) { | |
if (!arguments.length) return linear.domain().map(d3_time_scaleDate); | |
linear.domain(x); | |
return scale; | |
}; | |
scale.nice = function(m) { | |
return scale.domain(d3_scale_nice(scale.domain(), m)); | |
}; | |
scale.ticks = function(m, k) { | |
var extent = d3_scaleExtent(scale.domain()); | |
if (typeof m !== "function") { | |
var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target); | |
if (i == d3_time_scaleSteps.length) return methods.year(extent, m); | |
if (!i) return linear.ticks(m).map(d3_time_scaleDate); | |
if (target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target) --i; | |
m = methods[i]; | |
k = m[1]; | |
m = m[0].range; | |
} | |
return m(extent[0], new Date(+extent[1] + 1), k); | |
}; | |
scale.tickFormat = function() { | |
return format; | |
}; | |
scale.copy = function() { | |
return d3_time_scale(linear.copy(), methods, format); | |
}; | |
return d3_scale_linearRebind(scale, linear); | |
} | |
function d3_time_scaleDate(t) { | |
return new Date(t); | |
} | |
function d3_time_scaleFormat(formats) { | |
return function(date) { | |
var i = formats.length - 1, f = formats[i]; | |
while (!f[1](date)) f = formats[--i]; | |
return f[0](date); | |
}; | |
} | |
function d3_time_scaleSetYear(y) { | |
var d = new Date(y, 0, 1); | |
d.setFullYear(y); | |
return d; | |
} | |
function d3_time_scaleGetYear(d) { | |
var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1); | |
return y + (d - d0) / (d1 - d0); | |
} | |
var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ]; | |
var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ]; | |
var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), d3_true ], [ d3.time.format("%B"), function(d) { | |
return d.getMonth(); | |
} ], [ d3.time.format("%b %d"), function(d) { | |
return d.getDate() != 1; | |
} ], [ d3.time.format("%a %d"), function(d) { | |
return d.getDay() && d.getDate() != 1; | |
} ], [ d3.time.format("%I %p"), function(d) { | |
return d.getHours(); | |
} ], [ d3.time.format("%I:%M"), function(d) { | |
return d.getMinutes(); | |
} ], [ d3.time.format(":%S"), function(d) { | |
return d.getSeconds(); | |
} ], [ d3.time.format(".%L"), function(d) { | |
return d.getMilliseconds(); | |
} ] ]; | |
var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats); | |
d3_time_scaleLocalMethods.year = function(extent, m) { | |
return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear); | |
}; | |
d3.time.scale = function() { | |
return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat); | |
}; | |
var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) { | |
return [ m[0].utc, m[1] ]; | |
}); | |
var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), d3_true ], [ d3.time.format.utc("%B"), function(d) { | |
return d.getUTCMonth(); | |
} ], [ d3.time.format.utc("%b %d"), function(d) { | |
return d.getUTCDate() != 1; | |
} ], [ d3.time.format.utc("%a %d"), function(d) { | |
return d.getUTCDay() && d.getUTCDate() != 1; | |
} ], [ d3.time.format.utc("%I %p"), function(d) { | |
return d.getUTCHours(); | |
} ], [ d3.time.format.utc("%I:%M"), function(d) { | |
return d.getUTCMinutes(); | |
} ], [ d3.time.format.utc(":%S"), function(d) { | |
return d.getUTCSeconds(); | |
} ], [ d3.time.format.utc(".%L"), function(d) { | |
return d.getUTCMilliseconds(); | |
} ] ]; | |
var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats); | |
function d3_time_scaleUTCSetYear(y) { | |
var d = new Date(Date.UTC(y, 0, 1)); | |
d.setUTCFullYear(y); | |
return d; | |
} | |
function d3_time_scaleUTCGetYear(d) { | |
var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1); | |
return y + (d - d0) / (d1 - d0); | |
} | |
d3_time_scaleUTCMethods.year = function(extent, m) { | |
return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear); | |
}; | |
d3.time.scale.utc = function() { | |
return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat); | |
}; | |
d3.text = d3_xhrType(function(request) { | |
return request.responseText; | |
}); | |
d3.json = function(url, callback) { | |
return d3_xhr(url, "application/json", d3_json, callback); | |
}; | |
function d3_json(request) { | |
return JSON.parse(request.responseText); | |
} | |
d3.html = function(url, callback) { | |
return d3_xhr(url, "text/html", d3_html, callback); | |
}; | |
function d3_html(request) { | |
var range = d3_document.createRange(); | |
range.selectNode(d3_document.body); | |
return range.createContextualFragment(request.responseText); | |
} | |
d3.xml = d3_xhrType(function(request) { | |
return request.responseXML; | |
}); | |
return d3; | |
}(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>LDAvis</title> | |
<script src="d3.v3.js"></script> | |
<script src="ldavis.js"></script> | |
<link rel="stylesheet" type="text/css" href="lda.css"> | |
</head> | |
<body> | |
<div id = "lda"></div> | |
<script> | |
var vis = new LDAvis("#lda", "lda.json"); | |
</script> | |
</body> | |
</html> |
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
path { | |
fill: none; | |
stroke: none; | |
} | |
.xaxis .tick.major { | |
fill: black; | |
stroke: black; | |
stroke-width: 0.1; | |
opacity: 0.7; | |
} | |
.slideraxis { | |
fill: black; | |
stroke: black; | |
stroke-width: 0.4; | |
opacity: 1; | |
} | |
text { | |
font-family: sans-serif; | |
font-size: 11px; | |
} |
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
{ | |
"mdsDat": { | |
"x": [ 0.11523, 0.2018, -0.089404, -0.11363, 0.074713, -0.21254, 0.14688, 0.15034, -0.041568, -0.023199, 0.063383, -0.046692, 0.0010079, 0.16723, -0.15322, -0.12356, 0.0052345, 0.080981, 0.12405, 0.005192, 0.02506, -0.090325, 0.058605, 0.031527, -0.11326, 0.081687, -0.067514, -0.030486, -0.097413, -0.1301 ], | |
"y": [ -0.1274, -0.043857, -0.052794, 0.086143, 0.23745, -0.046925, 0.052776, 0.097058, 0.2019, -0.096619, -0.060941, 0.16199, -0.069839, -0.13475, -0.13627, -0.066505, -0.046474, 0.044057, -0.041073, 0.05601, 0.015241, 0.13366, -0.016946, 0.024208, -0.10365, -0.044839, 0.0035731, -0.077741, -0.010386, 0.06295 ], | |
"topics": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ], | |
"Freq": [ 4.8048, 4.6142, 4.5608, 4.4471, 4.0594, 4.0129, 3.944, 3.8933, 3.8365, 3.7252, 3.7156, 3.685, 3.5895, 3.5883, 3.5012, 3.3987, 3.1274, 3.0533, 2.812, 2.7683, 2.7349, 2.7148, 2.5786, 2.578, 2.5509, 2.4866, 2.4764, 2.4235, 2.1748, 2.1441 ], | |
"cluster": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] | |
}, | |
"tinfo": { | |
"Term": [ "tax", "water", "permit", "trade", "climat", "carbon", "energi", "forest", "growth", "fisheri", "risk", "uncertainti", "properti", "wast", "household", "agreement", "cooper", "ecosystem", "wtp", "transfer", "right", "fish", "recycl", "attribut", "biodivers", "speci", "agricultur", "conserv", "discount", "enforc", "pigouvian", "dividend", "tax", "distortionari", "pigovian", "slope", "valorem", "weitzman", "labor", "involuntari", "nonpoint", "exempt", "doubl", "reform", "lump", "taxsubsidi", "administr", "realloc", "unemploy", "attain", "leader", "ambient", "redistribut", "fiscal", "wage", "upstream", "rampd", "nonsepar", "thumb", "tripl", "permit", "tradabl", "tradeabl", "grandfath", "hot", "borrow", "bank", "polish", "bilater", "volatil", "buyer", "fring", "discharg", "oligopolist", "poland", "command", "hybrid", "alik", "quota", "trade", "exert", "soviet", "proposit", "auction", "protocol", "taker", "kyoto", "exchang", "seller", "credit", "fisheri", "fish", "catch", "mangrov", "itq", "fleet", "recruit", "shrimp", "gear", "cod", "multispeci", "aquacultur", "fisher", "salmon", "fishermen", "trawl", "tac", "pelag", "tuna", "herring", "discard", "puls", "trawler", "overfish", "artisan", "dissip", "vessel", "juvenil", "spawn", "escap", "recreat", "trip", "visit", "congest", "site", "hous", "meta", "poisson", "gis", "canal", "summari", "waterway", "travel", "transfer", "autocorrel", "hedon", "rum", "british", "superfund", "heritag", "scotland", "outdoor", "visitor", "cultur", "rock", "climb", "amen", "skill", "nest", "beach", "dice", "uncertainti", "avers", "tail", "ethiopia", "precautionari", "adapt", "ambigu", "born", "fat", "diversif", "stern", "knightian", "climat", "sunk", "catastroph", "vulner", "temperatur", "irrevers", "recurs", "concav", "learn", "stop", "stochast", "portfolio", "transform", "academ", "risk", "maxmin", "news", "biodivers", "ecosystem", "whale", "mink", "habitat", "pharmaceut", "servic", "extinct", "speci", "predat", "endang", "divers", "conserv", "terrestri", "shallow", "complementar", "autarki", "reserv", "eleph", "fiber", "finland", "atlant", "wild", "finnish", "grassland", "prey", "sanction", "convers", "biggest", "hysteresi", "coalit", "cooper", "negoti", "iea", "renegoti", "bargain", "payoff", "signatori", "cpr", "victim", "agreement", "treati", "ride", "player", "noncoop", "proof", "transboundari", "levhari", "mirman", "norm", "stabil", "stabl", "easier", "inadvert", "unstabl", "transfronti", "war", "harmon", "arrang", "minimum", "sequestr", "carbon", "ancillari", "sam", "matrix", "root", "leakag", "provinc", "club", "china", "polar", "provinci", "sequest", "stationar", "converg", "coco", "default", "dioxid", "spillov", "footprint", "capabl", "scandinavian", "warm", "embodi", "cge", "brazil", "afforest", "credit", "formula", "climat", "dichotom", "protest", "donat", "hypothet", "referendum", "talk", "referenda", "yes", "bias", "certainti", "revel", "anchor", "lab", "yea", "carlo", "cheap", "wtp", "multivari", "card", "script", "mont", "cash", "nonparametr", "misspecif", "vehicl", "dispar", "belief", "charit", "payment", "art", "irrig", "water", "aquif", "groundwat", "drink", "tap", "reservoir", "charg", "river", "effluent", "dam", "interrupt", "pump", "basin", "catchment", "block", "storag", "purif", "underinvest", "overinvest", "fresh", "entitl", "interrel", "disrupt", "shapley", "greec", "nitrat", "riparian", "deadweight", "korea", "energi", "electr", "ccs", "rebound", "gasolin", "horticultur", "macroeconom", "japan", "solar", "drive", "coal", "car", "decomposit", "heat", "transport", "foster", "germani", "transit", "renew", "equip", "feed", "malmquist", "nox", "austria", "led", "traffic", "cite", "overview", "mile", "certif", "health", "vsl", "nois", "qali", "mortal", "morbid", "child", "exposur", "death", "cancer", "arsenic", "fatal", "dose", "children", "respiratori", "parent", "episod", "life", "ill", "particul", "road", "railway", "safeti", "adult", "expos", "chile", "risk", "worker", "injuri", "longev", "exhaust", "depreci", "mine", "hartwick", "genuin", "backstop", "growth", "hotel", "nonrenew", "david", "unsustain", "curs", "frontier", "wealth", "flood", "nonconvex", "scarciti", "capit", "peak", "miner", "decay", "capac", "stiglitz", "setup", "reinvest", "rent", "saharan", "contemporari", "comprehens", "human", "label", "liber", "eco", "ecolabel", "border", "nnp", "gnp", "brown", "lobbi", "taylor", "green", "tariff", "abroad", "protection", "wto", "awar", "greener", "foreign", "aid", "conform", "recipi", "duopolist", "impur", "paradox", "friend", "tighter", "trade", "satisfact", "south", "subsid", "crop", "biofuel", "acreag", "rice", "smallhold", "corn", "ethanol", "farm", "farmer", "cropland", "rainfal", "mandat", "food", "eros", "ricardian", "agri", "bioenergi", "plot", "bird", "intensif", "agricultur", "subsist", "nitrous", "soil", "runoff", "garden", "residu", "grassland", "sri", "livestock", "forest", "deforest", "timber", "bequest", "fragment", "forestri", "reforest", "rotat", "democrat", "faustmann", "democraci", "tree", "landown", "thailand", "congo", "wood", "tropic", "nontimb", "configur", "stand", "communal", "log", "patch", "costa", "rica", "regener", "agglomer", "jump", "land", "imag", "wast", "recycl", "materi", "dispos", "landfil", "plastic", "garbag", "solid", "dump", "mass", "thermodynam", "inciner", "bag", "macro", "municip", "chain", "vintag", "durabl", "virgin", "fee", "hazard", "cycl", "refund", "paper", "leontief", "aquat", "wastewat", "recoveri", "frequenc", "taiwan", "penalti", "enforc", "monitor", "fine", "cfc", "complianc", "audit", "inspect", "montreal", "reput", "credenc", "noncompli", "overcompli", "violat", "verifi", "voluntari", "chlorofluorocarbon", "accru", "concess", "compliant", "civil", "sanction", "self", "publish", "cfcs", "retrospect", "benevol", "illeg", "student", "law", "contract", "strateg", "deleg", "elect", "oligopoli", "duopoli", "cournot", "author", "leadership", "asymmetr", "subgam", "hierarch", "stackelberg", "preemption", "decentr", "loop", "offici", "cartel", "feder", "court", "realiti", "cheat", "moral", "symmetr", "asymmetri", "princip", "reciproc", "top", "policymak", "confer", "discount", "intergener", "hyperbol", "ethic", "altruism", "inherit", "relief", "altruist", "ramsey", "corpor", "index", "olg", "geoengin", "cohort", "utilitarian", "deficit", "confus", "gradual", "government", "motiv", "consequenti", "exponenti", "journal", "inconsist", "justic", "wider", "ratio", "crowd", "overlap", "hidden", "anomali", "diffus", "innov", "genet", "resist", "patent", "porter", "invent", "pressur", "adopt", "refug", "evolutionari", "pest", "abandon", "organiz", "experienc", "draw", "cautious", "think", "liabil", "evolut", "consult", "disequilibrium", "synthes", "preliminari", "speed", "modif", "cope", "learn", "regist", "latent", "fuzzi", "interview", "attribut", "attend", "attitudin", "class", "task", "reef", "infer", "statement", "cluster", "mail", "tast", "telephon", "coral", "internet", "dimension", "scienc", "conjoint", "psycholog", "attitud", "meaning", "commut", "segment", "membership", "criterion", "erron", "unresolv", "choke", "disclosur", "mill", "annex", "expert", "hang", "pulp", "cba", "increment", "project", "iso", "indonesia", "revis", "ngos", "financ", "vagu", "fruit", "cdm", "fund", "apprais", "commit", "inequ", "financi", "pilot", "compani", "host", "certif", "subgroup", "facil", "kyoto", "commiss", "right", "resili", "properti", "convex", "rangeland", "graze", "insecur", "actor", "intellectu", "coasean", "tragedi", "secur", "african", "ownership", "neighbor", "regim", "transpar", "puzzl", "slow", "fast", "fraction", "begun", "perman", "estat", "shock", "anim", "slowli", "bifurc", "agroecosystem", "divis", "manur", "wetland", "chemic", "eutroph", "phosphorus", "nutrient", "nitrogen", "pig", "baltic", "sea", "corner", "sediment", "pesticid", "watersh", "substanc", "load", "fertil", "toxic", "cereal", "ordin", "wastewat", "san", "overus", "cumul", "nitrat", "cent", "preclud", "dutch", "contamin", "hire", "acid", "rain", "coke", "ozon", "sulfur", "acidif", "investor", "passag", "sulphur", "destroy", "retir", "space", "deposit", "pair", "jurisdict", "satellit", "manageri", "defens", "nox", "remedi", "precaut", "britain", "contamin", "legisl", "wta", "precursor", "bus", "buffer", "finland", "load", "kuznet", "ekc", "curv", "meter", "pipe", "wealthier", "household", "residenti", "trap", "necess", "semiparametr", "odd", "elast", "parametr", "debt", "poorer", "shortcom", "problemat", "gmm", "month", "poverti", "identif", "urban", "bus", "monoton", "probit", "homogen", "incid", "registr", "broader", "fdi", "haven", "exit", "entri", "manufactur", "bidder", "mobil", "seal", "auction", "incumb", "outward", "orient", "burn", "composit", "procur", "movement", "bid", "reloc", "host", "landhold", "foreign", "canadian", "russia", "iter", "deterr", "nepal", "deter", "updat", "export", "outsid", "hunt", "reindeer", "win", "nuclear", "chernobyl", "deer", "hunter", "sek", "tourism", "carnivor", "regret", "moos", "diseas", "insur", "lifestyl", "herder", "saami", "wildlif", "meat", "weather", "herd", "destin", "poverti", "inflat", "hicksian", "tourist", "bad", "allevi", "accommod", "compensatori", "invas", "nativ", "spill", "cvm", "oil", "lexicograph", "coast", "spike", "passiv", "exxon", "valdez", "carolina", "threaten", "embed", "hurrican", "sequenc", "invad", "scope", "coupl", "tanker", "incompat", "assist", "marin", "ship", "beach", "anim", "hurt", "tobago", "onlin", "refin", "neutral", "threshold", "wind", "livestock", "ocean", "correl", "bid", "netherland", "landscap", "discontinu", "regular", "transmiss", "communic", "downstream", "quantil", "fair", "packag", "bioeconom", "lake", "wage", "dimens", "threshold", "irrevers", "air", "extract", "random", "harvest", "communiti", "sweden", "endang", "park", "reserv", "land", "neglig", "access", "secondari", "equip", "warm", "export", "dioxid", "spend", "usa", "spatial", "technic", "traffic", "illeg", "sweden", "harvest", "legal", "offset", "multinomi", "percentag", "vote", "nonparametr", "speci", "quota", "valid", "normal", "ambient", "home", "north", "volum", "baselin", "phase", "servic", "random", "coordin", "commod", "cge", "agricultur", "clean", "oecd", "rule", "decentr", "bioeconom", "accid", "renew", "capit", "incid", "fee", "air", "clean", "corrupt", "uniform", "pareto", "wta", "nonlinear", "coordin", "capac", "expenditur", "zone", "urban", "agreement", "wildlif", "user", "user", "dirti", "air", "count", "subsidi", "vessel", "distanc", "dirti", "human", "compat", "million", "multi", "valid", "monopolist", "india", "surplus", "green", "endow", "incomplet", "feedback", "technic", "vector", "farm", "shadow", "corrupt", "spatial", "protocol", "access", "harvest", "intertempor", "network", "norway", "reliabl", "intertempor", "intervent", "regim", "oecd", "intertempor", "progress", "fertil", "vertic", "parti", "progress", "irrevers", "stochast", "reject", "wtp", "transit", "deterr", "uniform", "southern", "barrier", "voluntari", "access", "conserv", "parametr", "unilater", "wealth", "principl", "definit", "tariff", "ghg", "paper", "communiti", "count", "principl", "stochast", "constant", "fiscal", "restor", "transfer", "household", "valid", "age", "subsidi", "unilater", "amen", "subsidi", "union", "subsidi", "clean", "conserv", "farmer", "land", "export", "wtp", "transfer", "rule", "overlap", "rule", "energi", "doubl", "communiti", "citizen", "liabil", "financ", "spatial", "extract", "protocol", "union", "subsidi", "volum", "secondari", "vehicl", "accid", "interv", "rural", "refund", "inclus", "constant", "communiti", "spillov", "warm", "sweden", "length", "climat", "union", "pareto", "river", "transboundari", "north", "marin", "project", "travel", "payment", "carbon", "unemploy", "uniform", "trade", "exchang", "transport", "labor", "india", "user", "payment", "sale", "bayesian", "abund", "lake", "implicit", "legal", "principl", "oil", "hedon", "water", "land", "rule", "trade", "expenditur", "transboundari", "deposit", "parti", "stabil", "shadow", "progress", "rule", "uniform", "adapt", "park", "commit", "tax", "regim", "monopoli", "multi", "principl", "technic", "insur", "technic", "user", "human", "abund", "growth", "soil", "clean", "premium", "climat", "commerci", "biomass", "bias", "adopt", "tax", "hazard", "law", "levi", "converg", "spatial", "renew", "converg", "capac", "percept", "subsidi", "nitrogen", "conserv", "capit", "speci", "surplus", "basin", "swedish", "regim", "right", "self", "reform", "rent", "wtp", "agricultur", "biomass", "communiti", "age", "offset", "life", "budget", "adopt", "hazard", "converg", "deposit", "ecosystem", "liabil", "stochast", "sea", "random", "semi", "growth", "space", "tax", "offset", "commod", "stabil", "bank", "expenditur", "intervent", "air", "subsidi", "road", "conserv", "compat", "financi", "food", "constant", "air", "payment", "asymmetr", "levi", "green", "ecosystem", "multi", "uncertainti", "marin", "properti", "transit", "transport", "inclus", "household", "pest", "rent", "inequ", "trade", "project", "payment", "conserv", "rule", "growth", "household", "labor", "risk", "ghg", "household", "agricultur", "uncertainti", "fish", "elast", "capit", "enforc", "servic", "growth", "enforc", "trade", "effluent", "coastal", "attribut", "financi", "adopt", "air", "china", "india", "abund", "adopt", "extract", "commit", "cooper", "manufactur", "elast", "financi", "eastern", "spatial", "million", "coastal" ], | |
"logprob": [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, -3.8708, -3.6664, -0.7912, -5.3447, -5.3447, -5.164, -5.6971, -5.5654, -3.3121, -6.028, -5.0111, -5.2503, -3.7235, -3.9911, -5.5654, -5.8489, -5.5654, -5.164, -5.0846, -5.449, -5.6971, -4.3577, -5.5654, -4.9425, -4.7613, -5.6971, -5.449, -6.2462, -6.5258, -6.5258, -1.4359, -3.0738, -3.7874, -4.6685, -4.7791, -5.0456, -3.9268, -5.6581, -4.2824, -5.5263, -5.4099, -5.8099, -4.8394, -4.972, -5.3057, -4.972, -4.7791, -6.4868, -3.0633, -1.8527, -5.989, -6.4868, -5.8099, -3.7659, -4.436, -6.8763, -4.8394, -5.0456, -5.989, -5.125, -1.8991, -2.2381, -3.7476, -4.3003, -4.377, -4.377, -4.7039, -4.7608, -4.821, -4.3003, -4.8852, -4.9537, -5.1066, -4.8852, -5.1929, -5.1929, -5.2873, -5.3916, -5.3916, -5.1066, -5.508, -5.2873, -5.2873, -5.2873, -5.7916, -5.508, -4.3003, -5.9706, -5.7916, -6.1889, -2.59, -3.7079, -4.2104, -4.4413, -2.6678, -4.4413, -3.4364, -4.935, -5.0085, -5.2686, -5.6211, -5.6211, -3.8652, -2.1514, -5.7729, -3.6474, -5.6211, -5.9519, -5.4893, -5.6211, -6.1702, -5.4893, -5.088, -4.7421, -5.9519, -5.9519, -4.2454, -5.7729, -4.5804, -4.8023, -4.4027, -1.7678, -3.2773, -4.449, -5.29, -4.7836, -3.3223, -3.7118, -5.5382, -5.29, -5.69, -5.5382, -6.0873, -1.7265, -6.0873, -5.0913, -5.1857, -5.29, -4.316, -6.0873, -6.0873, -3.8321, -5.69, -3.7823, -5.5382, -5.1857, -6.3669, -2.4607, -6.7563, -6.7563, -2.2155, -2.0711, -4.764, -4.9855, -3.3994, -5.1661, -2.4808, -5.0717, -2.4541, -4.478, -4.2558, -3.7386, -2.3306, -5.8494, -5.5186, -5.8494, -6.0677, -4.1079, -6.3473, -6.3473, -5.8494, -5.8494, -5.6704, -6.3473, -5.3868, -5.6704, -5.5186, -5.3868, -6.7367, -6.3473, -2.9664, -2.0687, -3.2761, -4.4666, -4.5714, -3.5735, -4.4666, -4.7526, -5.0604, -4.9741, -2.1836, -4.0966, -4.2054, -4.418, -5.3754, -4.6885, -3.6809, -6.0563, -6.0563, -5.1548, -3.5533, -4.5714, -6.3359, -6.3359, -6.0563, -5.8381, -5.659, -4.6885, -5.0604, -4.1315, -3.7897, -1.5207, -4.6167, -5.0489, -4.5599, -4.7411, -4.1563, -4.677, -5.1433, -3.522, -5.0489, -5.6475, -5.4957, -5.8266, -3.0601, -5.4957, -5.4957, -3.522, -4.3602, -4.8096, -5.1433, -6.0448, -3.7158, -5.6475, -4.316, -5.8266, -5.6475, -4.8096, -5.4957, -2.0663, -3.1121, -3.3482, -3.8306, -2.4066, -4.6654, -4.6051, -4.951, -5.0372, -2.356, -3.9447, -5.1317, -4.7295, -5.2359, -5.8149, -5.1317, -4.7295, -2.2125, -5.3523, -5.6359, -6.0332, -5.2359, -5.0372, -4.798, -5.3523, -4.0397, -5.0372, -4.6654, -6.3128, -3.0241, -6.0332, -3.4207, -1.1384, -3.9743, -3.3844, -4.7653, -5.099, -5.2032, -3.4393, -3.7979, -4.2293, -5.7823, -5.7823, -5.7823, -4.2717, -5.4514, -4.7653, -4.1886, -5.7823, -5.6032, -5.6032, -6.0005, -5.7823, -5.6032, -5.6032, -5.7823, -5.6032, -5.0046, -6.0005, -6.2801, -5.6032, -1.4971, -3.0658, -4.7647, -4.4102, -4.7647, -5.2026, -4.3616, -4.515, -4.7647, -4.4612, -4.6962, -4.3616, -4.188, -5.319, -3.4969, -5.6026, -4.5718, -3.5586, -2.9671, -5.2026, -5.0039, -5.9999, -5.0984, -5.4508, -5.7817, -5.2026, -6.2795, -5.4508, -5.9999, -4.8383, -2.4576, -3.8707, -3.9627, -4.1771, -3.3378, -4.7538, -4.8273, -4.0292, -4.9067, -4.993, -5.0874, -5.0874, -5.1917, -4.6853, -5.3081, -4.8273, -5.4399, -3.1644, -4.6853, -5.3081, -3.9627, -5.4399, -4.6211, -4.993, -5.7707, -5.5917, -1.9879, -4.993, -6.2685, -5.5917, -3.5354, -4.3384, -4.5486, -4.815, -4.5486, -4.8944, -1.6284, -4.9807, -5.5794, -5.7584, -5.5794, -5.5794, -4.438, -3.9831, -5.1794, -5.7584, -4.6088, -2.5271, -5.5794, -5.2958, -5.4276, -3.3428, -5.7584, -5.9767, -5.9767, -4.0519, -5.9767, -5.9767, -4.815, -3.8583, -3.1174, -3.6414, -3.3723, -4.8882, -4.1586, -5.0689, -5.4213, -4.6667, -3.8232, -5.7522, -2.468, -3.595, -4.9745, -5.9705, -5.9705, -4.6026, -5.9705, -3.8521, -5.1732, -5.9705, -6.25, -6.25, -5.7522, -5.0689, -4.6667, -5.4213, -1.6543, -5.9705, -4.6667, -4.8882, -2.7812, -3.8471, -4.3459, -4.6319, -4.7004, -4.2068, -4.8534, -2.8237, -2.8457, -5.0341, -4.8534, -4.5075, -3.4128, -5.1383, -5.5383, -4.5075, -5.1383, -5.3865, -5.3865, -5.3865, -2.2461, -5.5383, -5.5383, -3.7884, -5.7174, -5.2547, -4.774, -5.0341, -5.5383, -4.5075, -1.5707, -3.0424, -3.1757, -3.6802, -4.6058, -3.7623, -4.6743, -4.1806, -5.1122, -5.1122, -4.8273, -4.0976, -4.3708, -5.3604, -5.2286, -5.1122, -4.2712, -5.9095, -5.1122, -4.7478, -5.5122, -5.1122, -6.1891, -5.5122, -5.6912, -5.9095, -5.6912, -5.9095, -2.7551, -6.5785, -1.8232, -2.0396, -3.038, -3.1316, -3.7753, -4.5295, -4.6715, -4.4653, -4.598, -5.0359, -5.0359, -5.1523, -5.0359, -5.0359, -4.1949, -4.9316, -5.6149, -4.751, -5.8332, -4.0213, -4.1043, -4.751, -4.751, -3.9084, -6.5022, -6.5022, -5.6149, -5.6149, -5.1523, -5.8332, -3.5333, -2.1936, -2.9059, -3.8539, -4.3288, -2.5698, -4.3288, -3.8889, -5.0164, -4.7315, -5.2646, -5.2646, -5.2646, -3.7875, -4.6521, -3.0488, -5.2646, -5.8137, -5.8137, -6.0933, -5.8137, -4.9121, -3.3308, -5.0164, -5.8137, -6.0933, -6.0933, -4.51, -5.5954, -4.1291, -2.8765, -2.1432, -4.5819, -4.4398, -3.9723, -4.059, -3.8188, -3.4145, -5.3462, -3.042, -5.5253, -4.842, -5.0627, -5.3462, -3.4632, -4.5819, -4.5819, -5.5253, -4.1053, -5.3462, -5.5253, -5.5253, -4.842, -5.0627, -4.5084, -4.6613, -5.7436, -5.7436, -4.6613, -5.7436, -2.0771, -3.2881, -4.4942, -4.0911, -3.8408, -4.9321, -4.9321, -5.0485, -4.6472, -3.8046, -3.449, -5.3321, -5.0485, -4.8278, -4.6472, -5.5111, -5.1803, -5.1803, -4.9321, -3.7032, -5.7294, -5.5111, -5.3321, -4.4257, -5.5111, -5.7294, -4.4942, -4.5678, -4.0911, -5.5111, -3.8673, -3.2152, -2.3081, -4.5566, -3.947, -4.2901, -4.2901, -5.3209, -3.692, -2.4098, -4.7223, -4.2901, -4.1285, -5.0374, -5.5, -4.8167, -4.636, -5.7182, -4.636, -3.8297, -4.0336, -5.7182, -5.7182, -5.9978, -5.5, -5.3209, -5.0374, -5.3209, -3.6604, -6.3873, -3.0957, -3.9406, -3.5646, -1.9517, -4.344, -4.1221, -2.9166, -4.1731, -4.2269, -4.1221, -4.4766, -5.0309, -5.0309, -4.8103, -5.1627, -4.7158, -5.1627, -5.1627, -4.4081, -4.8103, -4.9145, -3.8999, -5.7118, -5.4935, -5.1627, -5.0309, -4.7158, -5.9914, -5.9914, -5.9914, -3.7366, -4.4997, -4.8641, -4.1764, -4.9805, -3.9325, -4.0231, -4.0231, -2.3093, -4.6654, -4.9805, -4.4262, -5.4431, -3.4062, -5.264, -4.7598, -4.6654, -3.8901, -5.1122, -3.3563, -4.0231, -3.381, -5.1122, -4.3576, -4.1764, -4.2935, -5.9409, -4.3576, -4.1226, -4.9805, -1.9125, -3.6292, -1.6279, -3.4528, -4.9745, -4.7538, -5.2581, -5.4371, -4.8581, -5.6554, -5.4371, -4.1705, -4.9745, -4.4202, -4.8581, -3.2799, -5.935, -5.935, -5.2581, -5.6554, -4.9745, -6.3244, -5.1063, -6.3244, -4.8581, -5.1063, -6.3244, -6.3244, -6.3244, -6.3244, -3.7177, -2.9088, -3.0443, -3.9579, -4.0042, -3.7177, -2.8036, -4.8452, -3.754, -3.0813, -5.6425, -5.6425, -4.1038, -4.9616, -4.741, -4.4073, -3.6828, -4.4809, -5.4243, -5.6425, -5.2452, -5.9221, -5.9221, -4.9616, -4.8452, -4.9616, -6.3116, -4.741, -4.8452, -5.9221, -3.448, -3.6636, -4.5411, -4.0846, -3.1404, -4.3196, -4.0846, -5.226, -4.9424, -5.226, -5.4051, -3.6298, -3.6636, -4.5411, -4.3196, -4.9424, -5.9029, -5.226, -4.7218, -5.0742, -5.9029, -5.9029, -4.6274, -4.9424, -4.5411, -6.2924, -5.6233, -5.6233, -5.6233, -4.826, -2.9895, -3.6298, -2.6763, -4.3881, -4.1952, -4.9424, -1.8188, -3.985, -5.0742, -5.4051, -5.226, -5.4051, -3.0435, -3.5971, -4.9424, -4.9424, -5.4051, -5.9029, -5.9029, -5.0742, -4.5411, -5.0742, -4.3881, -5.6233, -5.6233, -5.226, -4.9424, -4.826, -6.2924, -6.2924, -3.2274, -3.5766, -4.235, -3.3736, -3.12, -4.5206, -3.791, -4.922, -2.6687, -5.6028, -5.6028, -4.8056, -5.2055, -3.545, -5.6028, -5.2055, -3.4002, -5.2055, -4.1179, -5.8824, -3.6093, -5.6028, -4.8056, -5.0537, -5.0537, -5.6028, -5.3846, -5.2055, -3.791, -4.8056, -3.4734, -3.8614, -3.3244, -3.7708, -4.338, -4.338, -4.5037, -4.5037, -3.5399, -4.5981, -4.5981, -4.7024, -4.196, -3.6487, -4.9506, -5.2814, -5.2814, -3.4418, -5.1024, -4.7024, -5.4997, -4.8188, -4.2645, -5.2814, -5.2814, -5.2814, -4.196, -4.9506, -5.2814, -5.7792, -2.8885, -4.1188, -3.284, -3.6747, -2.8184, -4.6893, -4.2514, -4.4907, -4.0585, -5.0893, -5.0893, -5.2684, -4.1829, -4.1188, -4.9375, -4.0585, -5.4866, -3.5269, -4.4907, -5.7662, -5.4866, -5.2684, -3.5981, -5.2684, -4.4044, -4.6893, -6.1557, -5.7662, -5.7662, -5.4866, -5.0846, -4.449, -4.636, -4.196, -5.508, -4.2754, -3.7781, -5.2026, -4.8273, -5.3145, -5.2684, -6.3473, -5.4841, -5.2032, -5.5917, -4.1907, -5.2684, -3.7476, -5.3868, -4.3507, -3.983, -4.3517, -4.4938, -2.9218, -3.7215, -3.4314, -2.7707, -3.9708, -4.1318, -4.325, -4.9061, -4.2054, -2.7404, -4.7476, -4.0171, -4.9616, -5.4051, -4.1625, -4.1586, -3.7724, -4.9424, -5.6581, -3.2757, -4.188, -4.993, -4.9316, -4.5603, -3.1143, -4.8177, -4.8394, -4.935, -5.0604, -4.6654, -5.0742, -2.7689, -3.1919, -3.6671, -4.9145, -4.1384, -4.9745, -4.6667, -4.9121, -4.6654, -4.9424, -3.161, -3.8652, -4.6282, -4.2973, -4.6715, -3.0264, -3.6985, -4.8096, -3.4345, -4.4202, -4.3388, -4.7538, -3.5354, -2.9867, -5.449, -4.9035, -3.2088, -3.9126, -5.1328, -3.791, -4.8947, -4.7295, -5.0046, -4.4398, -3.8822, -4.235, -4.821, -4.6852, -3.1122, -4.8325, -4.1886, -4.3482, -5.164, -4.0046, -4.5981, -4.1884, -4.4907, -4.8665, -4.5206, -4.478, -5.1063, -4.3881, -4.6396, -3.8306, -4.8882, -4.338, -4.196, -3.9659, -4.798, -4.8177, -4.842, -4.2333, -5.1627, -3.9579, -5.0489, -5.2958, -3.9159, -4.1226, -4.1003, -3.7873, -4.4257, -5.0046, -5.0984, -4.9424, -4.972, -4.9135, -4.0336, -4.7218, -4.8521, -4.6088, -4.196, -5.1732, -4.5819, -4.483, -4.5566, -4.3517, -4.951, -3.3551, -4.3384, -5.2646, -4.418, -4.774, -5.0309, -3.8495, -4.3196, -3.3736, -4.4044, -4.9741, -4.7538, -4.4145, -5.4064, -4.5724, -4.6319, -4.0716, -3.9099, -5.088, -4.8521, -4.5599, -4.4917, -4.8278, -4.8452, -3.8012, -3.9446, -4.0017, -4.5506, -4.1992, -4.9745, -4.9135, -4.2945, -4.4398, -4.0336, -3.9325, -3.6065, -4.2144, -4.1429, -4.8383, -3.5646, -4.2137, -4.2444, -4.815, -4.5689, -3.8976, -4.3486, -4.6058, -5.2646, -4.5819, -5.0111, -4.478, -4.5156, -4.6521, -4.2935, -4.4612, -5.2841, -5.0374, -4.5411, -4.5981, -5.4064, -5.0341, -5.0164, -4.8057, -4.9256, -4.6715, -4.7476, -4.4942, -4.826, -5.088, -3.6584, -4.8832, -4.5981, -4.8665, -4.4617, -4.6893, -5.0717, -4.2445, -4.5502, -4.1747, -4.0402, -4.993, -4.4809, -3.448, -5.1063, -4.3881, -4.3677, -4.8056, -4.4044, -4.5599, -4.9209, -5.088, -5.2704, -5.3196, -5.2286, -4.9463, -4.6472, -4.8383, -4.5609, -3.8306, -4.0641, -4.7613, -3.9563, -4.8944, -4.8882, -4.9316, -4.9121, -4.196, -5.0751, -4.8177, -4.3013, -5.0111, -4.636, -5.088, -4.6885, -3.8816, -4.7353, -4.9463, -5.0046, -5.0046, -4.815, -5.29, -4.5851, -4.8665, -4.6211, -5.0751, -4.4245, -4.6274, -4.6274, -5.3868, -4.5226, -5.1066, -5.0272, -4.3507, -4.5075, -3.8188, -4.7334, -4.8167, -4.9616, -4.3881, -4.3677, -4.5991, -4.7421, -4.7039, -5.3196, -4.6319, -4.5411, -4.0147, -4.8784, -4.5043, -5.2032, -5.0341, -4.5981, -5.0846, -4.9035, -5.0913, -4.8177, -4.7476, -4.325, -4.8389, -5.2286, -4.6613, -4.8278, -5.1433, -4.8372, -4.9321, -4.3576, -4.8273, -4.798, -4.9121, -4.5603, -4.7218, -5.125, -4.9537, -4.8177, -5.4371, -4.6274, -5.0085, -4.5424, -4.6654, -5.3447, -5.1433, -5.0751, -5.3447, -5.3868, -4.826, -5.2032, -5.0984, -4.8383, -5.1317, -4.8278, -4.9145, -5.2581, -4.8056, -4.8211, -4.8947, -5.4514, -4.9177, -5.1063, -4.7218, -5.0456, -5.0272, -4.8665, -5.2475, -4.9145, -5.0309, -4.6893, -4.9375, -5.0272, -5.4064, -4.9135, -4.9424, -5.2704, -4.8103, -4.9537, -4.9177, -4.8273, -5.0689, -4.9121, -4.7598, -4.9396, -5.1122, -4.8278, -4.8057, -5.4064, -5.0039, -5.2581, -5.0085, -4.8278, -4.9741, -5.0359, -5.449, -5.1066, -5.088, -5.3868, -5.4514, -5.0984, -4.993, -4.993, -5.1732, -5.0164, -5.0164, -4.9463, -4.9463, -5.0374, -4.7598, -4.9616, -4.826, -5.0742, -4.7024, -4.9375 ], | |
"loglift": [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2.9731, 2.9672, 2.9542, 2.7877, 2.7158, 2.6997, 2.699, 2.6502, 2.6444, 2.5928, 2.5564, 2.507, 2.4899, 2.4445, 2.4261, 2.3723, 2.3657, 2.3624, 2.3178, 2.3058, 2.2349, 2.2068, 2.1891, 2.1802, 2.1765, 2.1692, 2.1682, 2.1527, 2.1009, 2.1005, 3.0541, 3.0361, 2.9766, 2.9372, 2.9221, 2.8206, 2.7661, 2.7391, 2.7046, 2.6904, 2.6537, 2.5881, 2.5664, 2.4695, 2.451, 2.4388, 2.4301, 2.4249, 2.4027, 2.2561, 2.2292, 2.1434, 2.1279, 2.1084, 2.072, 2.0389, 2.0221, 2.0219, 2.0108, 1.9675, 3.0783, 3.0313, 3.0097, 2.9885, 2.981, 2.9472, 2.9426, 2.9348, 2.926, 2.926, 2.9162, 2.905, 2.8778, 2.8641, 2.8609, 2.8609, 2.841, 2.8173, 2.8173, 2.8147, 2.7885, 2.7684, 2.7684, 2.7676, 2.7071, 2.7031, 2.6893, 2.6469, 2.605, 2.5635, 3.0748, 3.0002, 2.9902, 2.9604, 2.929, 2.9249, 2.8908, 2.8722, 2.7991, 2.7909, 2.776, 2.776, 2.7603, 2.7427, 2.7302, 2.6926, 2.6833, 2.6697, 2.6461, 2.5952, 2.586, 2.5779, 2.5643, 2.5589, 2.5528, 2.552, 2.5444, 2.5323, 2.5147, 2.4771, 3.0821, 3.0776, 3.0067, 2.9993, 2.9301, 2.9258, 2.907, 2.8024, 2.7714, 2.7139, 2.7129, 2.6869, 2.6736, 2.5474, 2.5385, 2.49, 2.4827, 2.4699, 2.4284, 2.4239, 2.4226, 2.3926, 2.3806, 2.3573, 2.3407, 2.3035, 2.2662, 2.2357, 2.1641, 2.1606, 3.1519, 3.0853, 3.043, 3.0045, 2.9778, 2.8937, 2.7975, 2.796, 2.7544, 2.752, 2.7406, 2.7161, 2.6599, 2.6576, 2.6181, 2.456, 2.4388, 2.4227, 2.4153, 2.4103, 2.3759, 2.3645, 2.3168, 2.2814, 2.2677, 2.1939, 2.1924, 2.1826, 2.1764, 2.1661, 3.1807, 3.1399, 3.1081, 3.0998, 3.0861, 3.0193, 3.0177, 3.0063, 3.0035, 2.9567, 2.929, 2.9183, 2.8878, 2.8863, 2.8451, 2.8411, 2.7357, 2.7034, 2.7034, 2.6618, 2.6027, 2.583, 2.5788, 2.5788, 2.5693, 2.567, 2.5605, 2.5514, 2.5157, 2.5157, 3.1752, 3.1339, 3.0909, 3.0162, 3.0074, 2.9676, 2.965, 2.938, 2.9236, 2.9032, 2.8819, 2.8606, 2.8137, 2.7998, 2.7765, 2.7242, 2.7232, 2.6994, 2.6875, 2.6376, 2.6238, 2.5832, 2.5247, 2.4894, 2.4794, 2.3978, 2.2849, 2.2828, 2.2172, 2.2076, 3.2114, 3.1984, 3.1618, 3.1584, 3.0962, 3.0555, 3.0474, 3.0302, 3.0023, 2.9987, 2.9376, 2.9354, 2.8345, 2.8134, 2.8041, 2.8032, 2.8021, 2.791, 2.7721, 2.7291, 2.7013, 2.6775, 2.6565, 2.6472, 2.6294, 2.6236, 2.6096, 2.6042, 2.6038, 2.5982, 3.2384, 3.229, 3.2019, 3.1302, 2.9926, 2.9678, 2.9354, 2.9076, 2.8949, 2.8604, 2.844, 2.844, 2.844, 2.8197, 2.7726, 2.7579, 2.7554, 2.7286, 2.7066, 2.7048, 2.6254, 2.6239, 2.6234, 2.621, 2.6198, 2.6161, 2.5279, 2.5102, 2.484, 2.4636, 3.1661, 3.1407, 3.1072, 3.0757, 3.0497, 3.0183, 3.0136, 2.9705, 2.8989, 2.8144, 2.7966, 2.7598, 2.7587, 2.7467, 2.7354, 2.7084, 2.6999, 2.6596, 2.6563, 2.6215, 2.6176, 2.5136, 2.4389, 2.379, 2.3686, 2.3653, 2.347, 2.3178, 2.3036, 2.2949, 3.2204, 3.2202, 3.2128, 3.1928, 3.1884, 3.116, 3.1032, 3.0905, 3.0884, 3.0713, 3.0512, 3.0512, 3.0272, 3.0243, 2.9981, 2.9884, 2.962, 2.9452, 2.9293, 2.9135, 2.8693, 2.8657, 2.8655, 2.7714, 2.7401, 2.7121, 2.7085, 2.664, 2.6465, 2.6307, 3.2287, 3.1981, 3.1702, 3.1268, 3.1221, 3.1119, 3.1069, 3.0249, 2.9376, 2.8762, 2.8311, 2.831, 2.7823, 2.7635, 2.7596, 2.7569, 2.7343, 2.7053, 2.649, 2.6475, 2.6447, 2.5929, 2.5564, 2.5438, 2.5427, 2.4823, 2.4421, 2.4411, 2.4033, 2.385, 3.2349, 3.2178, 3.2103, 3.1134, 3.053, 3.0011, 2.9862, 2.9093, 2.8816, 2.8787, 2.8634, 2.8089, 2.7962, 2.7942, 2.7942, 2.7442, 2.6584, 2.6342, 2.543, 2.5407, 2.5182, 2.5139, 2.4725, 2.4619, 2.4589, 2.4572, 2.4546, 2.4347, 2.4315, 2.421, 3.2746, 3.2692, 3.2191, 3.1787, 3.1675, 3.1614, 3.14, 3.1089, 3.1044, 3.1029, 3.0755, 3.0187, 3.0166, 3.0004, 2.9678, 2.9423, 2.9248, 2.9211, 2.9209, 2.9208, 2.9062, 2.8647, 2.8623, 2.825, 2.6826, 2.6778, 2.675, 2.6204, 2.5996, 2.5466, 3.3604, 3.3428, 3.3373, 3.3092, 3.2078, 3.205, 3.1966, 3.121, 3.1078, 3.1078, 3.1058, 3.0823, 3.0782, 3.0424, 2.9924, 2.8881, 2.8751, 2.8514, 2.8224, 2.7826, 2.7157, 2.6027, 2.5749, 2.5595, 2.5334, 2.4965, 2.4602, 2.3977, 2.3907, 2.3414, 3.448, 3.4062, 3.3952, 3.3883, 3.3788, 3.2899, 3.2657, 3.2483, 3.2227, 3.1893, 3.1893, 3.1599, 3.1114, 3.0326, 2.9619, 2.9428, 2.7939, 2.7809, 2.6815, 2.6754, 2.5318, 2.4938, 2.4625, 2.4227, 2.4211, 2.4145, 2.3933, 2.3882, 2.3787, 2.3151, 3.3741, 3.3433, 3.3287, 3.3025, 3.2928, 3.2831, 3.2506, 3.2419, 3.2121, 3.1505, 3.1462, 3.1462, 3.1462, 3.1159, 3.0156, 2.9667, 2.9619, 2.9537, 2.9537, 2.8282, 2.8183, 2.7988, 2.7752, 2.7498, 2.7056, 2.6764, 2.6734, 2.6488, 2.629, 2.5455, 3.4536, 3.4332, 3.3689, 3.3396, 3.25, 3.229, 3.2115, 3.1784, 3.178, 3.1664, 3.1162, 3.105, 3.0924, 3.0718, 3.0697, 3.047, 3.0462, 2.9961, 2.9783, 2.9741, 2.8925, 2.8916, 2.8843, 2.8804, 2.8759, 2.8003, 2.7802, 2.779, 2.6959, 2.6694, 3.5133, 3.5066, 3.3973, 3.3752, 3.3563, 3.3067, 3.3067, 3.2769, 3.2429, 3.2323, 3.1949, 3.1931, 3.1875, 3.1831, 3.1264, 3.0113, 2.9779, 2.9777, 2.9585, 2.9274, 2.9102, 2.9034, 2.9001, 2.8639, 2.8141, 2.7928, 2.7902, 2.783, 2.7766, 2.7235, 3.4921, 3.468, 3.4613, 3.3341, 3.312, 3.2167, 3.2162, 3.205, 3.1577, 3.1131, 3.1129, 3.096, 3.0714, 3.0446, 3.0221, 3.0117, 2.9889, 2.9249, 2.9092, 2.9077, 2.8085, 2.8029, 2.8017, 2.7752, 2.7287, 2.6938, 2.6928, 2.6194, 2.5643, 2.5346, 3.538, 3.491, 3.4492, 3.4408, 3.4382, 3.4262, 3.4014, 3.3336, 3.3213, 3.3071, 3.303, 3.2959, 3.2959, 3.2772, 3.259, 3.1745, 3.1642, 3.1617, 3.1341, 3.08, 2.9752, 2.9305, 2.9286, 2.9257, 2.9147, 2.8532, 2.831, 2.7842, 2.7798, 2.7788, 3.558, 3.3933, 3.3769, 3.3712, 3.3471, 3.3264, 3.3034, 3.2985, 3.2955, 3.2865, 3.2581, 3.2078, 3.2011, 3.1854, 3.1583, 3.1293, 3.1081, 3.0208, 2.9728, 2.9566, 2.9323, 2.908, 2.9024, 2.8673, 2.8654, 2.8397, 2.8316, 2.7743, 2.7388, 2.7378, 3.5362, 3.5095, 3.4991, 3.3574, 3.3489, 3.3301, 3.2653, 3.2035, 3.1529, 3.1182, 3.0835, 2.9862, 2.9722, 2.8362, 2.8126, 2.7077, 2.7038, 2.7001, 2.683, 2.6663, 2.609, 2.6027, 2.5659, 2.4424, 2.421, 2.3572, 2.3184, 2.3139, 2.3137, 2.3135, 3.5696, 3.5638, 3.5503, 3.5443, 3.5387, 3.5372, 3.4765, 3.3897, 3.3225, 3.3032, 3.1297, 3.1297, 3.1213, 3.0508, 3.0327, 3.0204, 3.0145, 2.9088, 2.891, 2.7715, 2.763, 2.7158, 2.7116, 2.7069, 2.6873, 2.6218, 2.612, 2.5118, 2.5101, 2.4834, 3.6158, 3.4766, 3.4762, 3.4621, 3.4584, 3.3136, 3.3104, 3.3, 3.2951, 3.1948, 3.1209, 3.0602, 3.0143, 3.004, 2.9655, 2.8818, 2.8728, 2.8516, 2.8155, 2.7508, 2.7402, 2.7316, 2.7279, 2.7265, 2.65, 2.6363, 2.6155, 2.6106, 2.602, 2.6017, 3.6312, 3.6046, 3.5208, 3.4502, 3.3962, 3.3869, 3.342, 3.3387, 3.2547, 3.2407, 3.1972, 3.1199, 3.0569, 3.0526, 3.0098, 3.0041, 2.8292, 2.7447, 2.7427, 2.7039, 2.6916, 2.6508, 2.6334, 2.6155, 2.6104, 2.6054, 2.5517, 2.5159, 2.4846, 2.4838, 3.6549, 3.5993, 3.551, 3.4828, 3.4368, 3.3726, 3.3272, 3.3222, 3.2056, 3.176, 3.176, 3.1417, 3.1247, 3.1226, 3.0384, 3.0299, 2.9489, 2.9476, 2.9239, 2.8959, 2.877, 2.8209, 2.7351, 2.7275, 2.7243, 2.7157, 2.7023, 2.6744, 2.6629, 2.6598, 3.7367, 3.6961, 3.6499, 3.6297, 3.6233, 3.6233, 3.5905, 3.5905, 3.5805, 3.5697, 3.5697, 3.545, 3.4891, 3.3903, 3.38, 3.3682, 3.3682, 3.3506, 3.323, 3.3154, 3.1481, 3.0663, 2.9682, 2.9617, 2.9613, 2.9541, 2.9479, 2.935, 2.88, 2.8674, 3.7897, 3.6725, 3.5996, 3.5925, 3.5831, 3.5589, 3.5369, 3.533, 3.4535, 3.4443, 3.4443, 3.3819, 3.325, 3.3153, 3.3044, 3.3033, 3.2957, 3.2506, 3.2411, 3.1684, 3.1604, 3.0563, 2.992, 2.8876, 2.8751, 2.7742, 2.7723, 2.7607, 2.755, 2.7497, 2.0946, 2.1504, 2.5241, 2.8581, 2.5508, 2.1149, 2.5711, 2.2888, 2.3216, 2.7683, 2.7463, 2.1651, 2.5866, 2.4538, 2.6279, 2.6935, 2.7437, 2.4946, 2.1343, 2.5872, 2.7078, 2.2477, 2.2506, 2.5117, 2.3332, 2.6555, 2.4387, 2.1868, 2.8125, 2.6714, 2.0598, 2.3252, 2.4053, 2.6052, 2.1571, 2.4219, 2.419, 2.078, 2.2953, 2.4491, 2.3748, 1.9204, 2.286, 2.147, 2.5749, 2.2271, 2.384, 2.0952, 2.5331, 1.8225, 2.4385, 2.4294, 2.4875, 2.3803, 2.4397, 2.2741, 2.2678, 2.7157, 2.4261, 2.3342, 2.2829, 2.5071, 2.6462, 2.5147, 2.1173, 2.2218, 2.3217, 2.4545, 2.1239, 2.126, 2.3208, 2.0967, 2.1247, 2.1127, 1.9033, 2.5314, 2.088, 2.2457, 1.893, 1.7932, 2.2247, 2.1068, 2.5355, 2.3925, 2.3226, 2.4616, 2.3028, 2.5101, 2.0535, 2.46, 2.4768, 2.3363, 2.0004, 1.9599, 2.0782, 1.9186, 1.8113, 1.4289, 2.7509, 1.5144, 2.499, 2.3446, 2.4547, 1.7654, 2.1767, 2.2348, 1.8203, 2.1044, 2.1583, 2.6255, 2.5699, 1.3656, 2.4421, 2.3418, 2.439, 2.1018, 2.7223, 1.9747, 2.0474, 2.3726, 1.6458, 2.3853, 2.0739, 1.4222, 2.2399, 2.2652, 2.0525, 2.2988, 1.6936, 2.0119, 1.954, 2.1845, 1.8135, 2.0292, 2.5013, 2.241, 2.3015, 2.155, 2.1878, 1.7879, 2.4295, 1.6595, 1.8799, 2.5134, 1.7654, 2.3994, 2.6449, 2.166, 1.8546, 1.6169, 2.2453, 2.0661, 1.9927, 2.0351, 1.9752, 1.8315, 2.2723, 2.2595, 2.2477, 2.261, 1.5976, 1.5796, 1.8999, 2.2949, 2.2252, 1.0929, 1.2162, 1.9333, 2.0933, 1.5036, 2.0657, 1.8762, 1.4083, 2.1033, 1.6692, 2.0869, 1.3839, 1.7357, 1.0028, 1.6156, 1.4501, 0.6804, 1.3148, 2.0527, 0.9903, 0.7656, 1.8647, 1.5518, 2.4503, 2.1555, 1.5806, 1.0838, 1.5391, 1.8559, 2.2497, 1.2416, 2.1352, 2.3462, 2.128, 2.6871, 1.9665, 2.4506, 2.197, 2.4224, 1.466, 1.4861, 2.3001, 1.7463, 2.1183, 2.0849, 0.6154, 1.66, 2.6192, 1.8263, 1.9549, 2.2603, 1.5183, 1.3604, 2.0753, 1.4532, 0.6144, 2.4094, 1.7025, 0.6608, 1.9612, 1.8442, 1.5889, 2.158, 1.8624, 1.068, 2.1527, 2.0384, 1.7476, 2.2015, 1.8992, 2.4045, 1.8025, 1.5632, 1.7791, 0.5368, 1.0816, 0.7979, 0.1525, 1.8005, 1.5283, 1.7462, 1.9713, 1.96, 2.0212, 1.8203, 1.2579, 1.1724, 1.5933, 1.8779, 1.6245, -0.1361, 1.2523, 2.3625, 1.4553, 1.4451, 1.52, 1.749, 1.75, 1.4004, 1.6222, 1.9429, 0.3107, 1.9861, 1.392, 1.7324, -0.2487, 2.1934, 2.0071, 1.0076, 1.0154, -0.0733, 1.9027, 1.8579, 2.1353, 1.4485, 1.1941, 1.0242, 1.0945, 1.2318, 1.9229, 1.0709, 1.739, 0.9757, 0.354, 0.7043, 1.5626, 2.0573, 2.4382, 0.903, 0.5452, 1.0147, 1.6178, 1.7866, 0.6897, 0.3134, 1.8057, 1.4963, 1.8161, 1.5186, 1.2724, 2.1465, 1.1653, 1.8088, 1.0386, 1.7657, 0.596, 2.0157, 1.0146, 1.4308, 1.2692, 2.2402, 0.1079, 1.6814, -0.7969, 1.9965, 1.4071, 1.0127, 1.6178, 1.3503, 1.5386, 0.6075, 0.4996, 1.7337, 0.1522, 2.1513, 1.4611, 1.5149, 1.1335, 0.6279, 0.8068, 1.3137, 1.6455, 0.4137, 0.05, 1.7381, -0.2002, 1.5628, 0.2605, 0.9707, 1.3178, 2.1972, 0.4715, 2.2624, 1.5069, 1.549, -0.8047, 0.6624, 0.3575, 0.1802, 0.6055, -0.1824, 0.3335, 0.8876, -0.2158, 2.1444, 0.2212, 0.0401, 0.0176, 0.4636, 0.694, 0.2285, 0.2788, 0.2698, -0.0925, 0.5628, -0.9271, 1.6408, 1.9612, 0.3046, 0.9021, 0.0715, 0.3351, 1.4322, 1.9705, 1.8449, 0.5065, 1.0383, 1.3667, 0.2624, 1.5195, 1.3406, 1.3273, 2.2999, 0.4875, 1.9205, 2.1304 ], | |
"Freq": [ 956, 513, 454, 664, 563, 385, 381, 292, 355, 278, 369, 318, 240, 207, 232, 243, 221, 233, 268, 303, 174, 208, 174, 184, 188, 221, 234, 275, 151, 159, 40.527, 49.717, 881.4, 9.2818, 9.2818, 11.12, 6.5248, 7.4438, 70.854, 4.6868, 12.958, 10.201, 46.96, 35.932, 7.4438, 5.6058, 7.4438, 11.12, 12.039, 8.3628, 6.5248, 24.905, 7.4438, 13.877, 16.634, 6.5248, 8.3628, 3.7679, 2.8489, 2.8489, 444.25, 86.353, 42.305, 17.528, 15.692, 12.022, 36.799, 6.5155, 25.787, 7.4332, 8.3509, 5.5978, 14.775, 12.939, 9.2685, 12.939, 15.692, 2.8448, 87.271, 292.83, 4.6802, 2.8448, 5.5978, 43.223, 22.116, 1.9271, 14.775, 12.022, 4.6802, 11.104, 276.32, 196.87, 43.513, 25.036, 23.188, 23.188, 16.722, 15.798, 14.874, 25.036, 13.95, 13.026, 11.179, 13.95, 10.255, 10.255, 9.3308, 8.407, 8.407, 11.179, 7.4831, 9.3308, 9.3308, 9.3308, 5.6354, 7.4831, 25.036, 4.7116, 5.6354, 3.7878, 135.01, 44.147, 26.708, 21.202, 124.91, 21.202, 57.914, 12.941, 12.023, 9.2699, 6.5165, 6.5165, 37.722, 209.35, 5.5987, 46.9, 6.5165, 4.6809, 7.4343, 6.5165, 3.763, 7.4343, 11.106, 15.695, 4.6809, 4.6809, 25.791, 5.5987, 18.448, 14.777, 20.116, 280.44, 61.986, 19.206, 8.2829, 13.744, 59.255, 40.14, 6.4625, 8.2829, 5.5523, 6.4625, 3.7319, 292.27, 3.7319, 10.103, 9.1932, 8.2829, 21.936, 3.7319, 3.7319, 35.589, 5.5523, 37.41, 6.4625, 9.1932, 2.8217, 140.26, 1.9114, 1.9114, 177.18, 204.71, 13.855, 11.103, 54.229, 9.2676, 135.89, 10.185, 139.56, 18.443, 23.031, 38.63, 157.92, 4.6797, 6.5148, 4.6797, 3.7621, 26.702, 2.8445, 2.8445, 4.6797, 4.6797, 5.5972, 2.8445, 7.4324, 5.5972, 6.5148, 7.4324, 1.9269, 2.8445, 82.183, 201.67, 60.292, 18.334, 16.51, 44.786, 18.334, 13.773, 10.125, 11.037, 179.78, 26.543, 23.807, 19.246, 7.3883, 14.685, 40.225, 3.7398, 3.7398, 9.2126, 45.698, 16.51, 2.8276, 2.8276, 3.7398, 4.6519, 5.564, 14.685, 10.125, 25.631, 35.613, 344.38, 15.575, 10.11, 16.486, 13.753, 24.683, 14.664, 9.1992, 46.543, 10.11, 5.556, 6.4668, 4.6451, 73.867, 6.4668, 6.4668, 46.543, 20.129, 12.842, 9.1992, 3.7343, 38.345, 5.556, 21.04, 4.6451, 5.556, 12.842, 6.4668, 199.56, 69.101, 54.573, 33.688, 139.93, 14.619, 15.527, 10.987, 10.079, 147.19, 30.056, 9.1711, 13.711, 8.2631, 4.631, 9.1711, 13.711, 169.89, 7.355, 5.539, 3.7229, 8.2631, 10.079, 12.803, 7.355, 27.332, 10.079, 14.619, 2.8149, 75.457, 3.7229, 49.284, 482.92, 28.332, 51.106, 12.845, 9.201, 8.29, 48.374, 33.798, 21.955, 4.646, 4.646, 4.646, 21.044, 6.468, 12.845, 22.866, 4.646, 5.557, 5.557, 3.7351, 4.646, 5.557, 5.557, 4.646, 5.557, 10.112, 3.7351, 2.8241, 5.557, 336.49, 70.099, 12.82, 18.275, 12.82, 8.2737, 19.184, 16.456, 12.82, 17.366, 13.729, 19.184, 22.821, 7.3645, 45.551, 5.5461, 15.547, 42.823, 77.372, 8.2737, 10.092, 3.7277, 9.1829, 6.4553, 4.6369, 8.2737, 2.8185, 6.4553, 3.7277, 11.91, 127.72, 31.086, 28.351, 22.882, 52.965, 12.854, 11.942, 26.528, 11.031, 10.119, 9.2073, 9.2073, 8.2957, 13.765, 7.3841, 11.942, 6.4725, 62.993, 13.765, 7.3841, 28.351, 6.4725, 14.677, 10.119, 4.6492, 5.5608, 204.29, 10.119, 2.826, 5.5608, 42.342, 18.968, 15.372, 11.777, 15.372, 10.878, 285.07, 9.9786, 5.4838, 4.5848, 5.4838, 5.4838, 17.17, 27.059, 8.1807, 4.5848, 14.474, 116.06, 5.4838, 7.2817, 6.3827, 51.332, 4.5848, 3.6858, 3.6858, 25.261, 3.6858, 3.6858, 11.777, 30.655, 64.294, 38.07, 49.826, 10.942, 22.697, 9.1332, 6.4204, 13.655, 31.74, 4.6118, 123.07, 39.879, 10.037, 3.7075, 3.7075, 14.559, 3.7075, 30.836, 8.2289, 3.7075, 2.8033, 2.8033, 4.6118, 9.1332, 13.655, 6.4204, 277.7, 3.7075, 13.655, 10.942, 87.8, 30.241, 18.364, 13.796, 12.882, 21.105, 11.055, 84.145, 82.318, 9.2276, 11.055, 15.623, 46.686, 8.314, 5.5731, 15.623, 8.314, 6.4868, 6.4868, 6.4868, 149.93, 5.5731, 5.5731, 32.068, 4.6595, 7.4004, 11.969, 9.2276, 5.5731, 15.623, 285.94, 65.637, 57.444, 34.685, 13.746, 31.954, 12.836, 21.029, 8.2843, 8.2843, 11.015, 22.85, 17.388, 6.4635, 7.3739, 8.2843, 19.209, 3.7325, 8.2843, 11.926, 5.5532, 8.2843, 2.8221, 5.5532, 4.6428, 3.7325, 4.6428, 3.7325, 87.485, 1.9118, 204.42, 164.64, 60.665, 55.241, 29.022, 13.652, 11.844, 14.556, 12.748, 8.2274, 8.2274, 7.3233, 8.2274, 8.2274, 19.077, 9.1315, 4.6109, 10.94, 3.7068, 22.693, 20.885, 10.94, 10.94, 25.405, 1.8986, 1.8986, 4.6109, 4.6109, 7.3233, 3.7068, 36.091, 137.8, 67.593, 26.191, 16.291, 94.594, 16.291, 25.291, 8.1903, 10.89, 6.3902, 6.3902, 6.3902, 27.991, 11.79, 58.592, 6.3902, 3.6901, 3.6901, 2.7901, 3.6901, 9.0903, 44.192, 8.1903, 3.6901, 2.7901, 2.7901, 13.591, 4.5902, 19.891, 64.106, 133.46, 11.648, 13.426, 21.428, 19.65, 24.985, 37.432, 5.4237, 54.326, 4.5346, 8.9802, 7.202, 5.4237, 35.654, 11.648, 11.648, 4.5346, 18.761, 5.4237, 4.5346, 4.5346, 8.9802, 7.202, 12.537, 10.758, 3.6454, 3.6454, 10.758, 3.6454, 140.36, 41.816, 12.518, 18.733, 24.06, 8.0791, 8.0791, 7.1913, 10.743, 24.948, 35.601, 5.4157, 7.1913, 8.9669, 10.743, 4.5279, 6.3035, 6.3035, 8.0791, 27.611, 3.64, 4.5279, 5.4157, 13.406, 4.5279, 3.64, 12.518, 11.63, 18.733, 4.5279, 23.149, 44.435, 110.07, 11.619, 21.375, 15.167, 15.167, 5.4103, 27.584, 99.425, 9.8449, 15.167, 17.827, 7.1841, 4.5233, 8.958, 10.732, 3.6364, 10.732, 24.036, 19.601, 3.6364, 3.6364, 2.7495, 4.5233, 5.4103, 7.1841, 5.4103, 28.47, 1.8626, 49.71, 21.355, 31.102, 156.04, 14.266, 17.81, 59.457, 16.924, 16.038, 17.81, 12.494, 7.1773, 7.1773, 8.9495, 6.2912, 9.8356, 6.2912, 6.2912, 13.38, 8.9495, 8.0634, 22.241, 3.633, 4.5191, 6.2912, 7.1773, 9.8356, 2.7469, 2.7469, 2.7469, 24.874, 11.596, 8.0553, 16.022, 7.1701, 20.448, 18.678, 18.678, 103.66, 9.8257, 7.1701, 12.481, 4.5145, 34.611, 5.3997, 8.9405, 9.8257, 21.333, 6.2849, 36.382, 18.678, 35.496, 6.2849, 13.367, 16.022, 14.252, 2.7441, 13.367, 16.907, 7.1701, 154.11, 27.688, 204.86, 33.03, 7.2113, 8.9919, 5.4308, 4.5405, 8.1016, 3.6502, 4.5405, 16.114, 7.2113, 12.553, 8.1016, 39.262, 2.7599, 2.7599, 5.4308, 3.6502, 7.2113, 1.8696, 6.321, 1.8696, 8.1016, 6.321, 1.8696, 1.8696, 1.8696, 1.8696, 25.075, 56.307, 49.168, 19.721, 18.829, 25.075, 62.554, 8.1204, 24.183, 47.384, 3.6586, 3.6586, 17.044, 7.228, 9.0127, 12.582, 25.967, 11.69, 4.551, 3.6586, 5.4433, 2.7663, 2.7663, 7.228, 8.1204, 7.228, 1.8739, 9.0127, 8.1204, 2.7663, 32.01, 25.803, 10.729, 16.936, 43.537, 13.389, 16.936, 5.4088, 7.1822, 5.4088, 4.5222, 26.69, 25.803, 10.729, 13.389, 7.1822, 2.7488, 5.4088, 8.9556, 6.2955, 2.7488, 2.7488, 9.8423, 7.1822, 10.729, 1.8621, 3.6355, 3.6355, 3.6355, 8.0689, 50.424, 26.581, 68.968, 12.451, 15.101, 7.1529, 162.57, 18.633, 6.2698, 4.5037, 5.3868, 4.5037, 47.774, 27.464, 7.1529, 7.1529, 4.5037, 2.7375, 2.7375, 6.2698, 10.685, 6.2698, 12.451, 3.6206, 3.6206, 5.3868, 7.1529, 8.036, 1.8545, 1.8545, 38.899, 27.432, 14.201, 33.607, 43.31, 10.673, 22.14, 7.1448, 68.008, 3.6165, 3.6165, 8.0268, 5.3806, 28.314, 3.6165, 5.3806, 32.725, 5.3806, 15.965, 2.7344, 26.55, 3.6165, 8.0268, 6.2627, 6.2627, 3.6165, 4.4986, 5.3806, 22.14, 8.0268, 27.293, 18.517, 31.681, 20.273, 11.497, 11.497, 9.7414, 9.7414, 25.538, 8.8638, 8.8638, 7.9862, 13.252, 22.905, 6.231, 4.4758, 4.4758, 28.171, 5.3534, 7.9862, 3.5982, 7.1086, 12.374, 4.4758, 4.4758, 4.4758, 13.252, 6.231, 4.4758, 2.7206, 48.299, 14.113, 32.521, 22.002, 51.805, 7.9768, 12.36, 9.7299, 14.989, 5.3471, 5.3471, 4.4705, 13.236, 14.113, 6.2237, 14.989, 3.5939, 25.508, 9.7299, 2.7174, 3.5939, 4.4705, 23.755, 4.4705, 10.607, 7.9768, 1.8408, 2.7174, 2.7174, 3.5939, 12.039, 19.206, 10.732, 13.252, 7.4831, 22.846, 35.504, 8.2737, 11.015, 5.4052, 4.4705, 2.8445, 6.447, 8.29, 5.5608, 16.957, 4.4705, 43.513, 7.4324, 19.235, 20.469, 13.443, 11.663, 54.177, 35.15, 35.532, 115.57, 19.675, 14.129, 11.483, 12.02, 21.665, 91.454, 9.8693, 18.785, 7.228, 4.5037, 25.577, 22.697, 23.143, 7.1529, 6.5155, 68.01, 22.821, 10.119, 9.1315, 10.797, 61.085, 9.9904, 14.775, 12.941, 10.125, 14.619, 6.2698, 54.435, 75.848, 45.983, 8.0634, 16.049, 10.037, 13.655, 9.0903, 9.8257, 7.1822, 42.476, 37.722, 15.598, 19.278, 11.844, 50.061, 24.916, 12.842, 46.837, 12.553, 21.196, 12.854, 42.342, 49.484, 8.3628, 13.857, 60.258, 29.027, 7.2903, 22.14, 11.949, 13.711, 10.112, 13.426, 31.065, 14.201, 14.874, 16.612, 54.992, 12.938, 22.866, 16.364, 11.12, 34.046, 8.8638, 29.5, 9.7299, 13.859, 10.673, 18.443, 6.321, 12.502, 15.691, 33.688, 10.942, 11.497, 13.252, 36.851, 12.803, 9.9904, 8.9802, 16.053, 6.2912, 19.721, 10.11, 7.2817, 27.402, 16.907, 30.579, 36.795, 13.406, 10.112, 9.1829, 7.1529, 12.939, 10.105, 17.823, 8.9191, 12.834, 14.474, 13.252, 8.2289, 11.648, 12.506, 11.619, 13.443, 10.987, 52.053, 18.968, 6.3902, 19.246, 11.969, 7.1773, 22.219, 13.334, 33.607, 10.607, 11.037, 8.9919, 13.393, 7.3727, 15.578, 13.796, 17.793, 17.64, 11.106, 12.834, 16.486, 16.271, 8.9669, 8.1204, 35.664, 24.501, 15.866, 19.493, 21.793, 10.037, 10.105, 17.268, 13.426, 19.601, 20.448, 38.464, 15.259, 25.784, 11.91, 31.102, 27.622, 22.895, 11.777, 19.363, 31.97, 20.067, 13.746, 6.3902, 11.648, 12.958, 18.443, 16.489, 11.79, 14.252, 17.366, 6.4191, 7.1841, 10.729, 8.8638, 7.3727, 9.2276, 8.1903, 7.1002, 11.924, 11.844, 9.8693, 12.518, 8.036, 11.106, 41.137, 11.932, 8.8638, 13.859, 11.616, 7.9768, 10.185, 16.069, 11.608, 15.083, 26.458, 10.119, 11.69, 32.01, 6.321, 12.502, 12.437, 8.0268, 10.607, 16.486, 8.0711, 11.106, 8.35, 7.379, 7.3739, 8.0911, 10.743, 11.91, 15.589, 22.398, 16.848, 16.634, 30.148, 10.878, 10.942, 9.1315, 9.0903, 13.252, 9.0797, 9.9904, 15.182, 12.958, 10.732, 11.106, 14.685, 31.004, 12.75, 8.0911, 10.112, 10.112, 11.777, 8.2829, 8.8534, 13.859, 14.677, 9.0797, 16.477, 9.8423, 9.8021, 7.4324, 20.281, 11.179, 12.102, 19.235, 15.623, 24.985, 9.8547, 8.958, 7.228, 12.502, 12.437, 18.569, 15.695, 16.722, 7.379, 13.796, 10.729, 15.885, 14.796, 20.417, 8.29, 9.2276, 8.8638, 12.039, 13.857, 10.103, 9.9904, 9.8693, 11.483, 11.934, 7.3739, 10.758, 8.9669, 9.1992, 10.036, 8.0791, 13.367, 11.942, 12.803, 9.0903, 10.797, 8.9556, 11.104, 13.026, 9.9904, 4.5405, 9.8021, 12.023, 15.463, 9.8257, 9.2818, 9.1992, 9.0797, 9.2818, 7.4324, 8.036, 8.29, 9.1829, 11.91, 9.1711, 8.9669, 8.0634, 5.4308, 8.0268, 12.861, 11.949, 6.468, 11.001, 6.321, 8.9556, 12.022, 12.102, 13.859, 8.2884, 8.0634, 7.1773, 7.9768, 6.2237, 12.102, 7.3727, 10.105, 7.1529, 8.35, 8.9495, 13.026, 11.001, 11.942, 9.1332, 9.0903, 8.9405, 10.141, 8.2843, 8.9669, 7.1002, 7.3727, 10.092, 5.4308, 12.023, 8.9669, 11.037, 8.2274, 8.3628, 11.179, 11.106, 7.4324, 6.468, 9.1829, 10.119, 10.119, 8.2289, 8.1903, 8.1903, 8.0911, 8.0911, 7.1841, 8.9405, 7.228, 8.0689, 6.2698, 7.9862, 6.2237 ], | |
"Total": [ 956, 513, 454, 664, 563, 385, 381, 292, 355, 278, 369, 318, 240, 207, 232, 243, 221, 233, 268, 303, 174, 208, 174, 184, 188, 221, 234, 275, 151, 159, 43.138, 53.237, 956.11, 11.892, 12.779, 15.558, 9.1353, 10.943, 104.77, 7.2974, 20.922, 17.306, 81.043, 64.893, 13.692, 10.881, 14.545, 21.8, 24.677, 17.35, 14.53, 57.044, 17.355, 32.642, 39.27, 15.518, 19.908, 9.1104, 7.2539, 7.2573, 454.1, 89.873, 46.726, 20.138, 18.303, 15.52, 50.168, 9.1262, 37.387, 10.931, 12.74, 9.1188, 24.596, 23.731, 17.317, 24.471, 29.936, 5.4554, 171.11, 664.81, 10.916, 7.2288, 14.447, 113.75, 60.362, 5.4367, 42.386, 34.494, 13.58, 33.644, 278.93, 208.3, 47.042, 27.646, 25.799, 26.685, 19.332, 18.408, 17.484, 29.431, 16.56, 15.636, 13.789, 17.445, 12.865, 12.865, 11.941, 11.017, 11.017, 14.688, 10.093, 12.84, 12.841, 12.851, 8.2455, 10.992, 37.288, 7.3216, 9.1316, 6.3978, 140.25, 49.416, 30.196, 24.694, 150.14, 25.586, 72.317, 16.463, 16.456, 12.792, 9.1271, 9.1271, 53.67, 303.15, 8.2093, 71.404, 10.013, 7.2915, 11.857, 10.936, 6.3737, 12.694, 19.222, 27.312, 8.1958, 8.2023, 45.539, 10.006, 33.556, 27.906, 22.727, 318.27, 75.514, 23.572, 10.894, 18.155, 79.756, 59.989, 9.9617, 13.524, 9.0745, 10.84, 6.3433, 563.65, 7.2609, 20.635, 18.914, 17.261, 47.651, 8.1428, 8.1532, 80.128, 12.651, 87.249, 15.325, 22.626, 7.2085, 369.42, 5.408, 5.4271, 188.85, 233.23, 16.466, 13.713, 68.792, 12.787, 206.44, 15.495, 221.35, 29.323, 37.037, 63.661, 275.29, 8.177, 11.842, 10.003, 8.1813, 59.008, 6.3327, 6.3643, 10.837, 10.962, 13.751, 7.2398, 19.179, 15.549, 18.126, 20.882, 5.4478, 8.1249, 86.595, 221.34, 68.309, 20.945, 19.121, 55.453, 22.737, 17.277, 12.736, 14.548, 243.64, 36.358, 33.619, 27.22, 10.889, 21.731, 66.139, 6.3509, 6.3509, 16.31, 85.827, 31.625, 5.4388, 5.4388, 7.2619, 9.0543, 10.9, 29.032, 20.744, 52.515, 38.224, 385.2, 18.186, 12.721, 20.926, 18.168, 32.69, 19.951, 12.697, 65.57, 14.549, 8.1673, 9.9633, 7.2565, 118.12, 10.896, 10.907, 80.391, 35.184, 23.597, 17.138, 7.2446, 78.872, 11.839, 45.282, 10.848, 14.526, 33.644, 18.09, 563.65, 72.589, 58.075, 37.185, 154.98, 17.231, 19.063, 13.599, 12.691, 190.57, 39.054, 12.668, 18.981, 12.653, 7.2426, 14.478, 21.663, 268.71, 11.764, 9.0282, 6.3345, 14.456, 18.059, 23.424, 13.583, 51.378, 19.059, 28.033, 5.4265, 145.53, 7.2206, 51.896, 513.33, 30.943, 59.964, 17.294, 12.699, 11.819, 70.906, 50.176, 33.737, 7.2574, 7.2574, 7.2574, 33.682, 10.852, 21.87, 39.027, 8.1452, 9.9595, 9.9769, 7.26, 9.0443, 10.824, 10.849, 9.0816, 10.902, 21.668, 8.1464, 6.3232, 12.699, 381.88, 81.602, 15.431, 22.701, 16.345, 10.885, 25.359, 22.712, 19.005, 28.015, 22.546, 32.684, 38.922, 12.712, 79.521, 9.9473, 28.123, 80.648, 146.19, 16.187, 19.821, 8.1239, 21.566, 16.095, 11.682, 20.913, 7.2558, 17.111, 10.023, 32.302, 138.42, 33.697, 30.962, 25.493, 59.271, 15.465, 14.553, 32.74, 13.642, 12.73, 11.819, 11.819, 10.907, 18.152, 9.9953, 16.324, 9.0837, 89.899, 19.961, 10.878, 43.653, 10.002, 22.685, 17.183, 8.1457, 10.02, 369.42, 19.13, 5.4373, 10.869, 46.724, 21.581, 17.985, 14.389, 18.871, 13.49, 355.32, 13.5, 8.0963, 7.1973, 9.0055, 9.0065, 29.607, 47.547, 14.43, 8.1089, 26.185, 216.14, 10.805, 14.368, 12.63, 106.97, 9.9101, 8.0675, 8.0766, 58.8, 8.9311, 8.9404, 29.664, 78.65, 70.531, 42.484, 56.019, 13.554, 29.867, 12.659, 9.0323, 20.744, 49.573, 7.2238, 195.76, 66.98, 17.075, 6.3195, 6.3195, 26.09, 7.2385, 61.682, 18.031, 8.1427, 6.2973, 6.3244, 10.844, 21.705, 32.547, 15.33, 664.81, 9.0537, 33.45, 27.088, 94.873, 32.852, 20.975, 16.407, 15.493, 25.538, 13.666, 107.31, 105.45, 11.839, 14.577, 21.804, 65.292, 11.817, 8.1842, 23.535, 12.746, 9.9809, 9.983, 9.9847, 234.16, 9.0733, 9.095, 54.321, 9.1005, 14.524, 23.556, 19.179, 11.828, 34.961, 292.13, 68.248, 60.055, 37.296, 16.358, 38.131, 15.447, 27.295, 10.896, 10.896, 14.516, 30.826, 23.555, 9.0749, 10.884, 13.572, 31.883, 6.3438, 14.494, 21.712, 10.81, 18.055, 6.3238, 12.637, 10.845, 9.0461, 11.669, 9.9855, 235.71, 5.4109, 207.91, 174.6, 65.051, 59.644, 31.634, 16.264, 14.456, 18.078, 16.242, 10.839, 10.839, 9.9353, 11.717, 12.677, 31.548, 15.393, 9.0209, 21.681, 8.1148, 49.981, 53.1, 28.892, 29.812, 72.039, 5.3927, 5.4282, 13.465, 13.534, 21.7, 11.705, 40.485, 159.4, 79.344, 31.56, 19.822, 116.22, 20.675, 32.379, 10.803, 15.277, 9.0026, 9.0026, 9.0026, 40.647, 18.927, 98.774, 10.824, 6.3025, 6.3025, 5.4025, 7.2162, 18.126, 90.228, 17.151, 8.0773, 6.2877, 6.3068, 31.487, 10.847, 51.095, 72.111, 153.22, 14.261, 16.926, 29.548, 27.672, 35.804, 55.446, 8.0372, 81.442, 7.1481, 14.315, 11.626, 8.9372, 58.876, 19.677, 19.692, 8.0602, 33.946, 9.8552, 8.9402, 8.9481, 17.851, 14.372, 25.13, 23.258, 8.041, 8.051, 25.819, 8.9834, 151.09, 45.313, 15.132, 23.15, 30.302, 10.693, 10.693, 9.8049, 15.154, 35.565, 52.689, 8.0293, 10.723, 13.428, 17.027, 8.0518, 11.589, 11.592, 15.146, 53.396, 7.1617, 8.9695, 10.763, 27.626, 9.8066, 8.0537, 27.768, 25.987, 42.124, 10.736, 25.763, 50.657, 126.33, 15.144, 28.483, 22.232, 22.242, 8.024, 42.889, 161.64, 16.009, 25.083, 30.216, 12.508, 8.0547, 16.118, 19.755, 7.1362, 21.394, 47.985, 43.215, 8.0623, 8.0718, 6.2673, 10.801, 13.377, 17.781, 14.411, 80.128, 5.4001, 53.232, 23.969, 36.397, 184.15, 16.88, 21.328, 72.988, 22.234, 21.332, 24.027, 16.924, 9.7911, 9.7911, 12.44, 8.905, 15.149, 9.7902, 9.8153, 21.459, 15.151, 15.16, 43.723, 7.156, 8.9273, 12.566, 15.244, 21.359, 6.251, 6.2785, 6.2845, 27.488, 15.109, 10.669, 21.342, 9.784, 28.487, 26.626, 26.757, 148.93, 14.245, 10.694, 19.576, 7.1284, 55.516, 8.8997, 15.168, 17.028, 40.342, 12.47, 73.359, 38.588, 75.141, 13.378, 29.471, 35.391, 32.302, 6.2701, 32.343, 42.386, 17.995, 174.1, 32.125, 240.17, 44.618, 9.8247, 12.483, 8.0441, 7.1538, 13.428, 6.2636, 8.066, 31.552, 14.32, 28.557, 18.871, 101.57, 7.1673, 7.1937, 14.4, 9.8419, 20.589, 5.3721, 18.842, 6.3061, 27.917, 23.215, 7.1386, 7.1703, 7.1722, 7.1734, 27.688, 62.535, 55.349, 22.334, 21.442, 28.599, 75.807, 10.734, 34.187, 68.293, 6.2718, 6.2718, 29.465, 13.409, 17.025, 24.061, 49.949, 24.994, 9.905, 8.9737, 13.465, 7.1735, 7.2037, 18.912, 21.668, 20.591, 5.3914, 28.662, 25.869, 9.0501, 34.623, 32.079, 13.343, 21.362, 55.117, 19.592, 24.861, 8.0226, 10.706, 8.9129, 8.0237, 50.318, 50.93, 21.397, 27.748, 16.184, 6.2503, 12.562, 21.566, 16.172, 7.1364, 7.1981, 25.869, 18.904, 30.485, 5.3636, 10.692, 10.745, 10.837, 24.061, 53.925, 29.195, 82.367, 15.958, 20.428, 9.767, 232.18, 26.699, 9.7709, 7.1178, 8.8911, 8.0314, 90.733, 52.387, 14.24, 14.322, 10.741, 7.1048, 7.1189, 16.949, 29.243, 17.873, 36.118, 10.692, 10.747, 16.07, 22.515, 26.216, 6.2424, 6.2476, 41.514, 30.951, 16.816, 42.602, 57.484, 15.106, 32.791, 10.636, 113.75, 6.2307, 6.2307, 14.312, 9.7581, 51.459, 7.1497, 10.728, 70.752, 11.649, 35.391, 6.2338, 61.682, 8.8872, 21.491, 16.896, 16.951, 9.8726, 12.447, 15.307, 63.717, 23.173, 29.908, 21.132, 37.865, 24.725, 14.111, 14.111, 12.356, 12.356, 32.716, 11.478, 11.478, 10.601, 18.601, 35.493, 9.7548, 7.0904, 7.0904, 45.418, 8.8723, 13.336, 7.1031, 15.23, 29.243, 10.647, 10.65, 10.728, 31.959, 15.223, 11.553, 7.1108, 50.914, 16.728, 41.461, 28.249, 67.144, 10.592, 16.776, 13.258, 22.115, 7.9618, 7.9618, 7.0853, 22.206, 23.909, 10.659, 25.699, 6.2087, 46.104, 17.753, 5.3321, 7.1087, 9.8126, 55.606, 11.616, 27.906, 23.215, 5.3677, 8.0162, 8.0614, 10.718, 30.849, 55.089, 31.443, 34.961, 12.801, 67.901, 70.752, 22.576, 31.801, 12.498, 13.378, 8.1334, 12.649, 19.131, 10.9, 41.437, 13.413, 78.74, 21.916, 39.27, 50.28, 55.089, 47.651, 176.77, 94.977, 91.96, 221.15, 85.688, 39.017, 37.037, 38.184, 59.008, 235.71, 25.934, 84.277, 25.148, 16.187, 78.872, 63.717, 80.391, 26.873, 20.694, 155.49, 71.755, 20.913, 31.487, 39.017, 221.15, 25.985, 51.752, 25.403, 22.613, 31.673, 23.424, 221.35, 171.11, 107.06, 19.651, 57.044, 27.103, 38.81, 24.266, 27.023, 23.363, 206.44, 91.96, 38.797, 47.301, 45.282, 234.16, 98.391, 40.529, 155.88, 58.876, 78.74, 27.747, 146.19, 216.14, 26.216, 49.981, 176.77, 98.391, 18.915, 83.503, 29.695, 30.485, 27.139, 38.797, 106.97, 50.066, 27.399, 36.118, 243.64, 45.418, 76.822, 76.822, 37.826, 176.77, 26.033, 135.03, 37.288, 29.882, 37.826, 78.65, 27.809, 53.808, 63.335, 107.06, 35.226, 38.274, 46.64, 195.76, 29.028, 31.464, 27.864, 71.755, 15.231, 107.31, 33.517, 18.915, 155.49, 60.362, 84.277, 221.15, 51.558, 28.177, 31.735, 28.994, 51.558, 39.76, 101.57, 40.529, 51.558, 52.998, 49.949, 24.39, 41.465, 52.998, 47.651, 87.249, 25.225, 268.71, 80.648, 16.951, 83.503, 31.029, 18.774, 98.774, 84.277, 275.29, 52.387, 35.45, 47.547, 63.985, 25.196, 66.98, 40.614, 72.039, 85.688, 26.033, 63.985, 87.249, 67.81, 32.642, 34.393, 303.15, 232.18, 107.06, 52.689, 135.03, 35.45, 45.539, 135.03, 58.273, 135.03, 98.391, 275.29, 105.45, 235.71, 63.717, 268.71, 303.15, 155.88, 42.124, 155.88, 381.88, 81.043, 85.688, 18.054, 47.985, 55.516, 155.49, 94.977, 60.362, 58.273, 135.03, 24.266, 25.148, 51.378, 27.747, 25.418, 22.729, 29.812, 29.377, 67.81, 85.688, 35.184, 78.872, 39.017, 31.047, 563.65, 58.273, 29.695, 50.176, 66.139, 38.81, 55.606, 148.93, 53.67, 145.53, 385.2, 24.677, 83.503, 664.81, 34.494, 79.521, 104.77, 38.274, 76.822, 145.53, 34.283, 32.525, 36.245, 21.916, 32.475, 25.985, 63.985, 67.144, 71.404, 513.33, 235.71, 155.88, 664.81, 50.066, 66.139, 50.93, 41.465, 85.827, 33.517, 52.998, 155.88, 83.503, 79.756, 38.184, 73.359, 956.11, 101.57, 27.1, 63.335, 63.985, 71.755, 35.493, 71.755, 76.822, 78.65, 36.245, 355.32, 54.321, 98.391, 32.755, 563.65, 27.337, 35.66, 190.57, 161.64, 956.11, 53.1, 51.095, 33.494, 118.12, 155.49, 146.19, 118.12, 106.97, 28.956, 135.03, 75.807, 275.29, 216.14, 221.35, 46.64, 33.682, 35.586, 101.57, 174.1, 90.228, 64.893, 58.8, 268.71, 234.16, 35.66, 85.688, 52.689, 51.752, 89.899, 34.115, 161.64, 53.1, 118.12, 50.93, 233.23, 47.985, 87.249, 68.293, 91.96, 18.746, 355.32, 50.318, 956.11, 51.752, 47.301, 85.827, 50.168, 50.066, 39.76, 176.77, 135.03, 43.653, 275.29, 27.809, 75.141, 65.292, 67.81, 176.77, 145.53, 81.442, 33.494, 195.76, 233.23, 63.335, 318.27, 55.606, 240.17, 80.648, 79.521, 29.377, 232.18, 30.216, 58.8, 38.588, 664.81, 148.93, 145.53, 275.29, 155.88, 355.32, 232.18, 104.77, 369.42, 40.614, 232.18, 234.16, 318.27, 208.3, 90.733, 216.14, 159.4, 206.44, 355.32, 159.4, 664.81, 33.737, 34.482, 184.15, 75.141, 161.64, 176.77, 65.57, 38.274, 36.245, 161.64, 94.977, 73.359, 221.34, 57.484, 90.733, 75.141, 32.537, 155.49, 53.808, 34.482 ], | |
"Category": [ "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Default", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic1", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic2", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic3", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic4", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic5", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic6", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic7", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic8", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic9", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic10", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic11", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic12", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic13", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic14", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic15", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic16", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic17", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic18", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic19", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic20", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic21", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic22", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic23", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic24", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic25", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic26", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic27", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic28", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic29", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic30", "Topic1", "Topic5", "Topic21", "Topic29", "Topic3", "Topic5", "Topic9", "Topic11", "Topic16", "Topic22", "Topic30", "Topic6", "Topic9", "Topic10", "Topic12", "Topic20", "Topic30", "Topic3", "Topic6", "Topic12", "Topic22", "Topic24", "Topic24", "Topic26", "Topic13", "Topic22", "Topic3", "Topic24", "Topic29", "Topic30", "Topic6", "Topic13", "Topic15", "Topic19", "Topic24", "Topic25", "Topic27", "Topic5", "Topic14", "Topic26", "Topic27", "Topic2", "Topic4", "Topic11", "Topic12", "Topic17", "Topic25", "Topic16", "Topic18", "Topic2", "Topic4", "Topic7", "Topic9", "Topic27", "Topic30", "Topic3", "Topic4", "Topic22", "Topic26", "Topic14", "Topic14", "Topic18", "Topic23", "Topic26", "Topic27", "Topic4", "Topic7", "Topic15", "Topic17", "Topic25", "Topic26", "Topic8", "Topic13", "Topic24", "Topic6", "Topic12", "Topic13", "Topic28", "Topic1", "Topic2", "Topic12", "Topic14", "Topic18", "Topic28", "Topic7", "Topic9", "Topic10", "Topic19", "Topic10", "Topic28", "Topic3", "Topic4", "Topic18", "Topic6", "Topic10", "Topic17", "Topic1", "Topic2", "Topic29", "Topic1", "Topic30", "Topic4", "Topic28", "Topic6", "Topic24", "Topic26", "Topic6", "Topic9", "Topic14", "Topic29", "Topic29", "Topic1", "Topic9", "Topic18", "Topic19", "Topic21", "Topic22", "Topic25", "Topic8", "Topic13", "Topic16", "Topic23", "Topic3", "Topic6", "Topic20", "Topic10", "Topic11", "Topic27", "Topic2", "Topic16", "Topic26", "Topic27", "Topic5", "Topic13", "Topic29", "Topic14", "Topic19", "Topic21", "Topic21", "Topic24", "Topic9", "Topic12", "Topic13", "Topic18", "Topic7", "Topic15", "Topic22", "Topic23", "Topic27", "Topic28", "Topic30", "Topic7", "Topic24", "Topic21", "Topic5", "Topic10", "Topic15", "Topic23", "Topic29", "Topic4", "Topic5", "Topic8", "Topic13", "Topic20", "Topic25", "Topic7", "Topic17", "Topic30", "Topic3", "Topic14", "Topic14", "Topic16", "Topic17", "Topic19", "Topic21", "Topic23", "Topic15", "Topic25", "Topic6", "Topic11", "Topic22", "Topic2", "Topic7", "Topic13", "Topic2", "Topic8", "Topic9", "Topic16", "Topic18", "Topic19", "Topic1", "Topic6", "Topic10", "Topic18", "Topic23", "Topic11", "Topic17", "Topic21", "Topic26", "Topic29", "Topic5", "Topic15", "Topic18", "Topic30", "Topic5", "Topic17", "Topic19", "Topic20", "Topic27", "Topic4", "Topic7", "Topic8", "Topic29", "Topic4", "Topic26", "Topic30", "Topic6", "Topic20", "Topic22", "Topic28", "Topic11", "Topic12", "Topic25", "Topic26", "Topic24", "Topic26", "Topic28", "Topic28", "Topic30", "Topic8", "Topic21", "Topic4", "Topic6", "Topic10", "Topic16", "Topic19", "Topic20", "Topic11", "Topic12", "Topic25", "Topic28", "Topic1", "Topic8", "Topic13", "Topic14", "Topic17", "Topic18", "Topic29", "Topic13", "Topic18", "Topic20", "Topic1", "Topic21", "Topic4", "Topic7", "Topic11", "Topic14", "Topic19", "Topic10", "Topic10", "Topic13", "Topic5", "Topic30", "Topic4", "Topic12", "Topic13", "Topic16", "Topic26", "Topic27", "Topic6", "Topic2", "Topic3", "Topic3", "Topic12", "Topic15", "Topic19", "Topic20", "Topic21", "Topic25", "Topic26", "Topic28", "Topic3", "Topic4", "Topic3", "Topic10", "Topic15", "Topic26", "Topic29", "Topic1", "Topic3", "Topic10", "Topic15", "Topic29", "Topic1", "Topic2", "Topic5", "Topic18", "Topic19", "Topic30", "Topic10", "Topic16", "Topic19", "Topic20", "Topic8", "Topic17", "Topic20", "Topic23", "Topic12", "Topic9", "Topic18", "Topic25", "Topic26", "Topic2", "Topic3", "Topic18", "Topic24", "Topic27", "Topic4", "Topic14", "Topic23", "Topic1", "Topic8", "Topic13", "Topic1", "Topic6", "Topic27", "Topic10", "Topic11", "Topic11", "Topic9", "Topic20", "Topic22", "Topic24", "Topic28", "Topic7", "Topic7", "Topic10", "Topic11", "Topic24", "Topic26", "Topic2", "Topic3", "Topic4", "Topic8", "Topic22", "Topic22", "Topic30", "Topic30", "Topic3", "Topic5", "Topic16", "Topic27", "Topic6", "Topic22", "Topic3", "Topic11", "Topic12", "Topic14", "Topic18", "Topic23", "Topic15", "Topic16", "Topic20", "Topic30", "Topic5", "Topic11", "Topic24", "Topic4", "Topic20", "Topic7", "Topic17", "Topic1", "Topic3", "Topic4", "Topic6", "Topic10", "Topic11", "Topic12", "Topic12", "Topic14", "Topic18", "Topic18", "Topic19", "Topic19", "Topic21", "Topic23", "Topic25", "Topic26", "Topic27", "Topic29", "Topic30" ] | |
}, | |
"token.table": { | |
"Term": [ "abandon", "abandon", "abandon", "abroad", "abroad", "abund", "abund", "abund", "abund", "abund", "abund", "abund", "academ", "academ", "academ", "access", "access", "access", "access", "access", "access", "access", "access", "accid", "accid", "accid", "accommod", "accommod", "accommod", "accru", "acid", "acidif", "acidif", "acidif", "acreag", "actor", "adapt", "adapt", "adapt", "adapt", "adapt", "adapt", "administr", "administr", "administr", "administr", "administr", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adopt", "adult", "adult", "adult", "adult", "afforest", "afforest", "afforest", "african", "african", "age", "age", "age", "age", "age", "age", "age", "age", "age", "age", "agglomer", "agglomer", "agglomer", "agreement", "agreement", "agreement", "agreement", "agreement", "agri", "agri", "agri", "agricultur", "agricultur", "agricultur", "agricultur", "agricultur", "agricultur", "agricultur", "agricultur", "agricultur", "agroecosystem", "agroecosystem", "agroecosystem", "aid", "aid", "aid", "aid", "aid", "air", "air", "air", "air", "air", "air", "air", "alik", "allevi", "allevi", "allevi", "allevi", "allevi", "altruism", "altruism", "altruism", "altruist", "ambient", "ambient", "ambient", "ambient", "ambient", "ambient", "ambient", "ambigu", "ambigu", "ambigu", "ambigu", "ambigu", "ambigu", "ambigu", "ambigu", "ambigu", "amen", "amen", "amen", "amen", "amen", "amen", "anchor", "anchor", "ancillari", "anim", "anim", "anim", "anim", "annex", "anomali", "apprais", "apprais", "apprais", "apprais", "aquacultur", "aquat", "aquat", "aquif", "arrang", "arrang", "arrang", "arsenic", "art", "art", "artisan", "assist", "assist", "assist", "asymmetr", "asymmetr", "asymmetr", "asymmetr", "asymmetr", "asymmetr", "asymmetr", "asymmetr", "asymmetri", "asymmetri", "asymmetri", "asymmetri", "asymmetri", "asymmetri", "asymmetri", "asymmetri", "atlant", "atlant", "attain", "attain", "attain", "attain", "attain", "attend", "attitud", "attitud", "attitud", "attitud", "attitud", "attitud", "attitud", "attitudin", "attitudin", "attribut", "attribut", "attribut", "attribut", "attribut", "attribut", "attribut", "attribut", "attribut", "attribut", "auction", "auction", "audit", "audit", "audit", "austria", "austria", "austria", "austria", "autarki", "autarki", "author", "author", "author", "author", "author", "author", "author", "author", "author", "author", "author", "autocorrel", "avers", "avers", "avers", "avers", "awar", "awar", "awar", "awar", "awar", "awar", "backstop", "bad", "bad", "bad", "bad", "bad", "bad", "bad", "bad", "bad", "bad", "bag", "bag", "baltic", "baltic", "bank", "bank", "bank", "bank", "bargain", "bargain", "bargain", "bargain", "bargain", "bargain", "barrier", "barrier", "barrier", "barrier", "barrier", "baselin", "baselin", "baselin", "baselin", "baselin", "baselin", "basin", "basin", "basin", "bayesian", "bayesian", "bayesian", "bayesian", "bayesian", "bayesian", "beach", "beach", "begun", "begun", "belief", "belief", "belief", "belief", "belief", "belief", "benevol", "benevol", "bequest", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bias", "bid", "bid", "bidder", "bidder", "bidder", "bifurc", "bifurc", "bifurc", "bifurc", "biggest", "biggest", "bilater", "bilater", "bilater", "bilater", "bilater", "biodivers", "biodivers", "biodivers", "biodivers", "biodivers", "bioeconom", "bioeconom", "bioeconom", "bioeconom", "bioeconom", "bioeconom", "bioeconom", "bioenergi", "bioenergi", "biofuel", "biomass", "biomass", "biomass", "biomass", "bird", "bird", "block", "block", "block", "border", "border", "border", "border", "born", "born", "borrow", "borrow", "brazil", "brazil", "brazil", "brazil", "britain", "britain", "british", "broader", "broader", "broader", "brown", "brown", "brown", "budget", "budget", "budget", "budget", "budget", "budget", "budget", "budget", "budget", "budget", "buffer", "buffer", "buffer", "buffer", "burn", "burn", "burn", "bus", "bus", "bus", "buyer", "buyer", "canadian", "canadian", "canadian", "canal", "canal", "cancer", "capabl", "capabl", "capabl", "capac", "capac", "capac", "capac", "capac", "capac", "capac", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "capit", "car", "car", "car", "carbon", "carbon", "carbon", "carbon", "carbon", "carbon", "carbon", "card", "card", "carlo", "carlo", "carlo", "carnivor", "carolina", "cartel", "cartel", "cash", "cash", "cash", "catastroph", "catastroph", "catastroph", "catastroph", "catastroph", "catch", "catch", "catchment", "catchment", "cautious", "cautious", "cba", "cba", "cba", "ccs", "cdm", "cdm", "cent", "cent", "cent", "cent", "cent", "cereal", "cereal", "certainti", "certainti", "certainti", "certainti", "certif", "certif", "certif", "cfc", "cfc", "cfcs", "cfcs", "cfcs", "cge", "cge", "cge", "cge", "cge", "cge", "chain", "chain", "chain", "charg", "charg", "charg", "charg", "charg", "charg", "charit", "cheap", "cheap", "cheap", "cheap", "cheat", "cheat", "chemic", "chemic", "chemic", "chemic", "chernobyl", "child", "children", "children", "chile", "chile", "china", "china", "china", "china", "china", "chlorofluorocarbon", "chlorofluorocarbon", "choke", "choke", "cite", "cite", "cite", "citizen", "citizen", "citizen", "citizen", "citizen", "citizen", "civil", "civil", "class", "class", "class", "class", "class", "class", "class", "class", "clean", "clean", "clean", "clean", "clean", "clean", "clean", "clean", "climat", "climat", "climat", "climat", "climat", "climat", "climat", "climb", "climb", "club", "club", "cluster", "coal", "coal", "coal", "coalit", "coalit", "coasean", "coast", "coast", "coast", "coastal", "coastal", "coastal", "coastal", "coco", "coco", "cod", "cod", "cohort", "cohort", "coke", "command", "command", "command", "command", "command", "command", "commerci", "commerci", "commerci", "commerci", "commerci", "commerci", "commiss", "commiss", "commiss", "commiss", "commiss", "commiss", "commiss", "commiss", "commit", "commit", "commit", "commit", "commit", "commit", "commit", "commit", "commod", "commod", "commod", "commod", "commod", "commod", "commod", "commod", "communal", "communal", "communal", "communic", "communic", "communic", "communiti", "communiti", "communiti", "communiti", "communiti", "communiti", "communiti", "communiti", "commut", "commut", "commut", "compani", "compani", "compani", "compani", "compani", "compani", "compani", "compani", "compat", "compat", "compat", "compat", "compat", "compat", "compat", "compat", "compensatori", "compensatori", "complementar", "complementar", "complementar", "complianc", "complianc", "complianc", "complianc", "compliant", "composit", "composit", "composit", "composit", "composit", "composit", "composit", "comprehens", "comprehens", "comprehens", "comprehens", "comprehens", "comprehens", "concav", "concav", "concav", "concess", "confer", "confer", "confer", "confer", "configur", "configur", "configur", "conform", "conform", "confus", "confus", "confus", "confus", "congest", "congest", "congo", "congo", "conjoint", "conjoint", "conjoint", "consequenti", "consequenti", "conserv", "conserv", "conserv", "conserv", "conserv", "conserv", "conserv", "conserv", "conserv", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "constant", "consult", "consult", "consult", "contamin", "contamin", "contamin", "contamin", "contamin", "contamin", "contemporari", "contemporari", "contemporari", "contract", "contract", "contract", "contract", "contract", "converg", "converg", "converg", "converg", "converg", "convers", "convers", "convers", "convers", "convers", "convers", "convers", "convex", "convex", "convex", "convex", "convex", "cooper", "cooper", "cooper", "cooper", "cooper", "coordin", "coordin", "coordin", "coordin", "cope", "cope", "cope", "cope", "coral", "coral", "coral", "coral", "corn", "corn", "corner", "corpor", "corpor", "corpor", "corpor", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "correl", "corrupt", "corrupt", "corrupt", "costa", "costa", "costa", "costa", "count", "count", "count", "count", "count", "coupl", "coupl", "coupl", "coupl", "coupl", "cournot", "cournot", "cournot", "court", "court", "court", "cpr", "credenc", "credit", "credit", "credit", "credit", "credit", "criterion", "criterion", "criterion", "criterion", "criterion", "crop", "crop", "crop", "crop", "cropland", "crowd", "crowd", "crowd", "crowd", "cultur", "cultur", "cultur", "cultur", "cultur", "cultur", "cumul", "cumul", "cumul", "cumul", "cumul", "cumul", "curs", "curs", "curv", "curv", "curv", "curv", "curv", "cvm", "cvm", "cycl", "cycl", "cycl", "cycl", "cycl", "cycl", "dam", "david", "deadweight", "deadweight", "death", "debt", "debt", "debt", "debt", "decay", "decay", "decay", "decay", "decentr", "decentr", "decentr", "decentr", "decentr", "decomposit", "decomposit", "decomposit", "decomposit", "deer", "default", "default", "default", "defens", "defens", "defens", "deficit", "deficit", "definit", "definit", "definit", "definit", "definit", "definit", "definit", "deforest", "deleg", "democraci", "democraci", "democrat", "deposit", "deposit", "deposit", "deposit", "deposit", "depreci", "destin", "destin", "destin", "destroy", "destroy", "deter", "deter", "deter", "deter", "deterr", "deterr", "deterr", "dice", "dichotom", "dichotom", "diffus", "diffus", "diffus", "diffus", "diffus", "dimens", "dimens", "dimens", "dimens", "dimens", "dimens", "dimens", "dimens", "dimension", "dimension", "dioxid", "dioxid", "dioxid", "dirti", "dirti", "dirti", "dirti", "dirti", "dirti", "dirti", "dirti", "discard", "discharg", "discharg", "discharg", "disclosur", "discontinu", "discontinu", "discontinu", "discontinu", "discontinu", "discount", "discount", "discount", "discount", "discount", "discount", "diseas", "diseas", "disequilibrium", "disequilibrium", "dispar", "dispar", "dispar", "dispar", "dispos", "dispos", "dispos", "disrupt", "disrupt", "disrupt", "dissip", "dissip", "distanc", "distanc", "distanc", "distanc", "distanc", "distanc", "distortionari", "divers", "divers", "divers", "divers", "divers", "divers", "divers", "divers", "divers", "divers", "diversif", "diversif", "dividend", "dividend", "divis", "divis", "divis", "donat", "donat", "dose", "doubl", "doubl", "doubl", "doubl", "doubl", "doubl", "doubl", "downstream", "downstream", "downstream", "downstream", "draw", "draw", "draw", "draw", "draw", "drink", "drink", "drive", "drive", "drive", "drive", "dump", "dump", "duopoli", "duopoli", "duopoli", "duopolist", "duopolist", "durabl", "durabl", "durabl", "durabl", "dutch", "dutch", "dutch", "dutch", "dutch", "dutch", "dutch", "easier", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eastern", "eco", "eco", "eco", "eco", "eco", "ecolabel", "ecosystem", "ecosystem", "ecosystem", "ecosystem", "ecosystem", "ecosystem", "ecosystem", "effluent", "effluent", "effluent", "ekc", "elast", "elast", "elast", "elast", "elast", "elast", "elast", "elast", "elast", "elast", "elect", "elect", "electr", "electr", "electr", "eleph", "eleph", "embed", "embed", "embed", "embed", "embed", "embodi", "embodi", "embodi", "endang", "endang", "endow", "endow", "endow", "endow", "energi", "energi", "energi", "energi", "energi", "energi", "enforc", "enforc", "enforc", "enforc", "enforc", "enforc", "entitl", "entitl", "entitl", "entri", "entri", "entri", "entri", "episod", "equip", "equip", "equip", "eros", "eros", "erron", "erron", "escap", "estat", "estat", "estat", "ethanol", "ethic", "ethic", "ethic", "ethiopia", "eutroph", "evolut", "evolut", "evolut", "evolut", "evolut", "evolut", "evolut", "evolut", "evolutionari", "evolutionari", "evolutionari", "exchang", "exchang", "exchang", "exchang", "exchang", "exchang", "exchang", "exempt", "exempt", "exempt", "exempt", "exert", "exert", "exert", "exert", "exhaust", "exhaust", "exhaust", "exit", "expenditur", "expenditur", "expenditur", "expenditur", "expenditur", "expenditur", "expenditur", "expenditur", "experienc", "experienc", "experienc", "experienc", "expert", "expert", "expert", "exponenti", "exponenti", "exponenti", "export", "export", "export", "export", "export", "expos", "expos", "exposur", "exposur", "exposur", "exposur", "extinct", "extinct", "extinct", "extract", "extract", "extract", "extract", "extract", "extract", "extract", "extract", "extract", "exxon", "facil", "facil", "facil", "facil", "facil", "facil", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "fair", "farm", "farm", "farm", "farmer", "farmer", "farmer", "farmer", "farmer", "fast", "fast", "fast", "fat", "fat", "fatal", "faustmann", "fdi", "feder", "feder", "feder", "feder", "feder", "fee", "fee", "fee", "fee", "fee", "fee", "fee", "fee", "feed", "feed", "feed", "feedback", "feedback", "feedback", "feedback", "feedback", "feedback", "feedback", "feedback", "fertil", "fertil", "fertil", "fertil", "fertil", "fiber", "fiber", "financ", "financ", "financ", "financ", "financ", "financi", "financi", "financi", "financi", "financi", "financi", "financi", "financi", "financi", "financi", "fine", "fine", "finland", "finland", "finnish", "finnish", "fiscal", "fiscal", "fiscal", "fiscal", "fiscal", "fish", "fish", "fish", "fish", "fisher", "fisheri", "fishermen", "fleet", "fleet", "flood", "flood", "flood", "flood", "food", "food", "food", "food", "food", "food", "footprint", "footprint", "footprint", "foreign", "foreign", "foreign", "foreign", "forest", "forest", "forest", "forest", "forestri", "forestri", "forestri", "formula", "formula", "formula", "formula", "formula", "foster", "foster", "foster", "fraction", "fraction", "fraction", "fraction", "fraction", "fraction", "fraction", "fragment", "frequenc", "frequenc", "frequenc", "frequenc", "fresh", "fresh", "friend", "friend", "friend", "friend", "friend", "friend", "friend", "friend", "fring", "fring", "frontier", "frontier", "frontier", "frontier", "frontier", "frontier", "frontier", "fruit", "fruit", "fruit", "fund", "fund", "fund", "fund", "fund", "fund", "fund", "fund", "fund", "fund", "fuzzi", "garbag", "garden", "garden", "garden", "gasolin", "gasolin", "gear", "genet", "genet", "genuin", "genuin", "geoengin", "geoengin", "germani", "germani", "germani", "germani", "germani", "germani", "germani", "ghg", "ghg", "ghg", "ghg", "ghg", "ghg", "ghg", "gis", "gis", "gmm", "gmm", "gmm", "gnp", "government", "government", "government", "gradual", "gradual", "gradual", "grandfath", "grassland", "grassland", "graze", "graze", "greec", "greec", "greec", "green", "green", "green", "green", "green", "green", "green", "green", "green", "green", "green", "green", "greener", "greener", "groundwat", "groundwat", "growth", "growth", "growth", "growth", "growth", "growth", "growth", "growth", "growth", "growth", "growth", "habitat", "habitat", "habitat", "habitat", "hang", "harmon", "harmon", "harmon", "harmon", "harmon", "hartwick", "harvest", "harvest", "harvest", "harvest", "harvest", "haven", "haven", "hazard", "hazard", "hazard", "hazard", "hazard", "hazard", "health", "health", "health", "health", "health", "heat", "heat", "heat", "heat", "hedon", "hedon", "hedon", "herd", "herd", "herder", "heritag", "heritag", "herring", "herring", "hicksian", "hicksian", "hicksian", "hidden", "hidden", "hidden", "hierarch", "hierarch", "hierarch", "hierarch", "hire", "hire", "hire", "home", "home", "home", "home", "home", "home", "home", "homogen", "homogen", "homogen", "homogen", "homogen", "homogen", "horticultur", "host", "host", "host", "hot", "hotel", "hotel", "hous", "hous", "household", "household", "household", "household", "household", "household", "household", "household", "household", "household", "human", "human", "human", "human", "human", "human", "human", "human", "hunt", "hunter", "hurrican", "hurrican", "hurt", "hurt", "hybrid", "hybrid", "hybrid", "hybrid", "hybrid", "hybrid", "hyperbol", "hypothet", "hypothet", "hypothet", "hypothet", "hypothet", "hypothet", "hypothet", "hysteresi", "hysteresi", "hysteresi", "identif", "identif", "identif", "identif", "identif", "iea", "ill", "ill", "ill", "illeg", "illeg", "illeg", "illeg", "illeg", "illeg", "imag", "imag", "implicit", "implicit", "implicit", "implicit", "implicit", "implicit", "implicit", "implicit", "implicit", "implicit", "impur", "impur", "impur", "impur", "impur", "inadvert", "incid", "incid", "incid", "incid", "incid", "incid", "inciner", "inclus", "inclus", "inclus", "inclus", "inclus", "inclus", "inclus", "inclus", "incompat", "incompat", "incomplet", "incomplet", "incomplet", "incomplet", "incomplet", "incomplet", "incomplet", "incomplet", "incomplet", "inconsist", "inconsist", "inconsist", "inconsist", "inconsist", "inconsist", "inconsist", "increment", "increment", "increment", "incumb", "index", "index", "index", "index", "index", "index", "index", "india", "india", "india", "india", "indonesia", "indonesia", "inequ", "inequ", "inequ", "inequ", "inequ", "infer", "infer", "infer", "infer", "inflat", "inflat", "inflat", "inflat", "inherit", "injuri", "innov", "innov", "innov", "innov", "insecur", "inspect", "inspect", "inspect", "inspect", "insur", "insur", "insur", "intellectu", "intellectu", "intellectu", "intensif", "intensif", "intergener", "intergener", "internet", "internet", "interrel", "interrel", "interrel", "interrupt", "intertempor", "intertempor", "intertempor", "intertempor", "intertempor", "intertempor", "intertempor", "interv", "interv", "interv", "interv", "interv", "intervent", "intervent", "intervent", "intervent", "intervent", "intervent", "intervent", "intervent", "intervent", "interview", "interview", "interview", "interview", "invad", "invas", "invent", "investor", "investor", "involuntari", "irrevers", "irrevers", "irrevers", "irrig", "iso", "iso", "iso", "iter", "iter", "iter", "iter", "iter", "iter", "itq", "japan", "japan", "japan", "japan", "journal", "journal", "journal", "journal", "jump", "jump", "jump", "jurisdict", "jurisdict", "jurisdict", "jurisdict", "jurisdict", "jurisdict", "justic", "justic", "justic", "juvenil", "knightian", "korea", "korea", "korea", "kuznet", "kuznet", "kyoto", "kyoto", "kyoto", "kyoto", "kyoto", "lab", "lab", "lab", "label", "label", "label", "label", "labor", "labor", "labor", "labor", "labor", "labor", "labor", "labor", "lake", "lake", "lake", "lake", "land", "land", "land", "land", "land", "land", "land", "land", "landfil", "landhold", "landhold", "landown", "landown", "landown", "landscap", "landscap", "landscap", "landscap", "landscap", "landscap", "latent", "latent", "law", "law", "law", "law", "law", "law", "leader", "leader", "leader", "leader", "leader", "leadership", "leakag", "leakag", "leakag", "learn", "learn", "learn", "learn", "learn", "learn", "led", "led", "led", "legal", "legal", "legal", "legal", "legal", "legisl", "legisl", "legisl", "legisl", "legisl", "legisl", "legisl", "length", "length", "length", "length", "length", "length", "leontief", "leontief", "levhari", "levi", "levi", "levi", "levi", "levi", "levi", "levi", "levi", "lexicograph", "liabil", "liabil", "liabil", "liabil", "liber", "liber", "liber", "life", "life", "life", "life", "life", "life", "life", "life", "lifestyl", "lifestyl", "livestock", "livestock", "livestock", "livestock", "load", "load", "load", "lobbi", "lobbi", "lobbi", "lobbi", "log", "log", "log", "log", "log", "log", "longev", "longev", "loop", "loop", "loop", "loop", "loop", "lump", "lump", "lump", "lump", "lump", "macro", "macro", "macroeconom", "macroeconom", "macroeconom", "macroeconom", "mail", "malmquist", "malmquist", "manageri", "manageri", "mandat", "mandat", "mandat", "mandat", "mangrov", "manufactur", "manufactur", "manufactur", "manufactur", "manufactur", "manur", "marin", "marin", "marin", "marin", "marin", "marin", "marin", "mass", "materi", "materi", "matrix", "matrix", "matrix", "maxmin", "maxmin", "meaning", "meaning", "meat", "meat", "membership", "membership", "membership", "membership", "meta", "meta", "meta", "meta", "meter", "meter", "mile", "mile", "mile", "mill", "mill", "million", "million", "million", "million", "million", "million", "million", "million", "million", "mine", "miner", "miner", "miner", "miner", "minimum", "minimum", "minimum", "minimum", "minimum", "minimum", "minimum", "minimum", "minimum", "minimum", "mink", "mirman", "misspecif", "misspecif", "misspecif", "mobil", "mobil", "mobil", "mobil", "mobil", "modif", "modif", "modif", "modif", "monitor", "monitor", "monitor", "monitor", "monopoli", "monopoli", "monopoli", "monopoli", "monopoli", "monopoli", "monopoli", "monopolist", "monopolist", "monopolist", "monopolist", "monopolist", "monopolist", "monoton", "monoton", "monoton", "monoton", "mont", "mont", "mont", "month", "month", "month", "month", "montreal", "moos", "moral", "moral", "moral", "moral", "moral", "moral", "morbid", "mortal", "mortal", "motiv", "motiv", "motiv", "motiv", "motiv", "motiv", "motiv", "motiv", "movement", "movement", "movement", "multi", "multi", "multi", "multi", "multi", "multi", "multi", "multi", "multi", "multi", "multinomi", "multinomi", "multinomi", "multinomi", "multinomi", "multinomi", "multinomi", "multispeci", "multivari", "multivari", "multivari", "municip", "municip", "municip", "municip", "nativ", "necess", "neglig", "neglig", "neglig", "neglig", "neglig", "neglig", "neglig", "neglig", "neglig", "negoti", "negoti", "negoti", "negoti", "neighbor", "neighbor", "neighbor", "neighbor", "neighbor", "nepal", "nepal", "nepal", "nest", "nest", "nest", "nest", "nest", "netherland", "netherland", "netherland", "netherland", "network", "network", "network", "network", "network", "network", "network", "neutral", "neutral", "neutral", "neutral", "neutral", "neutral", "news", "news", "ngos", "nitrat", "nitrat", "nitrat", "nitrogen", "nitrogen", "nitrous", "nitrous", "nnp", "nnp", "nois", "noncompli", "nonconvex", "nonconvex", "noncoop", "noncoop", "nonlinear", "nonlinear", "nonlinear", "nonlinear", "nonlinear", "nonlinear", "nonlinear", "nonlinear", "nonparametr", "nonparametr", "nonparametr", "nonparametr", "nonpoint", "nonpoint", "nonrenew", "nonsepar", "nonsepar", "nonsepar", "nontimb", "norm", "norm", "norm", "norm", "norm", "norm", "normal", "normal", "normal", "normal", "normal", "normal", "north", "north", "north", "north", "north", "norway", "norway", "norway", "norway", "norway", "norway", "norway", "norway", "nox", "nox", "nox", "nuclear", "nuclear", "nutrient", "nutrient", "ocean", "ocean", "ocean", "odd", "odd", "oecd", "oecd", "oecd", "oecd", "oecd", "oecd", "oecd", "oecd", "oecd", "offici", "offici", "offici", "offici", "offici", "offset", "offset", "offset", "offset", "offset", "offset", "offset", "offset", "offset", "oil", "oil", "oil", "olg", "oligopoli", "oligopoli", "oligopolist", "oligopolist", "oligopolist", "onlin", "onlin", "onlin", "onlin", "ordin", "ordin", "ordin", "organiz", "organiz", "orient", "orient", "orient", "outdoor", "outdoor", "outsid", "outsid", "outsid", "outsid", "outsid", "outsid", "outward", "overcompli", "overfish", "overfish", "overinvest", "overinvest", "overlap", "overlap", "overlap", "overlap", "overlap", "overlap", "overlap", "overus", "overus", "overview", "overview", "overview", "overview", "overview", "ownership", "ownership", "ownership", "ownership", "ownership", "ownership", "ownership", "ozon", "ozon", "ozon", "packag", "packag", "packag", "packag", "pair", "pair", "pair", "paper", "paper", "paper", "paper", "paper", "paper", "paper", "paper", "paradox", "paradox", "paradox", "paradox", "parametr", "parametr", "parametr", "parametr", "parametr", "parametr", "parent", "parent", "pareto", "pareto", "pareto", "pareto", "pareto", "pareto", "park", "park", "park", "park", "park", "park", "parti", "parti", "parti", "parti", "parti", "parti", "parti", "particul", "particul", "passag", "passiv", "passiv", "passiv", "passiv", "patch", "patch", "patent", "patent", "payment", "payment", "payment", "payment", "payment", "payment", "payment", "payment", "payment", "payoff", "payoff", "payoff", "peak", "peak", "peak", "peak", "pelag", "penalti", "penalti", "penalti", "percentag", "percentag", "percentag", "percentag", "percept", "percept", "percept", "percept", "percept", "percept", "percept", "percept", "percept", "perman", "perman", "perman", "perman", "perman", "perman", "permit", "permit", "permit", "permit", "permit", "pest", "pest", "pest", "pest", "pesticid", "pesticid", "pesticid", "pharmaceut", "pharmaceut", "phase", "phase", "phase", "phase", "phase", "phase", "phase", "phase", "phosphorus", "pig", "pigouvian", "pigovian", "pigovian", "pilot", "pilot", "pilot", "pilot", "pilot", "pipe", "pipe", "plastic", "player", "player", "player", "player", "plot", "plot", "poisson", "poisson", "poland", "poland", "poland", "poland", "poland", "polar", "polar", "polar", "policymak", "policymak", "policymak", "policymak", "policymak", "policymak", "policymak", "policymak", "polish", "poorer", "poorer", "poorer", "poorer", "porter", "porter", "portfolio", "portfolio", "portfolio", "portfolio", "portfolio", "poverti", "poverti", "poverti", "poverti", "poverti", "precaut", "precaut", "precautionari", "precautionari", "precautionari", "preclud", "preclud", "precursor", "precursor", "predat", "predat", "predat", "predat", "preemption", "preemption", "preliminari", "preliminari", "preliminari", "preliminari", "premium", "premium", "premium", "premium", "premium", "premium", "premium", "premium", "premium", "pressur", "pressur", "pressur", "pressur", "pressur", "pressur", "pressur", "pressur", "prey", "prey", "prey", "princip", "princip", "princip", "princip", "princip", "princip", "princip", "princip", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "principl", "probit", "probit", "probit", "probit", "probit", "probit", "problemat", "problemat", "procur", "procur", "progress", "progress", "progress", "progress", "progress", "progress", "progress", "project", "project", "project", "project", "project", "project", "project", "project", "project", "proof", "proof", "proof", "properti", "properti", "properti", "properti", "properti", "properti", "properti", "properti", "proposit", "proposit", "proposit", "proposit", "proposit", "proposit", "protection", "protest", "protest", "protocol", "protocol", "protocol", "protocol", "protocol", "provinc", "provinc", "provinc", "provinci", "psycholog", "psycholog", "psycholog", "psycholog", "publish", "publish", "publish", "publish", "publish", "publish", "publish", "pulp", "pulp", "puls", "puls", "pump", "purif", "purif", "puzzl", "puzzl", "qali", "quantil", "quantil", "quota", "quota", "quota", "quota", "quota", "railway", "railway", "rain", "rain", "rain", "rainfal", "rainfal", "rampd", "rampd", "rampd", "rampd", "rampd", "ramsey", "ramsey", "random", "random", "random", "random", "random", "random", "rangeland", "ratio", "ratio", "ratio", "ratio", "ratio", "ratio", "ratio", "ratio", "ratio", "realiti", "realiti", "realiti", "realloc", "realloc", "realloc", "realloc", "realloc", "rebound", "rebound", "rebound", "recipi", "recipi", "reciproc", "reciproc", "reciproc", "recoveri", "recoveri", "recoveri", "recoveri", "recoveri", "recreat", "recreat", "recruit", "recurs", "recurs", "recurs", "recycl", "recycl", "redistribut", "redistribut", "redistribut", "redistribut", "redistribut", "reef", "reef", "reef", "referenda", "referendum", "refin", "refin", "refin", "refin", "reforest", "reform", "reform", "reform", "reform", "reform", "reform", "reform", "refug", "refug", "refug", "refund", "refund", "refund", "refund", "regener", "regener", "regener", "regim", "regim", "regim", "regim", "regim", "regim", "regim", "regim", "regim", "regist", "regist", "registr", "registr", "regret", "regular", "regular", "regular", "regular", "regular", "regular", "regular", "regular", "reindeer", "reinvest", "reinvest", "reject", "reject", "reject", "reject", "reject", "reject", "reliabl", "reliabl", "reliabl", "reliabl", "reliabl", "reliabl", "relief", "reloc", "reloc", "reloc", "remedi", "remedi", "remedi", "remedi", "remedi", "renegoti", "renew", "renew", "renew", "renew", "rent", "rent", "rent", "rent", "rent", "rent", "reput", "reput", "reput", "reserv", "reserv", "reserv", "reserv", "reserv", "reserv", "reserv", "reserv", "reservoir", "reservoir", "residenti", "residenti", "residenti", "residu", "residu", "residu", "residu", "residu", "resili", "resili", "resili", "resist", "resist", "resist", "resist", "resist", "respiratori", "restor", "restor", "restor", "restor", "restor", "restor", "restor", "restor", "restor", "retir", "retir", "retrospect", "retrospect", "revel", "revel", "revis", "revis", "revis", "revis", "revis", "rica", "rica", "rica", "ricardian", "rice", "ride", "ride", "ride", "ride", "ride", "ride", "right", "right", "right", "right", "right", "right", "riparian", "riparian", "risk", "risk", "risk", "risk", "risk", "risk", "risk", "risk", "river", "river", "road", "road", "road", "road", "road", "rock", "rock", "root", "root", "root", "rotat", "rotat", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "rum", "rum", "runoff", "runoff", "runoff", "rural", "rural", "rural", "rural", "rural", "rural", "russia", "russia", "russia", "russia", "russia", "saami", "safeti", "safeti", "safeti", "safeti", "safeti", "saharan", "saharan", "sale", "sale", "sale", "sale", "sale", "sale", "sale", "sale", "sale", "sale", "salmon", "salmon", "sam", "san", "san", "san", "sanction", "sanction", "satellit", "satellit", "satellit", "satellit", "satisfact", "satisfact", "satisfact", "scandinavian", "scandinavian", "scarciti", "scarciti", "scarciti", "scarciti", "scarciti", "scarciti", "scienc", "scienc", "scienc", "scienc", "scope", "scope", "scope", "scope", "scope", "scope", "scope", "scope", "scope", "scotland", "script", "sea", "sea", "sea", "sea", "seal", "seal", "secondari", "secondari", "secondari", "secondari", "secondari", "secur", "secur", "secur", "secur", "secur", "secur", "sediment", "segment", "segment", "segment", "sek", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "seller", "seller", "seller", "seller", "semi", "semi", "semi", "semi", "semi", "semi", "semi", "semiparametr", "semiparametr", "sequenc", "sequenc", "sequenc", "sequenc", "sequenc", "sequenc", "sequest", "sequest", "sequestr", "servic", "servic", "servic", "servic", "servic", "servic", "servic", "setup", "setup", "setup", "shadow", "shadow", "shadow", "shadow", "shadow", "shadow", "shadow", "shadow", "shadow", "shallow", "shallow", "shallow", "shallow", "shapley", "shapley", "ship", "ship", "ship", "shock", "shock", "shock", "shock", "shock", "shortcom", "shortcom", "shortcom", "shrimp", "signatori", "signatori", "site", "site", "site", "site", "site", "site", "site", "site", "skill", "skill", "skill", "slope", "slope", "slow", "slow", "slow", "slow", "slow", "slowli", "slowli", "smallhold", "soil", "soil", "soil", "soil", "solar", "solar", "solar", "solid", "solid", "south", "south", "south", "south", "south", "south", "south", "south", "southern", "southern", "southern", "southern", "southern", "southern", "soviet", "soviet", "space", "space", "space", "space", "space", "space", "space", "space", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spatial", "spawn", "spawn", "speci", "speci", "speci", "speci", "speci", "speci", "speci", "speed", "speed", "speed", "speed", "spend", "spend", "spend", "spend", "spend", "spend", "spend", "spend", "spike", "spike", "spill", "spill", "spill", "spillov", "spillov", "spillov", "spillov", "sri", "sri", "sri", "stabil", "stabil", "stabil", "stabil", "stabil", "stabil", "stabil", "stabil", "stabil", "stabl", "stabl", "stabl", "stabl", "stabl", "stabl", "stabl", "stabl", "stackelberg", "stackelberg", "stackelberg", "stand", "stand", "stand", "stand", "stand", "stand", "stand", "statement", "statement", "stationar", "stern", "stern", "stiglitz", "stiglitz", "stochast", "stochast", "stochast", "stochast", "stochast", "stop", "stop", "stop", "stop", "stop", "storag", "storag", "storag", "storag", "strateg", "strateg", "strateg", "strateg", "strateg", "strateg", "student", "student", "student", "student", "subgam", "subgroup", "subgroup", "subsid", "subsid", "subsid", "subsid", "subsid", "subsid", "subsidi", "subsidi", "subsidi", "subsidi", "subsidi", "subsidi", "subsidi", "subsidi", "subsidi", "subsist", "subsist", "substanc", "substanc", "substanc", "substanc", "substanc", "sulfur", "sulfur", "sulfur", "sulfur", "sulphur", "sulphur", "summari", "sunk", "sunk", "superfund", "superfund", "superfund", "surplus", "surplus", "surplus", "surplus", "surplus", "surplus", "surplus", "surplus", "surplus", "surplus", "sweden", "sweden", "sweden", "sweden", "sweden", "sweden", "sweden", "swedish", "swedish", "swedish", "swedish", "swedish", "swedish", "swedish", "symmetr", "symmetr", "symmetr", "synthes", "synthes", "tac", "tail", "tail", "taiwan", "taiwan", "taiwan", "taiwan", "taker", "taker", "talk", "talk", "tanker", "tap", "tap", "tariff", "tariff", "tariff", "tariff", "task", "task", "task", "task", "tast", "tast", "tax", "tax", "tax", "tax", "tax", "taxsubsidi", "taxsubsidi", "taxsubsidi", "taylor", "technic", "technic", "technic", "technic", "technic", "technic", "technic", "technic", "technic", "telephon", "temperatur", "temperatur", "temperatur", "temperatur", "terrestri", "terrestri", "thailand", "thermodynam", "think", "think", "think", "think", "think", "think", "think", "threaten", "threaten", "threaten", "threaten", "threaten", "threshold", "threshold", "threshold", "threshold", "threshold", "threshold", "threshold", "threshold", "threshold", "threshold", "thumb", "thumb", "thumb", "tighter", "tighter", "tighter", "tighter", "timber", "tobago", "tobago", "tobago", "top", "top", "top", "tourism", "tourism", "tourism", "tourism", "tourism", "tourist", "tourist", "tourist", "tourist", "toxic", "toxic", "toxic", "toxic", "toxic", "toxic", "tradabl", "tradabl", "trade", "trade", "trade", "trade", "trade", "trade", "trade", "trade", "trade", "trade", "tradeabl", "tradeabl", "tradeabl", "traffic", "traffic", "tragedi", "tragedi", "transboundari", "transboundari", "transboundari", "transboundari", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transfer", "transform", "transform", "transform", "transform", "transform", "transfronti", "transfronti", "transfronti", "transit", "transit", "transit", "transit", "transit", "transit", "transit", "transit", "transmiss", "transmiss", "transmiss", "transpar", "transpar", "transpar", "transport", "transport", "transport", "transport", "transport", "transport", "trap", "trap", "travel", "travel", "travel", "trawl", "trawler", "trawler", "treati", "treati", "treati", "treati", "tree", "tree", "tree", "tree", "tree", "trip", "trip", "tripl", "tripl", "tropic", "tropic", "tropic", "tropic", "tropic", "tuna", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "uncertainti", "underinvest", "underinvest", "underinvest", "unemploy", "unemploy", "uniform", "uniform", "uniform", "uniform", "uniform", "uniform", "uniform", "uniform", "uniform", "uniform", "unilater", "unilater", "unilater", "unilater", "unilater", "unilater", "union", "union", "union", "union", "union", "union", "union", "union", "unresolv", "unresolv", "unstabl", "unstabl", "unsustain", "unsustain", "updat", "updat", "updat", "updat", "upstream", "upstream", "upstream", "urban", "urban", "urban", "urban", "usa", "usa", "usa", "usa", "usa", "usa", "user", "user", "user", "user", "user", "user", "user", "user", "user", "user", "utilitarian", "utilitarian", "vagu", "vagu", "valdez", "valid", "valid", "valid", "valid", "valid", "valid", "valorem", "vector", "vector", "vector", "vector", "vector", "vehicl", "vehicl", "vehicl", "vehicl", "vehicl", "verifi", "verifi", "verifi", "verifi", "verifi", "vertic", "vertic", "vertic", "vertic", "vertic", "vertic", "vertic", "vessel", "vessel", "victim", "victim", "vintag", "vintag", "violat", "violat", "violat", "violat", "violat", "violat", "violat", "virgin", "virgin", "virgin", "visit", "visit", "visitor", "visitor", "volatil", "volatil", "volum", "volum", "volum", "volum", "volum", "volum", "voluntari", "voluntari", "voluntari", "voluntari", "voluntari", "voluntari", "vote", "vote", "vote", "vote", "vote", "vsl", "vulner", "vulner", "vulner", "vulner", "vulner", "vulner", "wage", "wage", "wage", "war", "war", "war", "warm", "warm", "warm", "wast", "wast", "wastewat", "wastewat", "wastewat", "water", "water", "water", "water", "watersh", "watersh", "watersh", "watersh", "waterway", "wealth", "wealth", "wealth", "wealth", "wealth", "wealth", "wealth", "wealth", "wealth", "wealthier", "weather", "weather", "weather", "weitzman", "weitzman", "wetland", "wetland", "wetland", "wetland", "whale", "wider", "wider", "wild", "wild", "wildlif", "wildlif", "wildlif", "wildlif", "win", "win", "wind", "wind", "wind", "wind", "wind", "wood", "wood", "wood", "wood", "worker", "worker", "worker", "wta", "wta", "wta", "wta", "wto", "wtp", "wtp", "wtp", "wtp", "wtp", "yea", "yes", "zone", "zone", "zone", "zone", "zone", "zone" ], | |
"Topic": [ 16, 18, 21, 14, 23, 3, 6, 8, 13, 14, 15, 30, 5, 23, 24, 3, 4, 5, 14, 16, 24, 26, 27, 12, 29, 30, 4, 22, 29, 18, 26, 7, 25, 26, 15, 24, 4, 5, 8, 18, 21, 28, 1, 4, 17, 26, 29, 1, 2, 10, 11, 15, 16, 17, 18, 21, 23, 27, 3, 12, 21, 29, 8, 15, 30, 13, 24, 1, 3, 5, 12, 16, 17, 20, 24, 28, 29, 16, 22, 28, 7, 11, 16, 18, 25, 15, 22, 28, 4, 8, 10, 15, 16, 18, 24, 25, 29, 15, 20, 24, 12, 13, 14, 15, 23, 2, 11, 12, 26, 27, 28, 30, 2, 2, 7, 8, 17, 29, 9, 17, 20, 20, 1, 2, 3, 12, 18, 24, 26, 1, 5, 6, 13, 16, 19, 21, 25, 27, 4, 6, 16, 20, 22, 27, 9, 22, 8, 6, 22, 24, 30, 23, 21, 8, 21, 22, 23, 3, 6, 17, 10, 7, 19, 24, 12, 9, 22, 3, 15, 18, 30, 1, 2, 7, 10, 17, 19, 23, 29, 3, 7, 10, 14, 15, 19, 22, 30, 4, 6, 1, 2, 10, 12, 19, 22, 5, 9, 10, 22, 24, 25, 27, 17, 22, 1, 4, 6, 12, 15, 18, 20, 22, 28, 29, 2, 28, 18, 21, 23, 11, 20, 29, 30, 6, 14, 2, 3, 4, 10, 17, 19, 23, 24, 26, 27, 29, 4, 4, 5, 9, 12, 8, 13, 14, 19, 22, 23, 13, 5, 11, 13, 20, 21, 23, 24, 25, 29, 30, 17, 29, 3, 25, 2, 13, 23, 27, 1, 7, 9, 23, 29, 30, 2, 14, 18, 21, 22, 2, 12, 15, 16, 19, 23, 10, 15, 24, 4, 9, 18, 20, 22, 27, 4, 30, 19, 24, 5, 9, 14, 18, 22, 26, 14, 18, 16, 1, 4, 5, 8, 9, 11, 12, 15, 22, 23, 26, 28, 9, 28, 9, 16, 28, 16, 19, 20, 24, 5, 6, 2, 10, 14, 23, 26, 6, 9, 14, 15, 30, 3, 6, 16, 20, 25, 29, 30, 15, 16, 15, 3, 11, 15, 16, 15, 23, 4, 7, 10, 4, 6, 14, 21, 5, 20, 2, 20, 8, 15, 17, 21, 4, 26, 4, 25, 26, 27, 3, 14, 30, 1, 6, 10, 18, 20, 22, 23, 25, 28, 29, 4, 18, 26, 29, 26, 28, 30, 8, 26, 27, 2, 19, 22, 23, 28, 4, 12, 12, 8, 21, 25, 3, 8, 9, 10, 12, 13, 25, 1, 6, 11, 13, 14, 15, 16, 18, 20, 23, 26, 28, 11, 12, 22, 1, 2, 5, 8, 11, 14, 20, 9, 29, 9, 17, 26, 29, 30, 7, 19, 9, 13, 24, 5, 20, 21, 22, 30, 1, 3, 10, 22, 21, 22, 18, 21, 23, 11, 2, 23, 11, 13, 17, 25, 26, 15, 25, 2, 5, 9, 16, 11, 14, 23, 1, 18, 18, 20, 21, 2, 8, 14, 17, 20, 26, 6, 8, 17, 2, 7, 10, 14, 17, 19, 9, 9, 11, 20, 23, 18, 19, 6, 23, 25, 28, 29, 12, 12, 20, 3, 12, 7, 8, 10, 12, 15, 8, 18, 3, 22, 7, 11, 15, 2, 10, 13, 18, 20, 22, 15, 18, 2, 3, 5, 8, 13, 17, 18, 22, 2, 8, 11, 14, 20, 23, 26, 27, 2, 5, 7, 8, 11, 20, 23, 4, 8, 8, 26, 22, 11, 23, 26, 7, 18, 24, 15, 20, 30, 3, 4, 25, 30, 8, 11, 3, 25, 3, 20, 26, 2, 4, 12, 13, 21, 29, 3, 8, 11, 14, 20, 24, 1, 3, 6, 7, 10, 12, 23, 25, 2, 7, 10, 13, 18, 19, 23, 28, 1, 9, 14, 15, 17, 25, 27, 29, 16, 24, 29, 5, 9, 23, 12, 16, 17, 19, 21, 24, 27, 29, 11, 22, 23, 4, 13, 14, 18, 20, 23, 27, 28, 8, 9, 20, 21, 22, 23, 24, 27, 20, 29, 6, 12, 19, 2, 11, 18, 26, 18, 6, 10, 11, 12, 20, 28, 30, 5, 8, 13, 20, 25, 27, 5, 6, 25, 18, 1, 2, 19, 20, 16, 17, 22, 12, 14, 13, 20, 24, 27, 4, 28, 13, 16, 12, 22, 28, 9, 20, 3, 5, 6, 11, 15, 16, 22, 28, 29, 1, 2, 3, 5, 7, 8, 13, 14, 16, 18, 20, 24, 28, 30, 9, 17, 21, 10, 17, 18, 25, 26, 29, 13, 21, 29, 6, 7, 19, 23, 28, 4, 7, 8, 9, 26, 6, 14, 15, 16, 17, 21, 23, 5, 22, 24, 26, 29, 3, 7, 14, 19, 24, 7, 11, 19, 26, 3, 5, 14, 21, 13, 16, 22, 24, 10, 15, 25, 15, 20, 21, 28, 4, 5, 7, 8, 9, 10, 11, 14, 18, 19, 21, 22, 25, 28, 13, 16, 18, 6, 16, 18, 29, 4, 21, 23, 27, 29, 11, 12, 21, 29, 30, 2, 14, 19, 1, 13, 19, 7, 18, 2, 5, 8, 24, 26, 5, 9, 20, 22, 28, 10, 15, 23, 24, 15, 4, 11, 20, 23, 4, 7, 14, 19, 23, 28, 1, 8, 9, 15, 23, 25, 5, 13, 1, 10, 21, 27, 30, 9, 30, 3, 5, 16, 17, 20, 30, 10, 13, 10, 20, 12, 10, 13, 20, 27, 4, 12, 13, 20, 1, 19, 20, 24, 26, 8, 11, 23, 25, 29, 2, 8, 10, 5, 14, 26, 16, 20, 5, 6, 11, 13, 14, 19, 20, 16, 19, 16, 19, 16, 13, 17, 18, 26, 30, 13, 4, 6, 29, 24, 26, 19, 21, 24, 28, 18, 21, 28, 5, 9, 30, 7, 11, 18, 21, 26, 1, 4, 5, 15, 16, 17, 20, 22, 5, 22, 8, 11, 26, 1, 5, 11, 14, 24, 26, 27, 28, 3, 2, 10, 23, 23, 16, 18, 19, 22, 24, 3, 4, 15, 20, 21, 29, 12, 29, 8, 21, 8, 9, 12, 13, 13, 17, 25, 10, 18, 24, 3, 13, 4, 11, 16, 25, 26, 30, 1, 6, 7, 12, 15, 16, 17, 22, 23, 26, 29, 5, 8, 1, 11, 7, 19, 24, 9, 23, 12, 1, 5, 9, 11, 21, 28, 29, 1, 2, 10, 28, 4, 6, 11, 12, 21, 1, 10, 8, 11, 26, 27, 17, 28, 14, 19, 21, 11, 14, 11, 16, 17, 28, 11, 13, 17, 21, 25, 28, 30, 7, 2, 3, 4, 7, 8, 12, 13, 15, 17, 25, 26, 8, 9, 14, 23, 29, 14, 2, 4, 6, 20, 21, 24, 25, 1, 10, 18, 27, 5, 10, 11, 13, 21, 23, 25, 27, 28, 29, 19, 26, 11, 12, 26, 6, 29, 6, 17, 22, 27, 30, 3, 8, 18, 6, 30, 2, 9, 13, 14, 1, 8, 11, 15, 17, 21, 7, 16, 17, 18, 20, 24, 10, 18, 21, 1, 3, 18, 28, 12, 11, 21, 27, 15, 25, 22, 24, 3, 1, 17, 24, 15, 6, 20, 22, 5, 25, 3, 4, 5, 7, 8, 14, 21, 24, 2, 7, 21, 2, 3, 7, 8, 12, 23, 24, 1, 2, 21, 23, 2, 3, 21, 24, 13, 20, 28, 28, 1, 12, 13, 18, 26, 27, 28, 30, 1, 15, 21, 22, 11, 20, 23, 4, 5, 20, 10, 11, 14, 25, 28, 12, 23, 8, 12, 19, 24, 3, 6, 20, 7, 8, 10, 11, 13, 14, 16, 17, 18, 30, 4, 10, 12, 17, 23, 25, 1, 2, 3, 4, 6, 7, 8, 9, 12, 20, 24, 28, 6, 15, 25, 15, 18, 19, 24, 25, 6, 21, 24, 5, 30, 12, 16, 28, 1, 10, 19, 26, 27, 1, 2, 11, 16, 17, 22, 24, 28, 11, 21, 25, 1, 5, 10, 13, 17, 19, 22, 28, 8, 14, 15, 25, 29, 6, 11, 1, 11, 18, 20, 23, 2, 5, 6, 7, 10, 13, 15, 20, 23, 25, 1, 18, 6, 26, 6, 25, 1, 8, 11, 17, 20, 3, 4, 23, 30, 3, 3, 3, 3, 26, 4, 13, 15, 20, 11, 14, 15, 20, 22, 29, 8, 16, 23, 14, 21, 23, 28, 9, 16, 22, 24, 10, 16, 23, 8, 12, 16, 20, 23, 7, 11, 29, 7, 8, 14, 18, 24, 27, 29, 16, 5, 12, 17, 18, 10, 15, 1, 11, 13, 14, 15, 21, 27, 28, 2, 16, 3, 13, 14, 19, 21, 23, 25, 4, 19, 23, 1, 4, 5, 6, 9, 14, 16, 18, 23, 27, 22, 17, 4, 15, 25, 11, 15, 3, 12, 21, 13, 22, 6, 20, 3, 8, 11, 12, 18, 21, 22, 1, 2, 8, 15, 19, 20, 23, 4, 10, 23, 27, 28, 14, 13, 20, 23, 14, 20, 23, 2, 6, 15, 24, 29, 6, 10, 13, 1, 2, 4, 9, 11, 14, 19, 20, 22, 24, 25, 29, 1, 14, 10, 25, 3, 11, 12, 13, 15, 16, 17, 20, 25, 26, 27, 3, 6, 7, 29, 23, 1, 7, 17, 19, 21, 13, 3, 6, 16, 28, 29, 17, 28, 12, 17, 18, 19, 20, 30, 1, 6, 12, 25, 30, 10, 11, 12, 15, 4, 12, 15, 24, 29, 29, 4, 14, 3, 13, 8, 27, 29, 14, 20, 28, 4, 6, 19, 22, 1, 15, 25, 4, 6, 14, 15, 24, 27, 28, 2, 7, 8, 17, 25, 27, 11, 23, 28, 29, 2, 11, 13, 4, 21, 1, 4, 5, 10, 12, 15, 17, 22, 27, 30, 6, 10, 12, 13, 20, 25, 29, 30, 29, 29, 5, 30, 7, 30, 2, 5, 8, 17, 21, 22, 20, 9, 10, 18, 20, 22, 23, 29, 6, 19, 24, 9, 16, 20, 24, 27, 7, 12, 13, 20, 2, 14, 16, 17, 18, 29, 16, 20, 3, 5, 11, 12, 13, 14, 16, 17, 19, 22, 7, 8, 9, 14, 19, 7, 1, 4, 11, 12, 18, 27, 17, 5, 8, 12, 17, 20, 22, 24, 30, 18, 30, 2, 4, 7, 9, 18, 19, 22, 23, 28, 9, 11, 16, 19, 20, 21, 24, 10, 16, 23, 28, 4, 16, 20, 23, 24, 25, 27, 12, 23, 28, 29, 16, 23, 5, 7, 9, 16, 23, 4, 14, 22, 24, 17, 22, 27, 29, 20, 12, 8, 10, 11, 21, 24, 6, 18, 21, 30, 5, 24, 29, 4, 24, 29, 15, 21, 20, 27, 22, 23, 10, 22, 27, 10, 2, 3, 5, 8, 16, 20, 24, 5, 9, 12, 16, 25, 1, 6, 11, 12, 16, 21, 23, 28, 29, 4, 21, 22, 30, 30, 30, 21, 23, 26, 1, 5, 21, 24, 10, 2, 20, 23, 12, 19, 21, 26, 28, 29, 3, 2, 4, 11, 17, 3, 5, 18, 20, 8, 11, 16, 3, 10, 17, 19, 26, 28, 13, 20, 27, 3, 5, 8, 10, 21, 21, 27, 2, 7, 11, 18, 23, 9, 20, 24, 12, 14, 15, 22, 1, 12, 14, 15, 17, 25, 26, 28, 4, 6, 10, 15, 3, 4, 6, 15, 16, 25, 28, 30, 17, 23, 28, 11, 16, 28, 4, 6, 16, 17, 22, 29, 9, 22, 12, 13, 17, 18, 21, 26, 1, 6, 7, 19, 28, 19, 8, 14, 19, 5, 9, 13, 21, 24, 26, 11, 25, 27, 17, 18, 19, 21, 24, 2, 3, 4, 14, 17, 26, 27, 3, 4, 16, 17, 24, 27, 17, 28, 7, 1, 9, 10, 14, 17, 18, 25, 30, 30, 5, 19, 21, 26, 11, 14, 25, 4, 8, 12, 14, 17, 20, 25, 27, 11, 29, 15, 22, 25, 29, 23, 25, 26, 7, 14, 19, 21, 8, 13, 16, 18, 22, 28, 12, 13, 2, 5, 17, 19, 26, 1, 2, 3, 10, 23, 1, 17, 5, 11, 23, 27, 22, 11, 25, 20, 26, 15, 17, 23, 30, 3, 11, 20, 21, 25, 28, 25, 3, 6, 11, 22, 25, 28, 30, 17, 17, 21, 4, 8, 10, 5, 23, 11, 22, 14, 29, 7, 17, 18, 22, 4, 6, 9, 25, 25, 27, 3, 4, 11, 13, 23, 2, 3, 4, 12, 15, 25, 26, 29, 30, 13, 1, 13, 25, 29, 2, 5, 6, 7, 9, 10, 13, 14, 29, 30, 6, 7, 9, 10, 27, 1, 12, 22, 26, 28, 17, 21, 26, 27, 1, 10, 18, 30, 1, 2, 7, 11, 16, 19, 29, 1, 2, 13, 14, 19, 28, 5, 14, 19, 27, 9, 17, 26, 12, 20, 27, 29, 18, 29, 14, 18, 19, 20, 21, 22, 12, 3, 12, 16, 17, 19, 20, 22, 25, 27, 29, 10, 12, 28, 2, 3, 6, 8, 10, 20, 23, 26, 27, 28, 4, 9, 15, 20, 22, 25, 29, 3, 9, 16, 21, 10, 17, 19, 25, 30, 27, 1, 6, 12, 17, 19, 21, 22, 25, 28, 7, 8, 18, 26, 4, 7, 17, 24, 26, 8, 16, 28, 4, 13, 15, 27, 30, 10, 11, 23, 25, 4, 6, 10, 14, 15, 18, 26, 1, 3, 9, 18, 19, 20, 5, 14, 23, 10, 15, 25, 25, 26, 8, 15, 14, 15, 12, 18, 12, 13, 7, 19, 3, 8, 9, 10, 13, 19, 24, 28, 2, 9, 16, 27, 1, 25, 13, 1, 5, 12, 16, 7, 9, 13, 14, 20, 21, 1, 9, 10, 11, 22, 27, 3, 7, 14, 29, 30, 3, 5, 9, 11, 16, 17, 18, 26, 11, 14, 26, 1, 29, 10, 25, 3, 5, 20, 15, 27, 1, 5, 7, 8, 11, 21, 23, 25, 27, 11, 12, 13, 19, 24, 1, 2, 3, 6, 8, 11, 14, 23, 27, 11, 14, 30, 20, 2, 19, 1, 2, 19, 5, 9, 10, 30, 7, 25, 29, 2, 21, 4, 6, 28, 4, 27, 7, 16, 19, 24, 28, 29, 28, 18, 3, 16, 10, 14, 1, 6, 12, 13, 16, 20, 27, 7, 25, 11, 12, 13, 20, 21, 3, 16, 17, 23, 24, 26, 27, 7, 18, 26, 12, 17, 18, 30, 4, 26, 30, 1, 2, 10, 12, 13, 17, 23, 28, 8, 11, 14, 18, 9, 14, 15, 21, 27, 30, 12, 23, 1, 5, 7, 20, 23, 29, 4, 6, 16, 18, 22, 29, 2, 7, 10, 14, 18, 19, 20, 12, 27, 26, 4, 16, 22, 30, 16, 24, 21, 24, 3, 6, 7, 8, 9, 19, 21, 28, 29, 7, 14, 20, 12, 13, 16, 26, 3, 14, 18, 30, 4, 7, 22, 26, 5, 7, 10, 11, 12, 14, 21, 22, 28, 8, 15, 22, 23, 24, 26, 2, 4, 11, 16, 20, 6, 21, 26, 30, 17, 21, 25, 6, 11, 2, 3, 8, 9, 12, 19, 23, 26, 25, 25, 1, 1, 26, 10, 15, 19, 23, 30, 14, 27, 17, 7, 13, 14, 21, 15, 27, 4, 8, 2, 9, 12, 16, 19, 3, 8, 14, 9, 13, 17, 19, 21, 24, 28, 29, 2, 12, 15, 17, 27, 21, 25, 3, 5, 20, 24, 26, 1, 10, 15, 27, 29, 21, 26, 5, 7, 21, 14, 25, 20, 26, 2, 3, 6, 24, 18, 19, 2, 4, 8, 21, 1, 3, 5, 6, 11, 12, 14, 22, 26, 3, 11, 13, 15, 17, 21, 24, 27, 3, 6, 13, 4, 8, 18, 19, 20, 25, 27, 30, 1, 2, 5, 9, 10, 11, 16, 17, 18, 20, 21, 23, 9, 16, 23, 25, 26, 27, 27, 30, 1, 28, 4, 11, 13, 18, 20, 21, 27, 6, 9, 20, 23, 24, 25, 27, 28, 29, 7, 21, 26, 2, 4, 5, 16, 19, 22, 23, 24, 2, 4, 6, 27, 29, 30, 14, 9, 24, 2, 11, 18, 23, 26, 8, 12, 28, 8, 9, 10, 20, 22, 4, 9, 12, 13, 17, 18, 24, 17, 23, 3, 13, 10, 10, 20, 5, 24, 12, 11, 12, 2, 3, 6, 7, 8, 4, 12, 6, 15, 26, 10, 15, 1, 2, 6, 19, 21, 13, 20, 4, 5, 18, 22, 27, 30, 24, 2, 4, 5, 9, 13, 14, 17, 20, 23, 14, 19, 20, 1, 8, 10, 28, 29, 8, 11, 17, 14, 28, 18, 19, 28, 2, 3, 17, 20, 22, 4, 30, 3, 5, 16, 19, 1, 17, 1, 2, 7, 8, 19, 13, 22, 24, 9, 9, 4, 11, 26, 30, 16, 1, 3, 10, 14, 15, 18, 23, 4, 21, 29, 1, 17, 18, 28, 13, 14, 16, 1, 2, 7, 14, 16, 17, 24, 25, 26, 3, 21, 21, 27, 29, 2, 11, 15, 17, 20, 27, 29, 30, 29, 13, 19, 8, 9, 14, 18, 27, 30, 1, 2, 4, 9, 22, 27, 20, 1, 12, 28, 4, 7, 15, 19, 26, 7, 3, 11, 13, 15, 2, 3, 11, 13, 15, 19, 18, 19, 23, 6, 7, 13, 15, 16, 26, 28, 29, 6, 10, 4, 17, 27, 14, 15, 17, 19, 26, 5, 15, 24, 5, 14, 19, 21, 26, 12, 4, 5, 6, 9, 13, 17, 21, 25, 30, 20, 26, 18, 23, 9, 23, 5, 22, 23, 25, 28, 6, 16, 29, 15, 15, 3, 6, 7, 9, 22, 23, 2, 3, 9, 23, 24, 25, 10, 18, 5, 11, 12, 16, 18, 20, 29, 30, 4, 10, 4, 11, 12, 22, 30, 4, 14, 4, 8, 23, 15, 16, 1, 2, 3, 4, 7, 13, 16, 18, 20, 23, 24, 4, 22, 1, 10, 15, 6, 12, 15, 16, 27, 30, 2, 6, 24, 25, 28, 29, 5, 12, 17, 18, 22, 13, 29, 2, 4, 5, 10, 11, 14, 17, 20, 21, 29, 3, 23, 8, 10, 25, 27, 6, 18, 3, 12, 16, 26, 10, 12, 14, 8, 13, 2, 6, 8, 10, 13, 25, 5, 15, 16, 22, 1, 6, 7, 8, 18, 19, 25, 26, 30, 4, 9, 3, 10, 25, 30, 28, 30, 2, 4, 8, 21, 25, 1, 2, 10, 15, 17, 24, 25, 3, 19, 22, 29, 5, 7, 9, 10, 15, 18, 20, 21, 24, 26, 2, 5, 10, 19, 13, 15, 24, 26, 28, 29, 30, 24, 27, 5, 9, 16, 22, 26, 30, 8, 23, 8, 4, 5, 6, 11, 16, 17, 27, 13, 22, 27, 3, 4, 8, 11, 13, 14, 17, 25, 26, 6, 7, 15, 24, 7, 10, 11, 17, 30, 13, 15, 18, 20, 24, 5, 14, 27, 3, 7, 25, 4, 6, 15, 16, 17, 21, 22, 25, 4, 12, 23, 1, 15, 2, 8, 9, 24, 26, 23, 24, 15, 15, 16, 25, 26, 5, 11, 20, 5, 17, 6, 7, 8, 10, 13, 14, 24, 30, 3, 5, 10, 14, 15, 24, 2, 26, 3, 4, 5, 6, 7, 17, 20, 26, 4, 6, 8, 10, 15, 16, 21, 25, 26, 27, 28, 30, 3, 22, 3, 6, 15, 16, 20, 22, 30, 5, 8, 21, 27, 1, 2, 10, 11, 25, 26, 27, 28, 15, 30, 14, 18, 30, 8, 19, 24, 27, 10, 15, 16, 1, 2, 7, 8, 16, 17, 20, 24, 29, 2, 7, 10, 13, 18, 19, 21, 27, 10, 18, 19, 8, 16, 17, 20, 24, 27, 29, 9, 22, 8, 5, 27, 13, 14, 2, 3, 5, 8, 24, 5, 13, 16, 19, 24, 10, 11, 16, 29, 1, 7, 14, 19, 24, 28, 2, 9, 10, 18, 19, 7, 23, 1, 14, 17, 18, 19, 29, 1, 8, 10, 11, 14, 15, 17, 21, 28, 15, 19, 8, 12, 18, 25, 30, 2, 26, 27, 28, 5, 26, 4, 2, 5, 4, 9, 17, 1, 3, 4, 7, 10, 14, 19, 25, 29, 30, 5, 12, 16, 23, 25, 27, 29, 12, 17, 22, 23, 25, 27, 29, 7, 9, 19, 17, 21, 3, 5, 29, 12, 17, 23, 27, 2, 13, 3, 9, 30, 10, 21, 10, 11, 14, 21, 1, 22, 24, 26, 22, 30, 1, 11, 14, 15, 19, 1, 19, 26, 14, 5, 8, 11, 13, 14, 21, 23, 25, 30, 22, 5, 8, 12, 13, 6, 26, 16, 17, 5, 10, 21, 23, 24, 25, 26, 6, 12, 16, 29, 30, 2, 5, 6, 7, 9, 12, 13, 16, 24, 26, 1, 14, 24, 7, 9, 14, 25, 16, 13, 22, 30, 14, 19, 20, 6, 15, 16, 17, 29, 4, 15, 25, 29, 12, 19, 21, 23, 25, 26, 2, 11, 1, 2, 8, 13, 14, 16, 17, 19, 23, 26, 2, 3, 21, 11, 12, 7, 24, 3, 7, 14, 26, 1, 2, 3, 4, 7, 9, 10, 12, 19, 23, 30, 5, 13, 15, 18, 20, 7, 14, 21, 2, 8, 11, 12, 13, 16, 22, 24, 6, 18, 19, 10, 24, 27, 4, 11, 12, 16, 22, 26, 21, 27, 4, 11, 22, 3, 3, 18, 2, 7, 23, 29, 8, 10, 15, 16, 30, 4, 22, 1, 13, 3, 5, 8, 16, 25, 3, 2, 5, 6, 9, 10, 11, 12, 19, 20, 21, 10, 14, 21, 1, 12, 1, 7, 14, 18, 23, 25, 26, 27, 28, 29, 1, 5, 7, 8, 14, 17, 2, 8, 10, 19, 23, 24, 26, 27, 4, 22, 7, 10, 11, 13, 2, 3, 20, 28, 1, 7, 10, 4, 12, 23, 27, 2, 7, 9, 26, 27, 29, 4, 5, 10, 11, 12, 13, 17, 24, 27, 30, 6, 20, 22, 23, 30, 4, 5, 6, 9, 18, 30, 1, 10, 15, 19, 22, 30, 4, 9, 11, 21, 26, 10, 12, 14, 18, 26, 1, 2, 4, 14, 17, 26, 28, 3, 30, 7, 18, 13, 17, 2, 3, 7, 12, 15, 18, 28, 8, 17, 23, 4, 30, 4, 6, 2, 26, 9, 11, 17, 18, 23, 30, 7, 9, 14, 18, 23, 29, 5, 7, 9, 19, 30, 12, 5, 8, 19, 21, 27, 30, 1, 12, 28, 7, 14, 16, 5, 8, 20, 17, 27, 17, 20, 25, 1, 10, 15, 25, 16, 23, 25, 26, 4, 9, 12, 13, 15, 16, 23, 24, 26, 27, 27, 10, 15, 29, 1, 19, 9, 16, 20, 25, 6, 18, 20, 3, 6, 5, 6, 29, 30, 25, 29, 11, 15, 21, 22, 24, 16, 17, 23, 26, 1, 12, 22, 9, 26, 27, 29, 14, 4, 9, 12, 22, 30, 9, 9, 3, 4, 11, 15, 26, 29 ], | |
"Freq": [ 0.079947, 0.15989, 0.55963, 0.58564, 0.29282, 0.02759, 0.22072, 0.02759, 0.24831, 0.22072, 0.13795, 0.05518, 0.41617, 0.13872, 0.13872, 0.36784, 0.11866, 0.011866, 0.059328, 0.035597, 0.22545, 0.011866, 0.15425, 0.46851, 0.32436, 0.14416, 0.086561, 0.34624, 0.34624, 0.63466, 0.92423, 0.051041, 0.15312, 0.66353, 0.85817, 0.69892, 0.037615, 0.73976, 0.012538, 0.037615, 0.13792, 0.012538, 0.48128, 0.068754, 0.13751, 0.068754, 0.068754, 0.0061864, 0.037119, 0.037119, 0.0061864, 0.098983, 0.0061864, 0.037119, 0.049491, 0.61246, 0.080424, 0.018559, 0.058197, 0.58197, 0.11639, 0.11639, 0.41306, 0.41306, 0.068844, 0.34917, 0.48884, 0.075918, 0.36061, 0.018979, 0.13286, 0.075918, 0.018979, 0.17081, 0.018979, 0.018979, 0.075918, 0.4285, 0.0857, 0.3428, 0.73878, 0.016417, 0.0082087, 0.22574, 0.0041043, 0.67985, 0.084981, 0.16996, 0.012812, 0.0042707, 0.051248, 0.6406, 0.034165, 0.0042707, 0.0085413, 0.21353, 0.021353, 0.13943, 0.27885, 0.27885, 0.11092, 0.11092, 0.44367, 0.055459, 0.16638, 0.19234, 0.050915, 0.33943, 0.30549, 0.045257, 0.045257, 0.0056572, 0.54991, 0.065691, 0.065691, 0.26276, 0.065691, 0.39415, 0.099005, 0.033002, 0.79204, 0.71393, 0.43825, 0.01753, 0.01753, 0.070121, 0.10518, 0.03506, 0.28048, 0.050009, 0.66679, 0.11669, 0.033339, 0.033339, 0.01667, 0.033339, 0.01667, 0.01667, 0.57094, 0.021959, 0.21959, 0.087836, 0.043918, 0.021959, 0.73757, 0.15805, 0.87979, 0.25845, 0.043075, 0.25845, 0.3446, 0.74982, 0.89277, 0.080195, 0.16039, 0.080195, 0.48117, 0.8314, 0.18422, 0.36845, 0.90489, 0.48207, 0.19283, 0.24104, 0.76151, 0.55397, 0.13849, 0.72767, 0.20382, 0.10191, 0.40764, 0.012279, 0.061393, 0.14734, 0.012279, 0.024557, 0.66305, 0.049115, 0.012279, 0.079586, 0.11938, 0.039793, 0.079586, 0.039793, 0.51731, 0.039793, 0.039793, 0.36491, 0.45614, 0.4611, 0.17291, 0.057638, 0.11528, 0.057638, 0.82939, 0.045743, 0.11436, 0.091485, 0.50317, 0.045743, 0.045743, 0.11436, 0.046886, 0.84395, 0.0054304, 0.059735, 0.016291, 0.027152, 0.0054304, 0.010861, 0.010861, 0.84715, 0.0054304, 0.0054304, 0.37801, 0.59779, 0.77388, 0.048367, 0.048367, 0.37279, 0.062132, 0.24853, 0.1864, 0.48892, 0.24446, 0.036071, 0.036071, 0.036071, 0.090177, 0.018035, 0.66731, 0.018035, 0.018035, 0.018035, 0.018035, 0.018035, 0.73088, 0.013243, 0.82104, 0.092698, 0.039728, 0.03833, 0.076659, 0.57494, 0.11499, 0.076659, 0.076659, 0.81541, 0.12516, 0.03129, 0.03129, 0.03129, 0.03129, 0.093871, 0.03129, 0.12516, 0.40678, 0.062581, 0.68277, 0.085346, 0.20476, 0.70203, 0.73753, 0.1794, 0.019933, 0.019933, 0.036066, 0.81149, 0.036066, 0.036066, 0.036066, 0.018033, 0.053266, 0.21306, 0.053266, 0.21306, 0.37286, 0.07401, 0.14802, 0.22203, 0.11101, 0.037005, 0.37005, 0.62348, 0.26721, 0.02969, 0.3382, 0.21522, 0.061491, 0.061491, 0.18447, 0.061491, 0.53751, 0.39418, 0.18615, 0.37229, 0.071345, 0.53509, 0.071345, 0.17836, 0.035672, 0.035672, 0.15856, 0.47568, 0.93844, 0.0052475, 0.015742, 0.0052475, 0.0052475, 0.77138, 0.031485, 0.099702, 0.010495, 0.02099, 0.0052475, 0.0052475, 0.02099, 0.50882, 0.46642, 0.0662, 0.0662, 0.7282, 0.13946, 0.13946, 0.13946, 0.27893, 0.18356, 0.36712, 0.69543, 0.080242, 0.080242, 0.053495, 0.053495, 0.93727, 0.031772, 0.0052953, 0.0052953, 0.0052953, 0.5588, 0.2667, 0.0254, 0.0127, 0.0254, 0.0762, 0.0127, 0.62766, 0.15691, 0.91318, 0.33651, 0.22434, 0.16826, 0.1963, 0.60102, 0.10017, 0.22863, 0.091451, 0.59443, 0.033482, 0.10045, 0.77009, 0.033482, 0.60231, 0.10038, 0.77319, 0.064433, 0.46091, 0.092182, 0.092182, 0.18436, 0.27785, 0.41678, 0.68573, 0.16006, 0.16006, 0.32012, 0.096414, 0.6749, 0.14462, 0.17588, 0.087939, 0.058626, 0.11725, 0.2345, 0.087939, 0.11725, 0.029313, 0.058626, 0.029313, 0.093069, 0.27921, 0.37228, 0.093069, 0.10248, 0.51239, 0.10248, 0.093525, 0.3741, 0.3741, 0.62795, 0.15699, 0.11252, 0.22504, 0.45009, 0.70356, 0.078173, 0.78554, 0.52516, 0.29176, 0.058351, 0.15892, 0.018696, 0.0093482, 0.28979, 0.0093482, 0.47676, 0.018696, 0.0694, 0.0046267, 0.046267, 0.53669, 0.0092533, 0.023133, 0.018507, 0.0046267, 0.023133, 0.0046267, 0.02776, 0.22671, 0.58133, 0.27537, 0.061192, 0.010384, 0.002596, 0.015576, 0.89303, 0.067497, 0.002596, 0.002596, 0.66458, 0.11076, 0.62165, 0.13814, 0.069072, 0.78408, 0.56455, 0.12407, 0.62033, 0.55375, 0.16613, 0.16613, 0.48461, 0.048461, 0.048461, 0.048461, 0.24231, 0.021258, 0.93533, 0.55292, 0.18431, 0.56052, 0.14013, 0.037557, 0.18778, 0.71358, 0.84245, 0.29363, 0.58727, 0.14569, 0.09713, 0.048565, 0.33995, 0.24282, 0.30288, 0.50479, 0.051211, 0.10242, 0.76817, 0.025606, 0.37149, 0.12383, 0.43341, 0.050449, 0.80718, 0.49522, 0.1238, 0.1238, 0.022084, 0.46377, 0.11042, 0.26501, 0.088336, 0.022084, 0.064963, 0.19489, 0.58466, 0.084619, 0.014103, 0.67696, 0.084619, 0.070516, 0.056413, 0.55284, 0.64625, 0.046161, 0.092322, 0.13848, 0.22351, 0.55878, 0.018067, 0.018067, 0.8853, 0.036135, 0.77952, 0.82455, 0.77125, 0.11018, 0.19961, 0.59882, 0.045753, 0.71679, 0.015251, 0.15251, 0.045753, 0.18477, 0.55431, 0.15912, 0.47736, 0.13782, 0.41346, 0.13782, 0.22155, 0.11078, 0.055388, 0.33233, 0.055388, 0.11078, 0.13858, 0.55431, 0.013701, 0.041103, 0.013701, 0.013701, 0.013701, 0.027402, 0.041103, 0.80835, 0.060981, 0.010164, 0.050818, 0.29474, 0.010164, 0.20327, 0.25409, 0.10164, 0.035483, 0.51805, 0.07274, 0.35483, 0.0070966, 0.0035483, 0.0053224, 0.60959, 0.12192, 0.70882, 0.078757, 0.71493, 0.62096, 0.044354, 0.22177, 0.94694, 0.023096, 0.63861, 0.05961, 0.05961, 0.71531, 0.319, 0.29, 0.145, 0.174, 0.55064, 0.18355, 0.84945, 0.067956, 0.14894, 0.67023, 0.82442, 0.53124, 0.081729, 0.040865, 0.040865, 0.040865, 0.16346, 0.40239, 0.073161, 0.21948, 0.10974, 0.036581, 0.10974, 0.055572, 0.055572, 0.055572, 0.055572, 0.055572, 0.16672, 0.389, 0.055572, 0.054527, 0.20447, 0.040895, 0.013632, 0.040895, 0.10905, 0.49074, 0.027263, 0.19027, 0.12685, 0.12685, 0.40169, 0.021141, 0.021141, 0.042283, 0.021141, 0.55504, 0.092507, 0.18501, 0.15811, 0.47433, 0.15811, 0.01167, 0.16338, 0.14004, 0.12837, 0.070021, 0.2334, 0.035011, 0.21006, 0.11202, 0.56008, 0.11202, 0.067862, 0.067862, 0.033931, 0.20359, 0.033931, 0.4411, 0.033931, 0.033931, 0.07192, 0.32364, 0.07192, 0.03596, 0.10788, 0.03596, 0.21576, 0.07192, 0.28126, 0.42189, 0.49987, 0.19995, 0.099973, 0.068836, 0.043023, 0.81743, 0.051627, 0.5553, 0.019433, 0.058298, 0.038866, 0.038866, 0.13603, 0.54412, 0.1166, 0.067422, 0.16855, 0.40453, 0.033711, 0.20227, 0.067422, 0.49061, 0.12265, 0.12265, 0.63466, 0.11132, 0.11132, 0.44527, 0.11132, 0.55195, 0.20698, 0.068994, 0.24562, 0.49124, 0.086285, 0.51771, 0.086285, 0.086285, 0.8504, 0.040495, 0.091876, 0.64313, 0.13201, 0.59403, 0.13201, 0.13963, 0.55853, 0.007265, 0.010897, 0.57393, 0.04359, 0.13803, 0.007265, 0.032692, 0.1235, 0.05812, 0.058988, 0.058988, 0.10323, 0.17697, 0.029494, 0.073735, 0.23595, 0.014747, 0.014747, 0.029494, 0.044241, 0.073735, 0.058988, 0.029494, 0.12403, 0.12403, 0.49614, 0.077314, 0.038657, 0.038657, 0.30926, 0.38657, 0.077314, 0.44741, 0.11185, 0.2237, 0.013868, 0.027735, 0.88752, 0.013868, 0.027735, 0.13546, 0.008466, 0.62648, 0.11006, 0.11006, 0.33522, 0.047889, 0.095778, 0.19156, 0.095778, 0.047889, 0.095778, 0.11206, 0.022413, 0.73961, 0.067238, 0.022413, 0.0090359, 0.91262, 0.027108, 0.036143, 0.0090359, 0.41241, 0.15465, 0.33508, 0.025775, 0.13878, 0.20818, 0.13878, 0.34696, 0.066011, 0.066011, 0.66011, 0.066011, 0.078315, 0.82231, 0.63777, 0.028117, 0.70293, 0.1687, 0.028117, 0.13255, 0.33873, 0.029455, 0.058909, 0.11782, 0.014727, 0.014727, 0.014727, 0.058909, 0.073637, 0.014727, 0.044182, 0.014727, 0.058909, 0.37007, 0.10574, 0.37007, 0.07913, 0.47478, 0.15826, 0.15826, 0.42255, 0.038413, 0.076827, 0.038413, 0.34572, 0.056328, 0.16898, 0.056328, 0.056328, 0.56328, 0.13965, 0.11172, 0.69825, 0.10147, 0.10147, 0.50735, 0.78518, 0.66647, 0.32695, 0.089168, 0.38639, 0.11889, 0.029723, 0.046819, 0.046819, 0.2341, 0.46819, 0.093639, 0.01054, 0.92756, 0.021081, 0.021081, 0.76022, 0.19241, 0.11544, 0.46178, 0.19241, 0.58583, 0.18307, 0.036614, 0.036614, 0.073228, 0.036614, 0.10575, 0.15863, 0.10575, 0.052877, 0.10575, 0.37014, 0.11103, 0.55516, 0.048563, 0.012141, 0.060704, 0.83771, 0.012141, 0.1416, 0.77879, 0.17306, 0.069223, 0.10383, 0.38073, 0.10383, 0.13845, 0.68896, 0.69471, 0.47444, 0.15815, 0.80635, 0.070223, 0.070223, 0.21067, 0.49156, 0.15835, 0.079175, 0.47505, 0.079175, 0.084925, 0.61146, 0.03397, 0.2208, 0.03397, 0.17985, 0.59092, 0.12846, 0.025692, 0.77952, 0.091686, 0.55012, 0.091686, 0.23882, 0.15921, 0.39803, 0.1242, 0.62098, 0.27782, 0.039689, 0.039689, 0.15876, 0.039689, 0.19845, 0.19845, 0.96706, 0.84145, 0.75779, 0.06889, 0.73424, 0.078538, 0.17671, 0.17671, 0.5105, 0.019635, 0.88041, 0.3283, 0.06566, 0.45962, 0.1122, 0.56099, 0.32138, 0.080344, 0.080344, 0.32138, 0.35396, 0.11799, 0.35396, 0.88001, 0.95055, 0.013776, 0.019741, 0.019741, 0.019741, 0.86859, 0.019741, 0.019889, 0.13922, 0.11933, 0.079555, 0.059666, 0.019889, 0.13922, 0.39778, 0.10188, 0.61129, 0.58464, 0.099514, 0.2861, 0.29081, 0.026437, 0.079311, 0.15862, 0.026437, 0.026437, 0.052874, 0.29081, 0.69354, 0.60986, 0.20329, 0.12197, 0.90949, 0.080013, 0.080013, 0.16003, 0.40007, 0.080013, 0.013237, 0.0066186, 0.013237, 0.9266, 0.0066186, 0.019856, 0.16128, 0.69888, 0.24778, 0.49556, 0.05247, 0.5247, 0.26235, 0.05247, 0.016766, 0.92214, 0.016766, 0.55305, 0.092175, 0.18435, 0.63682, 0.090974, 0.46852, 0.13386, 0.033465, 0.16733, 0.066931, 0.1004, 0.75679, 0.61262, 0.015708, 0.015708, 0.015708, 0.062832, 0.094249, 0.031416, 0.031416, 0.047124, 0.062832, 0.66119, 0.1102, 0.9392, 0.018784, 0.1394, 0.27881, 0.27881, 0.91435, 0.026893, 0.73348, 0.57994, 0.012339, 0.24678, 0.012339, 0.012339, 0.037017, 0.074035, 0.26135, 0.15681, 0.41816, 0.05227, 0.15186, 0.10124, 0.05062, 0.05062, 0.55682, 0.11565, 0.7517, 0.10708, 0.60681, 0.07139, 0.14278, 0.8004, 0.061569, 0.18069, 0.72276, 0.036138, 0.15812, 0.47435, 0.27674, 0.046123, 0.50735, 0.092245, 0.24423, 0.06978, 0.03489, 0.10467, 0.31401, 0.10467, 0.06978, 0.55159, 0.061469, 0.12294, 0.12294, 0.030735, 0.092204, 0.030735, 0.092204, 0.030735, 0.061469, 0.092204, 0.24588, 0.017851, 0.017851, 0.89255, 0.017851, 0.017851, 0.81159, 0.0085754, 0.0042877, 0.87898, 0.0042877, 0.021438, 0.025726, 0.047165, 0.23713, 0.6521, 0.029641, 0.92483, 0.07715, 0.022043, 0.088171, 0.044085, 0.044085, 0.099192, 0.011021, 0.52903, 0.055107, 0.011021, 0.76805, 0.05908, 0.85782, 0.012255, 0.098037, 0.47373, 0.15791, 0.08365, 0.08365, 0.08365, 0.08365, 0.58555, 0.2534, 0.50681, 0.084468, 0.621, 0.297, 0.2067, 0.44785, 0.17225, 0.10335, 0.0052373, 0.083797, 0.87987, 0.013093, 0.007856, 0.0052373, 0.06901, 0.0062736, 0.0062736, 0.86576, 0.0062736, 0.031368, 0.55283, 0.11057, 0.11057, 0.070419, 0.023473, 0.070419, 0.79808, 0.66052, 0.49421, 0.061776, 0.30888, 0.67697, 0.084621, 0.47993, 0.15998, 0.62522, 0.15858, 0.15858, 0.31715, 0.80492, 0.043196, 0.82073, 0.043196, 0.73433, 0.89549, 0.13884, 0.02314, 0.02314, 0.2314, 0.02314, 0.02314, 0.4628, 0.04628, 0.039868, 0.23921, 0.59802, 0.34789, 0.02899, 0.057981, 0.17394, 0.11596, 0.057981, 0.17394, 0.57784, 0.11557, 0.11557, 0.057784, 0.45806, 0.18322, 0.091611, 0.091611, 0.89889, 0.021402, 0.021402, 0.83256, 0.17976, 0.019974, 0.21971, 0.039947, 0.019974, 0.099868, 0.27963, 0.099868, 0.062044, 0.18613, 0.55839, 0.062044, 0.093711, 0.046856, 0.74969, 0.11149, 0.11149, 0.55744, 0.062778, 0.18833, 0.36097, 0.015694, 0.34528, 0.61382, 0.12276, 0.061087, 0.82467, 0.030543, 0.030543, 0.064536, 0.64536, 0.12907, 0.073702, 0.010529, 0.16846, 0.084231, 0.36851, 0.084231, 0.073702, 0.010529, 0.084231, 0.628, 0.15459, 0.061837, 0.12367, 0.15459, 0.40194, 0.061837, 0.048266, 0.096532, 0.024133, 0.024133, 0.024133, 0.16893, 0.024133, 0.048266, 0.024133, 0.41026, 0.048266, 0.024133, 0.0093192, 0.78281, 0.18638, 0.77764, 0.0094834, 0.02845, 0.018967, 0.14225, 0.10161, 0.30482, 0.40642, 0.59154, 0.22183, 0.76151, 0.73424, 0.93945, 0.058917, 0.11783, 0.55971, 0.17675, 0.029459, 0.14005, 0.28011, 0.020008, 0.020008, 0.46017, 0.020008, 0.020008, 0.020008, 0.50452, 0.20181, 0.20181, 0.10767, 0.10767, 0.10767, 0.17945, 0.035889, 0.323, 0.035889, 0.071778, 0.060061, 0.02002, 0.1001, 0.52053, 0.26026, 0.47138, 0.15713, 0.23417, 0.072052, 0.018013, 0.018013, 0.63045, 0.013308, 0.013308, 0.093158, 0.079849, 0.039925, 0.013308, 0.039925, 0.11977, 0.46579, 0.093158, 0.095056, 0.82382, 0.46138, 0.3691, 0.41437, 0.27625, 0.4289, 0.15318, 0.061271, 0.030635, 0.27572, 0.94577, 0.0048008, 0.0048008, 0.033606, 0.79776, 0.98949, 0.77732, 0.8619, 0.037474, 0.1386, 0.55439, 0.069299, 0.069299, 0.015316, 0.045947, 0.71984, 0.015316, 0.12253, 0.061263, 0.55092, 0.25427, 0.084758, 0.50258, 0.016212, 0.016212, 0.43773, 0.0034232, 0.97903, 0.0068464, 0.0034232, 0.026225, 0.8392, 0.078675, 0.33167, 0.055279, 0.27639, 0.16584, 0.055279, 0.10053, 0.60318, 0.10053, 0.097139, 0.097139, 0.097139, 0.048569, 0.33999, 0.19428, 0.048569, 0.85586, 0.18434, 0.092168, 0.32259, 0.2765, 0.55096, 0.13774, 0.06145, 0.030725, 0.06145, 0.43015, 0.21508, 0.092175, 0.030725, 0.030725, 0.65798, 0.10966, 0.033776, 0.57419, 0.033776, 0.067552, 0.1351, 0.033776, 0.067552, 0.13185, 0.13185, 0.59334, 0.074365, 0.099153, 0.074365, 0.024788, 0.049576, 0.049576, 0.024788, 0.024788, 0.52055, 0.024788, 0.87615, 0.83012, 0.1377, 0.48196, 0.20655, 0.79536, 0.061182, 0.85793, 0.066032, 0.79239, 0.79487, 0.052991, 0.093262, 0.65283, 0.035558, 0.10667, 0.56893, 0.10667, 0.071116, 0.035558, 0.035558, 0.049244, 0.049244, 0.14773, 0.34471, 0.049244, 0.12311, 0.2216, 0.72922, 0.12154, 0.14047, 0.42141, 0.14047, 0.66428, 0.13205, 0.52818, 0.19807, 0.086268, 0.51761, 0.17254, 0.89382, 0.36498, 0.46926, 0.72099, 0.08011, 0.18344, 0.55033, 0.091722, 0.18901, 0.0051083, 0.025541, 0.010217, 0.056191, 0.62831, 0.0051083, 0.025541, 0.025541, 0.0051083, 0.010217, 0.0051083, 0.13815, 0.5526, 0.85051, 0.10006, 0.0197, 0.030958, 0.0028143, 0.80209, 0.008443, 0.045029, 0.016886, 0.025329, 0.0028143, 0.014072, 0.028143, 0.14537, 0.78498, 0.014537, 0.014537, 0.71545, 0.17222, 0.51667, 0.068889, 0.17222, 0.034444, 0.83396, 0.52453, 0.16731, 0.27583, 0.0045218, 0.018087, 0.032309, 0.87235, 0.22599, 0.39548, 0.037665, 0.075329, 0.18832, 0.056497, 0.014449, 0.0072243, 0.92471, 0.036121, 0.0072243, 0.078665, 0.55065, 0.078665, 0.078665, 0.65823, 0.22408, 0.084029, 0.14078, 0.56313, 0.56414, 0.64011, 0.18289, 0.74894, 0.068085, 0.093893, 0.28168, 0.37557, 0.27942, 0.46571, 0.093141, 0.069856, 0.069856, 0.6287, 0.069856, 0.33149, 0.1105, 0.33149, 0.073793, 0.036897, 0.36897, 0.22138, 0.036897, 0.14759, 0.036897, 0.13324, 0.26649, 0.08883, 0.08883, 0.044415, 0.3109, 0.73495, 0.45209, 0.45209, 0.028256, 0.87418, 0.074072, 0.74072, 0.82076, 0.078168, 0.017228, 0.017228, 0.0086142, 0.012921, 0.051685, 0.043071, 0.10768, 0.0043071, 0.70205, 0.034457, 0.22886, 0.012715, 0.19072, 0.39415, 0.089002, 0.038144, 0.012715, 0.012715, 0.90277, 0.80932, 0.18764, 0.56291, 0.1863, 0.3726, 0.53448, 0.033405, 0.066809, 0.066809, 0.16702, 0.10021, 0.85912, 0.90332, 0.012905, 0.0064523, 0.0064523, 0.032261, 0.0064523, 0.019357, 0.36924, 0.12308, 0.24616, 0.1119, 0.16785, 0.22381, 0.055952, 0.33571, 0.85939, 0.70136, 0.15029, 0.050097, 0.031759, 0.031759, 0.031759, 0.28584, 0.44463, 0.12704, 0.36962, 0.18481, 0.092377, 0.030792, 0.030792, 0.061585, 0.092377, 0.092377, 0.21555, 0.030792, 0.15396, 0.15396, 0.092218, 0.092218, 0.092218, 0.46109, 0.092218, 0.55159, 0.30516, 0.11443, 0.076289, 0.076289, 0.038145, 0.30516, 0.70456, 0.06808, 0.03404, 0.06808, 0.03404, 0.10212, 0.23828, 0.1702, 0.23828, 0.14067, 0.56269, 0.095348, 0.031783, 0.095348, 0.063566, 0.31783, 0.15891, 0.031783, 0.063566, 0.095348, 0.036197, 0.036197, 0.036197, 0.10859, 0.47056, 0.18099, 0.036197, 0.18687, 0.037374, 0.7101, 0.64198, 0.13286, 0.018979, 0.68326, 0.037959, 0.018979, 0.056938, 0.018979, 0.26127, 0.15676, 0.20902, 0.2874, 0.093507, 0.65455, 0.1814, 0.051829, 0.025914, 0.1814, 0.49238, 0.04162, 0.04162, 0.74916, 0.08324, 0.093925, 0.093925, 0.18785, 0.3757, 0.74817, 0.55175, 0.055408, 0.0079155, 0.047493, 0.8707, 0.62157, 0.061769, 0.77212, 0.030885, 0.061769, 0.2254, 0.05635, 0.64802, 0.14894, 0.59576, 0.07447, 0.60092, 0.10015, 0.92689, 0.022069, 0.61286, 0.10214, 0.55434, 0.18478, 0.092391, 0.68896, 0.25214, 0.019396, 0.25214, 0.019396, 0.096979, 0.25214, 0.077583, 0.2754, 0.23606, 0.23606, 0.11803, 0.078685, 0.025151, 0.17606, 0.050302, 0.1509, 0.25151, 0.1006, 0.12575, 0.025151, 0.050302, 0.027475, 0.027475, 0.85172, 0.027475, 0.64426, 0.94277, 0.62313, 0.20112, 0.68381, 0.68518, 0.46169, 0.25183, 0.25183, 0.9442, 0.0702, 0.0702, 0.702, 0.11837, 0.17755, 0.059184, 0.059184, 0.35511, 0.11837, 0.89152, 0.04403, 0.04403, 0.70449, 0.088061, 0.092908, 0.092908, 0.092908, 0.46454, 0.30044, 0.10015, 0.40058, 0.10811, 0.036038, 0.18019, 0.072076, 0.4685, 0.072076, 0.10197, 0.50986, 0.20394, 0.68291, 0.63059, 0.315, 0.4725, 0.078749, 0.018544, 0.92722, 0.35389, 0.070777, 0.11796, 0.023592, 0.40107, 0.63227, 0.079034, 0.079034, 0.014178, 0.9074, 0.028356, 0.014178, 0.67767, 0.0095446, 0.085901, 0.038178, 0.0095446, 0.019089, 0.028634, 0.11454, 0.18252, 0.3194, 0.3194, 0.045629, 0.01697, 0.01697, 0.11031, 0.38607, 0.3691, 0.012728, 0.072123, 0.0084851, 0.91674, 0.16042, 0.48125, 0.042455, 0.72173, 0.12736, 0.25156, 0.15723, 0.3459, 0.031446, 0.12578, 0.031446, 0.018786, 0.93929, 0.019571, 0.11743, 0.11743, 0.39143, 0.17614, 0.137, 0.48175, 0.068821, 0.13764, 0.068821, 0.13764, 0.62211, 0.76477, 0.12236, 0.061181, 0.44928, 0.099841, 0.04992, 0.34944, 0.01248, 0.01248, 0.428, 0.1712, 0.2568, 0.11545, 0.38484, 0.30787, 0.038484, 0.076968, 0.2116, 0.052899, 0.052899, 0.052899, 0.1058, 0.37029, 0.052899, 0.22546, 0.3543, 0.19325, 0.032209, 0.064418, 0.032209, 0.37087, 0.18544, 0.62983, 0.23885, 0.029856, 0.17913, 0.029856, 0.11942, 0.089567, 0.20899, 0.029856, 0.75532, 0.02084, 0.25008, 0.50015, 0.18756, 0.023539, 0.89446, 0.023539, 0.011124, 0.033371, 0.70078, 0.022247, 0.11124, 0.055618, 0.044494, 0.011124, 0.10251, 0.61508, 0.45765, 0.028603, 0.085809, 0.37184, 0.041561, 0.5403, 0.33249, 0.10086, 0.64551, 0.1412, 0.080688, 0.055387, 0.11077, 0.4431, 0.11077, 0.055387, 0.11077, 0.55203, 0.27601, 0.050822, 0.10164, 0.050822, 0.60986, 0.10164, 0.51125, 0.073035, 0.073035, 0.073035, 0.073035, 0.15776, 0.63105, 0.039433, 0.74924, 0.078867, 0.039433, 0.71493, 0.49238, 0.24619, 0.15999, 0.47998, 0.73381, 0.091726, 0.045863, 0.045863, 0.90428, 0.017396, 0.052188, 0.12177, 0.017396, 0.74803, 0.90291, 0.2158, 0.17984, 0.017984, 0.035967, 0.071935, 0.017984, 0.43161, 0.73805, 0.93772, 0.030745, 0.047788, 0.7646, 0.047788, 0.36982, 0.18491, 0.13974, 0.55897, 0.11271, 0.56355, 0.2624, 0.0656, 0.0656, 0.4592, 0.80203, 0.027656, 0.11062, 0.027656, 0.062665, 0.75198, 0.19955, 0.19955, 0.3991, 0.066186, 0.79423, 0.055754, 0.074339, 0.018585, 0.16726, 0.11151, 0.074339, 0.2416, 0.14868, 0.092924, 0.83403, 0.0696, 0.4872, 0.2088, 0.0696, 0.019042, 0.038084, 0.038084, 0.4951, 0.019042, 0.076169, 0.038084, 0.11425, 0.11425, 0.019042, 0.80214, 0.62983, 0.51536, 0.22087, 0.073623, 0.030496, 0.030496, 0.030496, 0.15248, 0.67091, 0.05624, 0.39368, 0.22496, 0.22496, 0.088223, 0.012603, 0.85702, 0.012603, 0.1107, 0.2214, 0.1476, 0.0738, 0.0369, 0.2952, 0.0738, 0.19871, 0.056776, 0.2271, 0.31227, 0.085163, 0.085163, 0.09305, 0.27915, 0.09305, 0.3722, 0.55339, 0.13835, 0.13835, 0.236, 0.177, 0.354, 0.118, 0.74055, 0.75466, 0.11204, 0.056019, 0.50417, 0.11204, 0.056019, 0.056019, 0.84061, 0.067486, 0.89419, 0.018728, 0.11237, 0.093639, 0.52438, 0.037456, 0.056184, 0.018728, 0.093639, 0.18642, 0.09321, 0.46605, 0.015789, 0.15789, 0.25263, 0.015789, 0.15789, 0.078946, 0.031578, 0.1421, 0.015789, 0.094735, 0.51175, 0.039366, 0.1181, 0.039366, 0.15746, 0.039366, 0.039366, 0.84541, 0.59504, 0.085006, 0.085006, 0.095095, 0.60227, 0.12679, 0.12679, 0.83694, 0.70247, 0.038559, 0.077119, 0.038559, 0.077119, 0.38559, 0.1928, 0.038559, 0.038559, 0.077119, 0.87836, 0.043918, 0.014639, 0.029279, 0.052991, 0.26496, 0.052991, 0.42393, 0.10598, 0.10129, 0.30387, 0.40516, 0.53641, 0.059601, 0.1192, 0.149, 0.089402, 0.26577, 0.35436, 0.13288, 0.17718, 0.10647, 0.14196, 0.3549, 0.21294, 0.03549, 0.03549, 0.03549, 0.38899, 0.064831, 0.097246, 0.19449, 0.032415, 0.16208, 0.36852, 0.18426, 0.70142, 0.46151, 0.046151, 0.36921, 0.83105, 0.1451, 0.10995, 0.6597, 0.71097, 0.078996, 0.90432, 0.66647, 0.12332, 0.61661, 0.64287, 0.091839, 0.073696, 0.11054, 0.036848, 0.36848, 0.14739, 0.073696, 0.11054, 0.036848, 0.042691, 0.55498, 0.042691, 0.25614, 0.62135, 0.23898, 0.61757, 0.43906, 0.21953, 0.10976, 0.63053, 0.55182, 0.061313, 0.061313, 0.061313, 0.061313, 0.061313, 0.050889, 0.050889, 0.10178, 0.050889, 0.40711, 0.25444, 0.25767, 0.077301, 0.36074, 0.051534, 0.20613, 0.094533, 0.063022, 0.031511, 0.2836, 0.15755, 0.18907, 0.031511, 0.094533, 0.41733, 0.04637, 0.41733, 0.080889, 0.80889, 0.034966, 0.87415, 0.54681, 0.15623, 0.078116, 0.12451, 0.62256, 0.024674, 0.024674, 0.17272, 0.32076, 0.024674, 0.074021, 0.074021, 0.024674, 0.22206, 0.10156, 0.10156, 0.050782, 0.60938, 0.050782, 0.096615, 0.28985, 0.019323, 0.096615, 0.17391, 0.038646, 0.057969, 0.19323, 0.019323, 0.17872, 0.014893, 0.77446, 0.62272, 0.20306, 0.71072, 0.25283, 0.5478, 0.12642, 0.12405, 0.12405, 0.12405, 0.37215, 0.22287, 0.44575, 0.11144, 0.12415, 0.62075, 0.20961, 0.069871, 0.55897, 0.55144, 0.23633, 0.17261, 0.043153, 0.043153, 0.21577, 0.34522, 0.12946, 0.64198, 0.66647, 0.70032, 0.077814, 0.60139, 0.20046, 0.071219, 0.047479, 0.02374, 0.28487, 0.047479, 0.45105, 0.047479, 0.27763, 0.41645, 0.35065, 0.058442, 0.17533, 0.058442, 0.23377, 0.035018, 0.070035, 0.035018, 0.10505, 0.45523, 0.17509, 0.070035, 0.046813, 0.046813, 0.79581, 0.074553, 0.29821, 0.14911, 0.29821, 0.18694, 0.51409, 0.18694, 0.083288, 0.069407, 0.083288, 0.013881, 0.097169, 0.34703, 0.24986, 0.041644, 0.13821, 0.13821, 0.41464, 0.23036, 0.15271, 0.019089, 0.038177, 0.019089, 0.51539, 0.20997, 0.73512, 0.12252, 0.1347, 0.033675, 0.4041, 0.033675, 0.033675, 0.30308, 0.28808, 0.31427, 0.15713, 0.026189, 0.10476, 0.078567, 0.096467, 0.1447, 0.12058, 0.096467, 0.21705, 0.2894, 0.024117, 0.64348, 0.091925, 0.62324, 0.045219, 0.090437, 0.090437, 0.67828, 0.4744, 0.15813, 0.67471, 0.2249, 0.0068715, 0.054972, 0.089329, 0.10994, 0.51536, 0.0068715, 0.041229, 0.10307, 0.0481, 0.79165, 0.043981, 0.043981, 0.09255, 0.46275, 0.09255, 0.09255, 0.72615, 0.024701, 0.88923, 0.024701, 0.17689, 0.44223, 0.088445, 0.22111, 0.06907, 0.13814, 0.24175, 0.034535, 0.20721, 0.06907, 0.034535, 0.10361, 0.06907, 0.10615, 0.21229, 0.053073, 0.053073, 0.31844, 0.15922, 0.97776, 0.0022022, 0.0088087, 0.0022022, 0.0044043, 0.099284, 0.5957, 0.033095, 0.19857, 0.10182, 0.23757, 0.57696, 0.70382, 0.078202, 0.085605, 0.12841, 0.085605, 0.042802, 0.042802, 0.085605, 0.17121, 0.29962, 0.88612, 0.74533, 0.95044, 0.70428, 0.078253, 0.074748, 0.074748, 0.1495, 0.44849, 0.074748, 0.14686, 0.7343, 0.8608, 0.69801, 0.073475, 0.036737, 0.11021, 0.60115, 0.10019, 0.78967, 0.060744, 0.51973, 0.1155, 0.057748, 0.1155, 0.057748, 0.068731, 0.68731, 0.068731, 0.038731, 0.038731, 0.038731, 0.42604, 0.23239, 0.038731, 0.038731, 0.077462, 0.76703, 0.13965, 0.13965, 0.069825, 0.48877, 0.6744, 0.2248, 0.065253, 0.39152, 0.19576, 0.065253, 0.13051, 0.034196, 0.034196, 0.068393, 0.37616, 0.41036, 0.28025, 0.42038, 0.77115, 0.055082, 0.055082, 0.18548, 0.37096, 0.18644, 0.37288, 0.068207, 0.20462, 0.61386, 0.034103, 0.11189, 0.55946, 0.18517, 0.092584, 0.092584, 0.46292, 0.030529, 0.061058, 0.12212, 0.2137, 0.12212, 0.18318, 0.18318, 0.030529, 0.030529, 0.046633, 0.069949, 0.023316, 0.046633, 0.093265, 0.65286, 0.023316, 0.023316, 0.38588, 0.38588, 0.12863, 0.085991, 0.042995, 0.17198, 0.47295, 0.042995, 0.042995, 0.042995, 0.042995, 0.093772, 0.015629, 0.20317, 0.015629, 0.15629, 0.015629, 0.015629, 0.062515, 0.015629, 0.17192, 0.20317, 0.015629, 0.18668, 0.062228, 0.18668, 0.062228, 0.062228, 0.31114, 0.42225, 0.2815, 0.13987, 0.55947, 0.056606, 0.15095, 0.26416, 0.18869, 0.037737, 0.24529, 0.018869, 0.026858, 0.020144, 0.10743, 0.69832, 0.0067146, 0.0067146, 0.047002, 0.033573, 0.040288, 0.69027, 0.13805, 0.092035, 0.0083276, 0.058293, 0.016655, 0.024983, 0.020819, 0.0083276, 0.0041638, 0.85358, 0.4153, 0.069217, 0.069217, 0.20765, 0.069217, 0.069217, 0.63296, 0.94706, 0.017219, 0.36447, 0.016567, 0.1988, 0.28163, 0.0994, 0.75184, 0.050122, 0.10024, 0.73464, 0.065964, 0.065964, 0.19789, 0.52772, 0.11661, 0.058304, 0.058304, 0.058304, 0.058304, 0.46644, 0.058304, 0.21063, 0.70208, 0.70094, 0.077883, 0.68896, 0.61386, 0.12277, 0.27802, 0.41703, 0.90222, 0.27524, 0.55048, 0.50843, 0.44415, 0.0058441, 0.023376, 0.0058441, 0.099985, 0.59991, 0.062346, 0.062346, 0.8105, 0.068602, 0.75462, 0.40184, 0.05023, 0.05023, 0.10046, 0.25115, 0.13198, 0.72587, 0.41322, 0.043497, 0.10874, 0.39147, 0.021748, 0.010874, 0.71249, 0.036013, 0.036013, 0.036013, 0.10804, 0.072026, 0.036013, 0.072026, 0.46817, 0.10804, 0.11185, 0.55927, 0.11185, 0.50459, 0.045872, 0.18349, 0.045872, 0.13762, 0.044051, 0.79291, 0.044051, 0.47639, 0.1588, 0.12436, 0.49745, 0.12436, 0.073886, 0.14777, 0.36943, 0.073886, 0.22166, 0.96256, 0.02139, 0.87939, 0.49123, 0.12281, 0.12281, 0.040091, 0.94501, 0.40335, 0.2881, 0.057621, 0.057621, 0.057621, 0.046879, 0.75006, 0.093758, 0.8089, 0.87053, 0.093298, 0.1866, 0.1866, 0.37319, 0.84157, 0.55476, 0.12328, 0.01541, 0.092459, 0.01541, 0.1541, 0.01541, 0.062464, 0.62464, 0.18739, 0.20126, 0.36898, 0.26835, 0.10063, 0.22109, 0.11055, 0.44218, 0.11815, 0.088612, 0.029537, 0.12799, 0.039383, 0.0098457, 0.38398, 0.0098457, 0.17722, 0.18518, 0.37036, 0.32039, 0.32039, 0.78408, 0.074748, 0.074748, 0.074748, 0.074748, 0.074748, 0.074748, 0.074748, 0.29899, 0.89911, 0.49526, 0.24763, 0.11893, 0.43608, 0.039643, 0.15857, 0.039643, 0.15857, 0.13796, 0.17245, 0.27592, 0.06898, 0.03449, 0.24143, 0.74817, 0.085847, 0.25754, 0.42923, 0.061835, 0.061835, 0.24734, 0.12367, 0.37101, 0.88908, 0.12996, 0.5267, 0.28729, 0.041041, 0.017007, 0.20408, 0.017007, 0.42517, 0.11905, 0.17007, 0.72003, 0.065457, 0.065457, 0.45757, 0.016947, 0.37283, 0.050841, 0.033894, 0.016947, 0.016947, 0.016947, 0.08461, 0.67688, 0.074909, 0.14982, 0.71164, 0.042452, 0.50942, 0.21226, 0.084904, 0.084904, 0.031128, 0.031128, 0.87159, 0.035108, 0.070217, 0.035108, 0.73727, 0.035108, 0.70033, 0.26168, 0.058152, 0.14538, 0.058152, 0.058152, 0.058152, 0.058152, 0.23261, 0.029076, 0.12463, 0.62315, 0.47712, 0.15904, 0.71046, 0.07894, 0.10217, 0.051083, 0.61299, 0.051083, 0.051083, 0.18442, 0.46106, 0.18442, 0.73312, 0.8533, 0.029745, 0.029745, 0.71388, 0.05949, 0.089236, 0.029745, 0.080415, 0.0057439, 0.0057439, 0.0057439, 0.88457, 0.0057439, 0.49101, 0.24551, 0.37898, 0.002707, 0.55222, 0.0081209, 0.024363, 0.013535, 0.002707, 0.010828, 0.27902, 0.67761, 0.045816, 0.20617, 0.64143, 0.022908, 0.022908, 0.61007, 0.12201, 0.055043, 0.7706, 0.055043, 0.14655, 0.76937, 0.10906, 0.12189, 0.083395, 0.006415, 0.14755, 0.30151, 0.032075, 0.05132, 0.096225, 0.01283, 0.032075, 0.69908, 0.099868, 0.10988, 0.10988, 0.54942, 0.13199, 0.17599, 0.39598, 0.13199, 0.043997, 0.043997, 0.23266, 0.046532, 0.23266, 0.046532, 0.37225, 0.56414, 0.088164, 0.66123, 0.044082, 0.044082, 0.088164, 0.44787, 0.3359, 0.17501, 0.11668, 0.029169, 0.14584, 0.058338, 0.087506, 0.029169, 0.029169, 0.23335, 0.087506, 0.80251, 0.057322, 0.78608, 0.1394, 0.4182, 0.1394, 0.38619, 0.49653, 0.061788, 0.12358, 0.24715, 0.43251, 0.11045, 0.2209, 0.44181, 0.55213, 0.13803, 0.11457, 0.03819, 0.03819, 0.11457, 0.53465, 0.076379, 0.18641, 0.046601, 0.046601, 0.60582, 0.02169, 0.065071, 0.04338, 0.02169, 0.04338, 0.10845, 0.02169, 0.086761, 0.56395, 0.62758, 0.63146, 0.19035, 0.043928, 0.68821, 0.043928, 0.65817, 0.094024, 0.039765, 0.039765, 0.23859, 0.27835, 0.27835, 0.22186, 0.063388, 0.031694, 0.095082, 0.031694, 0.5071, 0.63777, 0.23875, 0.079582, 0.47749, 0.80932, 0.11083, 0.099747, 0.055415, 0.055415, 0.044332, 0.48765, 0.055415, 0.044332, 0.022166, 0.022166, 0.3682, 0.07364, 0.14728, 0.29456, 0.16003, 0.16003, 0.26672, 0.053344, 0.053344, 0.16003, 0.10669, 0.11247, 0.56236, 0.11673, 0.038912, 0.038912, 0.038912, 0.11673, 0.58367, 0.60221, 0.10037, 0.94181, 0.058128, 0.004844, 0.65879, 0.004844, 0.029064, 0.029064, 0.20345, 0.49582, 0.12395, 0.12395, 0.089507, 0.029836, 0.29836, 0.11934, 0.26852, 0.029836, 0.029836, 0.059671, 0.029836, 0.59114, 0.084449, 0.084449, 0.084449, 0.22022, 0.55056, 0.17218, 0.25827, 0.34435, 0.25074, 0.28656, 0.03582, 0.03582, 0.28656, 0.093103, 0.27931, 0.46551, 0.8692, 0.81034, 0.057881, 0.83256, 0.0066605, 0.046624, 0.039963, 0.019982, 0.026642, 0.013321, 0.0066605, 0.59963, 0.099939, 0.099939, 0.70705, 0.12856, 0.069445, 0.27778, 0.069445, 0.34723, 0.069445, 0.42025, 0.28017, 0.83908, 0.58909, 0.073636, 0.11045, 0.18409, 0.052618, 0.68404, 0.15785, 0.055315, 0.82972, 0.059791, 0.11958, 0.089687, 0.11958, 0.029896, 0.41854, 0.089687, 0.059791, 0.2256, 0.12891, 0.096684, 0.032228, 0.38673, 0.064456, 0.415, 0.27667, 0.039747, 0.23848, 0.019873, 0.019873, 0.039747, 0.039747, 0.039747, 0.53658, 0.43733, 0.11576, 0.025725, 0.012863, 0.025725, 0.17364, 0.025725, 0.038588, 0.0064313, 0.038588, 0.077175, 0.0064313, 0.65706, 0.10951, 0.090353, 0.63247, 0.0045176, 0.0090353, 0.0045176, 0.0045176, 0.24395, 0.074753, 0.074753, 0.37377, 0.29901, 0.22327, 0.037212, 0.037212, 0.037212, 0.037212, 0.18606, 0.26049, 0.14885, 0.075424, 0.75424, 0.14471, 0.024119, 0.79592, 0.56843, 0.28422, 0.056843, 0.028422, 0.25365, 0.50729, 0.084549, 0.011651, 0.011651, 0.53596, 0.10486, 0.034954, 0.011651, 0.08156, 0.034954, 0.15147, 0.031621, 0.53755, 0.031621, 0.063241, 0.031621, 0.094862, 0.094862, 0.094862, 0.086011, 0.086011, 0.60207, 0.13817, 0.55268, 0.046057, 0.046057, 0.046057, 0.046057, 0.046057, 0.11818, 0.70906, 0.68904, 0.5535, 0.1845, 0.50453, 0.30272, 0.12608, 0.08023, 0.42407, 0.18338, 0.149, 0.47426, 0.15809, 0.079043, 0.079043, 0.079043, 0.58933, 0.15374, 0.15374, 0.076869, 0.0065264, 0.058738, 0.0065264, 0.86801, 0.026106, 0.019579, 0.092189, 0.18438, 0.092189, 0.46094, 0.69949, 0.15949, 0.47846, 0.2215, 0.40609, 0.073834, 0.036917, 0.14767, 0.073834, 0.21477, 0.014811, 0.059246, 0.1259, 0.16293, 0.10368, 0.1259, 0.14811, 0.029623, 0.66128, 0.11021, 0.058737, 0.058737, 0.17621, 0.52863, 0.058737, 0.072573, 0.79831, 0.05443, 0.05443, 0.093404, 0.65383, 0.76695, 0.13772, 0.55089, 0.59037, 0.084338, 0.084338, 0.021441, 0.085763, 0.085763, 0.021441, 0.17153, 0.042881, 0.1072, 0.12864, 0.27873, 0.021441, 0.02563, 0.02563, 0.02563, 0.02563, 0.28193, 0.20504, 0.35882, 0.1686, 0.056201, 0.084302, 0.1686, 0.084302, 0.1405, 0.25291, 0.27832, 0.06958, 0.48706, 0.15956, 0.47867, 0.75372, 0.80604, 0.084846, 0.2563, 0.34173, 0.085433, 0.17087, 0.36787, 0.18393, 0.052458, 0.83933, 0.56263, 0.7087, 0.078745, 0.23888, 0.089579, 0.59719, 0.059719, 0.044976, 0.76459, 0.044976, 0.044976, 0.72348, 0.080387, 0.92145, 0.032423, 0.015689, 0.0010459, 0.026148, 0.5514, 0.1838, 0.091901, 0.69216, 0.013936, 0.041809, 0.32053, 0.16724, 0.027873, 0.22298, 0.013936, 0.055745, 0.12543, 0.67378, 0.46346, 0.11587, 0.23173, 0.057933, 0.61147, 0.12229, 0.66116, 0.73805, 0.046742, 0.046742, 0.51416, 0.046742, 0.14022, 0.093483, 0.046742, 0.090064, 0.045032, 0.1351, 0.045032, 0.58542, 0.036305, 0.3449, 0.018152, 0.054457, 0.090762, 0.018152, 0.10891, 0.018152, 0.23598, 0.036305, 0.41357, 0.13786, 0.13786, 0.065232, 0.13046, 0.39139, 0.26093, 0.94913, 0.2495, 0.12475, 0.37424, 0.12421, 0.49683, 0.12421, 0.061132, 0.030566, 0.030566, 0.030566, 0.79472, 0.093216, 0.18643, 0.093216, 0.37286, 0.08002, 0.08002, 0.04001, 0.12003, 0.48012, 0.16004, 0.9569, 0.011127, 0.0030084, 0.44073, 0.045126, 0.0015042, 0.41817, 0.015042, 0.012034, 0.012034, 0.0015042, 0.048134, 0.89885, 0.021401, 0.021401, 0.38254, 0.47817, 0.12398, 0.61989, 0.01512, 0.60479, 0.16632, 0.18144, 0.0098961, 0.092364, 0.029688, 0.68943, 0.11875, 0.0032987, 0.0065974, 0.0098961, 0.013195, 0.016494, 0.0065974, 0.39777, 0.26518, 0.13259, 0.044197, 0.044197, 0.55222, 0.11044, 0.11044, 0.0124, 0.099197, 0.53318, 0.0124, 0.23559, 0.049598, 0.0124, 0.024799, 0.36885, 0.12295, 0.2459, 0.13952, 0.41857, 0.13952, 0.075452, 0.57846, 0.012575, 0.062876, 0.1006, 0.16348, 0.10235, 0.61407, 0.70803, 0.037265, 0.22359, 0.77732, 0.70089, 0.077876, 0.11002, 0.74261, 0.082512, 0.027504, 0.03244, 0.03244, 0.03244, 0.74611, 0.097319, 0.8904, 0.060709, 0.41338, 0.27558, 0.15682, 0.12546, 0.031365, 0.59593, 0.031365, 0.72615, 0.037704, 0.87976, 0.006284, 0.009426, 0.006284, 0.003142, 0.003142, 0.003142, 0.028278, 0.01571, 0.60244, 0.10041, 0.10041, 0.48628, 0.40524, 0.15568, 0.22754, 0.011976, 0.047902, 0.035927, 0.14371, 0.071854, 0.011976, 0.26346, 0.011976, 0.084625, 0.14104, 0.31029, 0.11283, 0.28208, 0.028208, 0.12012, 0.20593, 0.034321, 0.22309, 0.24025, 0.051482, 0.068643, 0.034321, 0.15927, 0.47782, 0.55082, 0.1377, 0.11104, 0.55522, 0.065328, 0.32664, 0.13066, 0.32664, 0.45109, 0.32221, 0.12888, 0.47068, 0.11075, 0.027687, 0.33225, 0.33827, 0.048324, 0.14497, 0.14497, 0.048324, 0.1933, 0.18224, 0.013017, 0.29939, 0.013017, 0.026034, 0.052068, 0.20827, 0.026034, 0.026034, 0.14319, 0.23493, 0.64605, 0.11236, 0.56182, 0.628, 0.42967, 0.056045, 0.0093408, 0.31759, 0.018682, 0.14945, 0.76626, 0.19697, 0.13131, 0.065656, 0.39393, 0.065656, 0.038927, 0.52552, 0.077855, 0.097319, 0.2141, 0.10567, 0.052833, 0.052833, 0.634, 0.052833, 0.205, 0.041, 0.041, 0.328, 0.081999, 0.164, 0.081999, 0.67045, 0.26818, 0.75611, 0.068738, 0.22171, 0.55427, 0.12301, 0.024602, 0.049204, 0.024602, 0.024602, 0.68885, 0.024602, 0.12323, 0.49292, 0.12323, 0.89417, 0.033117, 0.57227, 0.31215, 0.64041, 0.091487, 0.04121, 0.04121, 0.24726, 0.37089, 0.16484, 0.04121, 0.080993, 0.060745, 0.010124, 0.59732, 0.22273, 0.010124, 0.031573, 0.25258, 0.4736, 0.15787, 0.031573, 0.91996, 0.47584, 0.052871, 0.10574, 0.15861, 0.052871, 0.052871, 0.4329, 0.48383, 0.025465, 0.55045, 0.091741, 0.18348, 0.32965, 0.48179, 0.16482, 0.98118, 0.0048097, 0.37134, 0.074267, 0.37134, 0.0038961, 0.94092, 0.0077923, 0.042858, 0.074579, 0.14916, 0.52205, 0.074579, 0.76695, 0.042063, 0.021032, 0.56785, 0.021032, 0.021032, 0.021032, 0.18928, 0.021032, 0.063095, 0.7167, 0.14997, 0.074983, 0.59986, 0.63965, 0.091379, 0.031982, 0.015991, 0.015991, 0.8955, 0.85023, 0.24833, 0.49666, 0.43633, 0.43633, 0.022017, 0.28623, 0.61649, 0.022017, 0.10564, 0.8451, 0.19082, 0.19082, 0.34984, 0.031804, 0.15902, 0.58947, 0.073683, 0.073683, 0.073683, 0.31364, 0.52273, 0.052273, 0.45925, 0.36084, 0.065607, 0.065607, 0.63296, 0.007443, 0.63265, 0.19352, 0.11537, 0.040936, 0.69036, 0.78798, 0.54747, 0.036498, 0.036498, 0.18249, 0.036498, 0.10949 ] | |
}, | |
"R": 30, | |
"lambda.step": 0.01, | |
"plot.opts": { | |
"xlab": "PC1", | |
"ylab": "PC2" | |
}, | |
"topic.order": [ 21, 10, 6, 1, 23, 5, 22, 14, 7, 24, 19, 11, 12, 16, 30, 3, 9, 2, 27, 26, 25, 15, 20, 8, 4, 29, 28, 17, 18, 13 ] | |
} |
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
LDAvis = function(to_select, json_file) { | |
// This section sets up the logic for event handling | |
var current_clicked = { | |
what: "nothing", | |
element: undefined | |
}, | |
current_hover = { | |
what: "nothing", | |
element: undefined | |
}, | |
old_winning_state = { | |
what: "nothing", | |
element: undefined | |
}, | |
vis_state = { | |
lambda: 1, | |
topic: 0, | |
term: "" | |
}; | |
// Set up a few 'global' variables to hold the data: | |
var K, // number of topics | |
R, // number of terms to display in bar chart | |
mdsData, // (x,y) locations and topic proportions | |
mdsData3, // topic proportions for all terms in the viz | |
lamData, // all terms that are among the top-R most relevant for all topics, lambda values | |
lambda = { | |
old: 1, | |
current: 1 | |
}, | |
color1 = "#1f77b4", // baseline color for default topic circles and overall term frequencies | |
color2 = "#d62728"; // 'highlight' color for selected topics and term-topic frequencies | |
// Set the duration of each half of the transition: | |
var duration = 750; | |
// Set global margins used for everything | |
var margin = { | |
top: 30, | |
right: 30, | |
bottom: 70, | |
left: 30 | |
}, | |
mdswidth = 530, | |
mdsheight = 530, | |
barwidth = 530, | |
barheight = 530, | |
termwidth = 90, // width to add between two panels to display terms | |
mdsarea = mdsheight * mdswidth; | |
// controls how big the maximum circle can be | |
// doesn't depend on data, only on mds width and height: | |
var rMax = 60; | |
// proportion of area of MDS plot to which the sum of default topic circle areas is set | |
var circle_prop = 0.25; | |
var word_prop = 0.25; | |
// opacity of topic circles: | |
var base_opacity = 0.2, | |
highlight_opacity = 0.6; | |
// topic/lambda selection names are specific to *this* vis | |
var topic_select = to_select + "-topic"; | |
var lambda_select = to_select + "-lambda"; | |
// get rid of the # in the to_select (useful) for setting ID values | |
var parts = to_select.split("#"); | |
var visID = parts[parts.length - 1]; | |
var topicID = visID + "-topic"; | |
var lambdaID = visID + "-lambda"; | |
var termID = visID + "-term"; | |
var topicDown = topicID + "-down"; | |
var topicUp = topicID + "-up"; | |
var topicClear = topicID + "-clear"; | |
////////////////////////////////////////////////////////////////////////////// | |
// sort array according to a specified object key name | |
// Note that default is decreasing sort, set decreasing = -1 for increasing | |
// adpated from http://stackoverflow.com/questions/16648076/sort-array-on-key-value | |
function fancysort(key_name, decreasing) { | |
decreasing = (typeof decreasing === "undefined") ? 1 : decreasing; | |
return function(a, b) { | |
if (a[key_name] < b[key_name]) | |
return 1 * decreasing; | |
if (a[key_name] > b[key_name]) | |
return -1 * decreasing; | |
return 0; | |
}; | |
} | |
// The actual read-in of the data and main code: | |
d3.json(json_file, function(error, data) { | |
// set the number of topics to global variable K: | |
K = data['mdsDat'].x.length; | |
// R is the number of top relevant (or salient) words whose bars we display | |
R = data['R']; | |
// a (K x 5) matrix with columns x, y, topics, Freq, cluster (where x and y are locations for left panel) | |
mdsData = []; | |
for (var i = 0; i < K; i++) { | |
var obj = {}; | |
for (var key in data['mdsDat']) { | |
obj[key] = data['mdsDat'][key][i]; | |
} | |
mdsData.push(obj); | |
} | |
// a huge matrix with 3 columns: Term, Topic, Freq, where Freq is all non-zero probabilities of topics given terms | |
// for the terms that appear in the barcharts for this data | |
mdsData3 = []; | |
for (var i = 0; i < data['token.table'].Term.length; i++) { | |
var obj = {}; | |
for (var key in data['token.table']) { | |
obj[key] = data['token.table'][key][i]; | |
} | |
mdsData3.push(obj); | |
} | |
// large data for the widths of bars in bar-charts. 6 columns: Term, logprob, loglift, Freq, Total, Category | |
// Contains all possible terms for topics in (1, 2, ..., k) and lambda in the user-supplied grid of lambda values | |
// which defaults to (0, 0.01, 0.02, ..., 0.99, 1). | |
lamData = []; | |
for (var i = 0; i < data['tinfo'].Term.length; i++) { | |
var obj = {}; | |
for (var key in data['tinfo']) { | |
obj[key] = data['tinfo'][key][i]; | |
} | |
lamData.push(obj); | |
} | |
// Create the topic input & lambda slider forms. Inspired from: | |
// http://bl.ocks.org/d3noob/10632804 | |
// http://bl.ocks.org/d3noob/10633704 | |
init_forms(topicID, lambdaID, visID); | |
// When the value of lambda changes, update the visualization | |
d3.select(lambda_select) | |
.on("mouseup", function() { | |
// store the previous lambda value | |
lambda.old = lambda.current; | |
lambda.current = document.getElementById(lambdaID).value; | |
vis_state.lambda = +this.value; | |
// adjust the text on the range slider | |
d3.select(lambda_select).property("value", vis_state.lambda); | |
d3.select(lambda_select + "-value").text(vis_state.lambda); | |
// transition the order of the bars | |
var increased = lambda.old < vis_state.lambda; | |
if (vis_state.topic > 0) reorder_bars(increased); | |
// store the current lambda value | |
state_save(true); | |
document.getElementById(lambdaID).value = vis_state.lambda; | |
}); | |
d3.select("#" + topicUp) | |
.on("click", function() { | |
// remove term selection if it exists (from a saved URL) | |
var termElem = document.getElementById(termID + vis_state.term); | |
if (termElem !== undefined) term_off(termElem); | |
vis_state.term = ""; | |
var value_old = document.getElementById(topicID).value; | |
var value_new = Math.min(K, +value_old + 1).toFixed(0); | |
// increment the value in the input box | |
document.getElementById(topicID).value = value_new; | |
topic_off(document.getElementById(topicID + value_old)); | |
topic_on(document.getElementById(topicID + value_new)); | |
vis_state.topic = value_new; | |
state_save(true); | |
}) | |
d3.select("#" + topicDown) | |
.on("click", function() { | |
// remove term selection if it exists (from a saved URL) | |
var termElem = document.getElementById(termID + vis_state.term); | |
if (termElem !== undefined) term_off(termElem); | |
vis_state.term = ""; | |
var value_old = document.getElementById(topicID).value; | |
var value_new = Math.max(0, +value_old - 1).toFixed(0); | |
// increment the value in the input box | |
document.getElementById(topicID).value = value_new; | |
topic_off(document.getElementById(topicID + value_old)); | |
topic_on(document.getElementById(topicID + value_new)); | |
vis_state.topic = value_new; | |
state_save(true); | |
}) | |
d3.select("#" + topicID) | |
.on("keyup", function() { | |
// remove term selection if it exists (from a saved URL) | |
var termElem = document.getElementById(termID + vis_state.term); | |
if (termElem !== undefined) term_off(termElem); | |
vis_state.term = ""; | |
topic_off(document.getElementById(topicID + vis_state.topic)) | |
var value_new = document.getElementById(topicID).value; | |
if (!isNaN(value_new) && value_new > 0) { | |
value_new = Math.min(K, Math.max(1, value_new)) | |
topic_on(document.getElementById(topicID + value_new)); | |
vis_state.topic = value_new; | |
state_save(true); | |
document.getElementById(topicID).value = vis_state.topic; | |
} | |
}) | |
d3.select("#" + topicClear) | |
.on("click", function() { | |
state_reset(); | |
state_save(true); | |
}) | |
// create linear scaling to pixels (and add some padding on outer region of scatterplot) | |
var xrange = d3.extent(mdsData, function(d) { | |
return d.x; | |
}); //d3.extent returns min and max of an array | |
var xdiff = xrange[1] - xrange[0], | |
xpad = 0.05; | |
var yrange = d3.extent(mdsData, function(d) { | |
return d.y; | |
}); | |
var ydiff = yrange[1] - yrange[0], | |
ypad = 0.05; | |
if (xdiff > ydiff) { | |
var xScale = d3.scale.linear() | |
.range([0, mdswidth]) | |
.domain([xrange[0] - xpad * xdiff, xrange[1] + xpad * xdiff]); | |
var yScale = d3.scale.linear() | |
.range([mdsheight, 0]) | |
.domain([yrange[0] - 0.5*(xdiff - ydiff) - ypad*xdiff, yrange[1] + 0.5*(xdiff - ydiff) + ypad*xdiff]); | |
} else { | |
var xScale = d3.scale.linear() | |
.range([0, mdswidth]) | |
.domain([xrange[0] - 0.5*(ydiff - xdiff) - xpad*ydiff, xrange[1] + 0.5*(ydiff - xdiff) + xpad*ydiff]); | |
var yScale = d3.scale.linear() | |
.range([mdsheight, 0]) | |
.domain([yrange[0] - ypad * ydiff, yrange[1] + ypad * ydiff]); | |
} | |
// Create new svg element (that will contain everything): | |
var svg = d3.select(to_select).append("svg") | |
.attr("width", mdswidth + barwidth + margin.left + termwidth + margin.right) | |
.attr("height", mdsheight + 2 * margin.top + margin.bottom + 2 * rMax); | |
// Create a group for the mds plot | |
var mdsplot = svg.append("g") | |
.attr("id", "leftpanel") | |
.attr("class", "points") | |
.attr("transform", "translate(" + margin.left + "," + 2 * margin.top + ")"); | |
// Clicking on the mdsplot should clear the selection | |
mdsplot | |
.append("rect") | |
.attr("x", 0) | |
.attr("y", 0) | |
.attr("height", mdsheight) | |
.attr("width", mdswidth) | |
.style("fill", color1) | |
.attr("opacity", 0) | |
.on("click", function() { | |
state_reset(); | |
state_save(true); | |
}); | |
mdsplot.append("line") // draw x-axis | |
.attr("x1", 0) | |
.attr("x2", mdswidth) | |
.attr("y1", mdsheight / 2) | |
.attr("y2", mdsheight / 2) | |
.attr("stroke", "gray") | |
.attr("opacity", 0.3); | |
mdsplot.append("text") // label x-axis | |
.attr("x", 0) | |
.attr("y", mdsheight/2 - 5) | |
.text(data['plot.opts'].xlab) | |
.attr("fill", "gray"); | |
mdsplot.append("line") // draw y-axis | |
.attr("x1", mdswidth / 2) | |
.attr("x2", mdswidth / 2) | |
.attr("y1", 0) | |
.attr("y2", mdsheight) | |
.attr("stroke", "gray") | |
.attr("opacity", 0.3); | |
mdsplot.append("text") // label y-axis | |
.attr("x", mdswidth/2 + 5) | |
.attr("y", 7) | |
.text(data['plot.opts'].ylab) | |
.attr("fill", "gray"); | |
// new definitions based on fixing the sum of the areas of the default topic circles: | |
var newSmall = Math.sqrt(0.02*mdsarea*circle_prop/Math.PI); | |
var newMedium = Math.sqrt(0.05*mdsarea*circle_prop/Math.PI); | |
var newLarge = Math.sqrt(0.10*mdsarea*circle_prop/Math.PI); | |
var cx = 10 + newLarge, | |
cx2 = cx + 1.5 * newLarge; | |
// circle guide inspired from | |
// http://www.nytimes.com/interactive/2012/02/13/us/politics/2013-budget-proposal-graphic.html?_r=0 | |
circleGuide = function(rSize, size) { | |
d3.select("#leftpanel").append("circle") | |
.attr('class', "circleGuide" + size) | |
.attr('r', rSize) | |
.attr('cx', cx) | |
.attr('cy', mdsheight + rSize) | |
.style('fill', 'none') | |
.style('stroke-dasharray', '2 2') | |
.style('stroke', '#999'); | |
d3.select("#leftpanel").append("line") | |
.attr('class', "lineGuide" + size) | |
.attr("x1", cx) | |
.attr("x2", cx2) | |
.attr("y1", mdsheight + 2 * rSize) | |
.attr("y2", mdsheight + 2 * rSize) | |
.style("stroke", "gray") | |
.style("opacity", 0.3); | |
} | |
circleGuide(newSmall, "Small"); | |
circleGuide(newMedium, "Medium"); | |
circleGuide(newLarge, "Large"); | |
var defaultLabelSmall = "2%"; | |
var defaultLabelMedium = "5%"; | |
var defaultLabelLarge = "10%"; | |
d3.select("#leftpanel").append("text") | |
.attr("x", 10) | |
.attr("y", mdsheight - 10) | |
.attr('class', "circleGuideTitle") | |
.style("text-anchor", "left") | |
.style("fontWeight", "bold") | |
.text("Marginal topic distribtion"); | |
d3.select("#leftpanel").append("text") | |
.attr("x", cx2 + 10) | |
.attr("y", mdsheight + 2 * newSmall) | |
.attr('class', "circleGuideLabelSmall") | |
.style("text-anchor", "start") | |
.text(defaultLabelSmall); | |
d3.select("#leftpanel").append("text") | |
.attr("x", cx2 + 10) | |
.attr("y", mdsheight + 2 * newMedium) | |
.attr('class', "circleGuideLabelMedium") | |
.style("text-anchor", "start") | |
.text(defaultLabelMedium); | |
d3.select("#leftpanel").append("text") | |
.attr("x", cx2 + 10) | |
.attr("y", mdsheight + 2 * newLarge) | |
.attr('class', "circleGuideLabelLarge") | |
.style("text-anchor", "start") | |
.text(defaultLabelLarge); | |
// bind mdsData to the points in the left panel: | |
var points = mdsplot.selectAll("points") | |
.data(mdsData) | |
.enter(); | |
// text to indicate topic | |
points.append("text") | |
.attr("class", "txt") | |
.attr("x", function(d) { | |
return (xScale(+d.x)); | |
}) | |
.attr("y", function(d) { | |
return (yScale(+d.y) + 4); | |
}) | |
.attr("stroke", "black") | |
.attr("opacity", 1) | |
.style("text-anchor", "middle") | |
.style("font-size", "11px") | |
.style("fontWeight", 100) | |
.text(function(d) { | |
return d.topics; | |
}); | |
// draw circles | |
points.append("circle") | |
.attr("class", "dot") | |
.style("opacity", 0.2) | |
.style("fill", color1) | |
.attr("r", function(d) { | |
//return (rScaleMargin(+d.Freq)); | |
return (Math.sqrt((d.Freq/100)*mdswidth*mdsheight*circle_prop/Math.PI)); | |
}) | |
.attr("cx", function(d) { | |
return (xScale(+d.x)); | |
}) | |
.attr("cy", function(d) { | |
return (yScale(+d.y)); | |
}) | |
.attr("stroke", "black") | |
.attr("id", function(d) { | |
return (topicID + d.topics) | |
}) | |
.on("mouseover", function(d) { | |
var old_topic = topicID + vis_state.topic; | |
if (vis_state.topic > 0 && old_topic != this.id) { | |
topic_off(document.getElementById(old_topic)); | |
} | |
topic_on(this); | |
}) | |
.on("click", function(d) { | |
// prevent click event defined on the div container from firing | |
// http://bl.ocks.org/jasondavies/3186840 | |
d3.event.stopPropagation(); | |
var old_topic = topicID + vis_state.topic; | |
if (vis_state.topic > 0 && old_topic != this.id) { | |
topic_off(document.getElementById(old_topic)); | |
} | |
// make sure topic input box value and fragment reflects clicked selection | |
document.getElementById(topicID).value = vis_state.topic = d.topics; | |
state_save(true); | |
topic_on(this); | |
}) | |
.on("mouseout", function(d) { | |
if (vis_state.topic != d.topics) topic_off(this); | |
if (vis_state.topic > 0) topic_on(document.getElementById(topicID + vis_state.topic)); | |
}); | |
svg.append("text") | |
.text("Intertopic Distance Map (via multidimensional scaling)") | |
.attr("x", mdswidth/2 + margin.left) | |
.attr("y", 30) | |
.style("font-size", "16px") | |
.style("text-anchor", "middle"); | |
// establish layout and vars for bar chart | |
var barDefault2 = lamData.filter(function(d) { | |
return d.Category == "Default" | |
}); | |
var y = d3.scale.ordinal() | |
.domain(barDefault2.map(function(d) { | |
return d.Term; | |
})) | |
.rangeRoundBands([0, barheight], 0.15); | |
var x = d3.scale.linear() | |
.domain([0, d3.max(barDefault2, function(d) { | |
return d.Total; | |
})]) | |
.range([0, barwidth]) | |
.nice(); | |
var yAxis = d3.svg.axis() | |
.scale(y); | |
// Add a group for the bar chart | |
var chart = svg.append("g") | |
.attr("transform", "translate(" + +(mdswidth + margin.left + termwidth) + "," + 2 * margin.top + ")") | |
.attr("id", "bar-freqs"); | |
// bar chart legend/guide: | |
var barguide = {"width": 100, "height": 15}; | |
d3.select("#bar-freqs").append("rect") | |
.attr("x", 0) | |
.attr("y", mdsheight + 10) | |
.attr("height", barguide.height) | |
.attr("width", barguide.width) | |
.style("fill", color1) | |
.attr("opacity", 0.4); | |
d3.select("#bar-freqs").append("text") | |
.attr("x", barguide.width + 5) | |
.attr("y", mdsheight + 10 + barguide.height/2) | |
.style("dominant-baseline", "middle") | |
.text("Overall term frequency"); | |
d3.select("#bar-freqs").append("rect") | |
.attr("x", 0) | |
.attr("y", mdsheight + 10 + barguide.height + 5) | |
.attr("height", barguide.height) | |
.attr("width", barguide.width/2) | |
.style("fill", color2) | |
.attr("opacity", 0.8); | |
d3.select("#bar-freqs").append("text") | |
.attr("x", barguide.width/2 + 5) | |
.attr("y", mdsheight + 10 + (3/2)*barguide.height + 5) | |
.style("dominant-baseline", "middle") | |
.text("Estimated term frequency within the selected topic"); | |
// footnotes: | |
d3.select("#bar-freqs") | |
.append("a") | |
.attr("xlink:href", "http://vis.stanford.edu/files/2012-Termite-AVI.pdf") | |
.attr("target", "_blank") | |
.append("text") | |
.attr("x", 0) | |
.attr("y", mdsheight + 10 + (6/2)*barguide.height + 5) | |
.style("dominant-baseline", "middle") | |
.text("1. saliency(term w) = frequency(w) * [sum_t p(t | w) * log(p(t | w)/p(t))] for topics t; see Chuang et. al (2012)"); | |
d3.select("#bar-freqs") | |
.append("a") | |
.attr("xlink:href", "http://nlp.stanford.edu/events/illvi2014/papers/sievert-illvi2014.pdf") | |
.attr("target", "_blank") | |
.append("text") | |
.attr("x", 0) | |
.attr("y", mdsheight + 10 + (8/2)*barguide.height + 5) | |
.style("dominant-baseline", "middle") | |
.text("2. relevance(term w | topic t) = \u03BB * p(w | t) + (1 - \u03BB) * p(w | t)/p(w); see Sievert & Shirley (2014)"); | |
// Bind 'default' data to 'default' bar chart | |
var basebars = chart.selectAll(".bar-totals") | |
.data(barDefault2) | |
.enter(); | |
// Draw the gray background bars defining the overall frequency of each word | |
basebars | |
.append("rect") | |
.attr("class", "bar-totals") | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.attr("height", y.rangeBand()) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.style("fill", color1) | |
.attr("opacity", 0.4); | |
// Add word labels to the side of each bar | |
basebars | |
.append("text") | |
.attr("x", -5) | |
.attr("class", "terms") | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}) | |
.attr("cursor", "pointer") | |
.attr("id", function(d) { | |
return (termID + d.Term) | |
}) | |
.style("text-anchor", "end") // right align text - use 'middle' for center alignment | |
.text(function(d) { | |
return d.Term; | |
}) | |
.on("mouseover", function() { | |
term_hover(this); | |
}) | |
// .on("click", function(d) { | |
// var old_term = termID + vis_state.term; | |
// if (vis_state.term != "" && old_term != this.id) { | |
// term_off(document.getElementById(old_term)); | |
// } | |
// vis_state.term = d.Term; | |
// state_save(true); | |
// term_on(this); | |
// debugger; | |
// }) | |
.on("mouseout", function() { | |
vis_state.term = ""; | |
term_off(this); | |
state_save(true); | |
}); | |
var title = chart.append("text") | |
.attr("x", barwidth/2) | |
.attr("y", -30) | |
.attr("class", "bubble-tool") // set class so we can remove it when highlight_off is called | |
.style("text-anchor", "middle") | |
.style("font-size", "16px") | |
.text("Top-" + R + " Most Salient Terms"); | |
title.append("tspan") | |
.attr("baseline-shift", "super") | |
.attr("font-size", "12px") | |
.text("(1)"); | |
// barchart axis adapted from http://bl.ocks.org/mbostock/1166403 | |
var xAxis = d3.svg.axis().scale(x) | |
.orient("top") | |
.tickSize(-barheight) | |
.tickSubdivide(true) | |
.ticks(6); | |
chart.attr("class", "xaxis") | |
.call(xAxis); | |
// dynamically create the topic and lambda input forms at the top of the page: | |
function init_forms(topicID, lambdaID, visID) { | |
// create container div for topic and lambda input: | |
var inputDiv = document.createElement("div"); | |
inputDiv.setAttribute("id", "top"); | |
inputDiv.setAttribute("style", "width: 1210px"); // to match the width of the main svg element | |
document.getElementById(visID).appendChild(inputDiv); | |
// topic input container: | |
var topicDiv = document.createElement("div"); | |
topicDiv.setAttribute("style", "padding: 5px; background-color: #e8e8e8; display: inline-block; width: " + mdswidth + "px; height: 50px; float: left"); | |
inputDiv.appendChild(topicDiv); | |
var topicLabel = document.createElement("label"); | |
topicLabel.setAttribute("for", topicID); | |
topicLabel.setAttribute("style", "font-family: sans-serif; font-size: 14px"); | |
topicLabel.innerHTML = "Selected Topic: <span id='" + topicID + "-value'></span>"; | |
topicDiv.appendChild(topicLabel); | |
var topicInput = document.createElement("input"); | |
topicInput.setAttribute("style", "width: 50px"); | |
topicInput.type = "text"; | |
topicInput.min = "0"; | |
topicInput.max = K; // assumes the data has already been read in | |
topicInput.step = "1"; | |
topicInput.value = "0"; // a value of 0 indicates no topic is selected | |
topicInput.id = topicID; | |
topicDiv.appendChild(topicInput); | |
var previous = document.createElement("button"); | |
previous.setAttribute("id", topicDown); | |
previous.setAttribute("style", "margin-left: 5px"); | |
previous.innerHTML = "Previous Topic"; | |
topicDiv.appendChild(previous); | |
var next = document.createElement("button"); | |
next.setAttribute("id", topicUp); | |
next.setAttribute("style", "margin-left: 5px"); | |
next.innerHTML = "Next Topic"; | |
topicDiv.appendChild(next); | |
var clear = document.createElement("button"); | |
clear.setAttribute("id", topicClear); | |
clear.setAttribute("style", "margin-left: 5px"); | |
clear.innerHTML = "Clear Topic"; | |
topicDiv.appendChild(clear); | |
// lambda inputs | |
//var lambdaDivLeft = 8 + mdswidth + margin.left + termwidth; | |
var lambdaDivWidth = barwidth; | |
var lambdaDiv = document.createElement("div"); | |
lambdaDiv.setAttribute("id", "lambdaInput"); | |
lambdaDiv.setAttribute("style", "padding: 5px; background-color: #e8e8e8; display: inline-block; height: 50px; width: " + lambdaDivWidth + "px; float: right; margin-right: 30px"); | |
inputDiv.appendChild(lambdaDiv); | |
var lambdaZero = document.createElement("div"); | |
lambdaZero.setAttribute("style", "padding: 5px; height: 20px; width: 220px; font-family: sans-serif; float: left"); | |
lambdaZero.setAttribute("id", "lambdaZero"); | |
lambdaDiv.appendChild(lambdaZero); | |
var xx = d3.select("#lambdaZero") | |
.append("text") | |
.attr("x", 0) | |
.attr("y", 0) | |
.style("font-size", "14px") | |
.text("Slide to adjust relevance metric:"); | |
var yy = d3.select("#lambdaZero") | |
.append("text") | |
.attr("x", 125) | |
.attr("y", -5) | |
.style("font-size", "10px") | |
.style("position", "absolute") | |
.text("(2)"); | |
var sliderDiv = document.createElement("div"); | |
sliderDiv.setAttribute("id", "sliderdiv"); | |
sliderDiv.setAttribute("style", "padding: 5px; height: 40px; width: 250px; float: right; margin-top: -5px; margin-right: 10px"); | |
lambdaDiv.appendChild(sliderDiv); | |
var lambdaInput = document.createElement("input"); | |
lambdaInput.setAttribute("style", "width: 250px; margin-left: 0px; margin-right: 0px"); | |
lambdaInput.type = "range"; | |
lambdaInput.min = 0; | |
lambdaInput.max = 1; | |
lambdaInput.step = data['lambda.step']; | |
lambdaInput.value = vis_state.lambda; | |
lambdaInput.id = lambdaID; | |
lambdaInput.setAttribute("list", "ticks"); // to enable automatic ticks (with no labels, see below) | |
sliderDiv.appendChild(lambdaInput); | |
var lambdaLabel = document.createElement("label"); | |
lambdaLabel.setAttribute("id", "lamlabel"); | |
lambdaLabel.setAttribute("for", lambdaID); | |
lambdaLabel.setAttribute("style", "height: 20px; width: 60px; font-family: sans-serif; font-size: 14px; margin-left: 80px"); | |
lambdaLabel.innerHTML = "λ = <span id='" + lambdaID + "-value'>" + vis_state.lambda + "</span>"; | |
lambdaDiv.appendChild(lambdaLabel); | |
// Create the svg to contain the slider scale: | |
var scaleContainer = d3.select("#sliderdiv").append("svg") | |
.attr("width", 250) | |
.attr("height", 25); | |
var sliderScale = d3.scale.linear() | |
.domain([0, 1]) | |
.range([7.5, 242.5]) // trimmed by 7.5px on each side to match the input type=range slider: | |
.nice(); | |
// adapted from http://bl.ocks.org/mbostock/1166403 | |
var sliderAxis = d3.svg.axis() | |
.scale(sliderScale) | |
.orient("bottom") | |
.tickSize(10) | |
.tickSubdivide(true) | |
.ticks(6); | |
// group to contain the elements of the slider axis: | |
var sliderAxisGroup = scaleContainer.append("g") | |
.attr("class", "slideraxis") | |
.attr("margin-top", "-10px") | |
.call(sliderAxis); | |
// Another strategy for tick marks on the slider; simpler, but not labels | |
// var sliderTicks = document.createElement("datalist"); | |
// sliderTicks.setAttribute("id", "ticks"); | |
// for (var tick = 0; tick <= 10; tick++) { | |
// var tickOption = document.createElement("option"); | |
// //tickOption.value = tick/10; | |
// tickOption.innerHTML = tick/10; | |
// sliderTicks.appendChild(tickOption); | |
// } | |
// append the forms to the containers | |
//lambdaDiv.appendChild(sliderTicks); | |
} | |
// function to re-order the bars (gray and red), and terms: | |
function reorder_bars(increase) { | |
// grab the bar-chart data for this topic only: | |
var dat2 = lamData.filter(function(d) { | |
//return d.Category == "Topic" + Math.min(K, Math.max(0, vis_state.topic)) // fails for negative topic numbers... | |
return d.Category == "Topic" + vis_state.topic; | |
}); | |
// define relevance: | |
for (var i = 0; i < dat2.length; i++) { | |
dat2[i].relevance = vis_state.lambda * dat2[i].logprob + | |
(1 - vis_state.lambda) * dat2[i].loglift; | |
} | |
// sort by relevance: | |
dat2.sort(fancysort("relevance")); | |
// truncate to the top R tokens: | |
var dat3 = dat2.slice(0, R); | |
var y = d3.scale.ordinal() | |
.domain(dat3.map(function(d) { | |
return d.Term; | |
})) | |
.rangeRoundBands([0, barheight], 0.15); | |
var x = d3.scale.linear() | |
.domain([0, d3.max(dat3, function(d) { | |
return d.Total; | |
})]) | |
.range([0, barwidth]) | |
.nice(); | |
// Change Total Frequency bars | |
var graybars = d3.select("#bar-freqs") | |
.selectAll(".bar-totals") | |
.data(dat3, function(d) { | |
return d.Term; | |
}); | |
// Change word labels | |
var labels = d3.select("#bar-freqs") | |
.selectAll(".terms") | |
.data(dat3, function(d) { | |
return d.Term; | |
}); | |
// Create red bars (drawn over the gray ones) to signify the frequency under the selected topic | |
var redbars = d3.select("#bar-freqs") | |
.selectAll(".overlay") | |
.data(dat3, function(d) { | |
return d.Term; | |
}); | |
// adapted from http://bl.ocks.org/mbostock/1166403 | |
var xAxis = d3.svg.axis().scale(x) | |
.orient("top") | |
.tickSize(-barheight) | |
.tickSubdivide(true) | |
.ticks(6); | |
// New axis definition: | |
var newaxis = d3.selectAll(".xaxis"); | |
// define the new elements to enter: | |
var graybarsEnter = graybars.enter().append("rect") | |
.attr("class", "bar-totals") | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term) + barheight + margin.bottom + 2 * rMax; | |
}) | |
.attr("height", y.rangeBand()) | |
.style("fill", color1) | |
.attr("opacity", 0.4); | |
var labelsEnter = labels.enter() | |
.append("text") | |
.attr("x", -5) | |
.attr("class", "terms") | |
.attr("y", function(d) { | |
return y(d.Term) + 12 + barheight + margin.bottom + 2 * rMax; | |
}) | |
.attr("cursor", "pointer") | |
.style("text-anchor", "end") | |
.attr("id", function(d) { | |
return (termID + d.Term) | |
}) | |
.text(function(d) { | |
return d.Term; | |
}) | |
.on("mouseover", function() { | |
term_hover(this); | |
}) | |
// .on("click", function(d) { | |
// var old_term = termID + vis_state.term; | |
// if (vis_state.term != "" && old_term != this.id) { | |
// term_off(document.getElementById(old_term)); | |
// } | |
// vis_state.term = d.Term; | |
// state_save(true); | |
// term_on(this); | |
// }) | |
.on("mouseout", function() { | |
vis_state.term = ""; | |
term_off(this); | |
state_save(true); | |
}); | |
var redbarsEnter = redbars.enter().append("rect") | |
.attr("class", "overlay") | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term) + barheight + margin.bottom + 2 * rMax; | |
}) | |
.attr("height", y.rangeBand()) | |
.style("fill", color2) | |
.attr("opacity", 0.8); | |
if (increase) { | |
graybarsEnter | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.transition().duration(duration) | |
.delay(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}); | |
labelsEnter | |
.transition().duration(duration) | |
.delay(duration) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}); | |
redbarsEnter | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}) | |
.transition().duration(duration) | |
.delay(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}); | |
graybars.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}); | |
labels.transition().duration(duration) | |
.delay(duration) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}); | |
redbars.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}) | |
.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}); | |
// Transition exiting rectangles to the bottom of the barchart: | |
graybars.exit() | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.transition().duration(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 6 + i * 18; | |
}) | |
.remove(); | |
labels.exit() | |
.transition().duration(duration) | |
.delay(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 18 + i * 18; | |
}) | |
.remove(); | |
redbars.exit() | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}) | |
.transition().duration(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 6 + i * 18; | |
}) | |
.remove(); | |
// https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease | |
newaxis.transition().duration(duration) | |
.call(xAxis) | |
.transition().duration(duration); | |
} else { | |
graybarsEnter | |
.attr("width", 100) // FIXME by looking up old width of these bars | |
.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}); | |
labelsEnter | |
.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}); | |
redbarsEnter | |
.attr("width", 50) // FIXME by looking up old width of these bars | |
.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}); | |
graybars.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}); | |
labels.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}); | |
redbars.transition().duration(duration) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.transition().duration(duration) | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}); | |
// Transition exiting rectangles to the bottom of the barchart: | |
graybars.exit() | |
.transition().duration(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 6 + i * 18 + 2 * rMax; | |
}) | |
.remove(); | |
labels.exit() | |
.transition().duration(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 18 + i * 18 + 2 * rMax; | |
}) | |
.remove(); | |
redbars.exit() | |
.transition().duration(duration) | |
.attr("y", function(d, i) { | |
return barheight + margin.bottom + 6 + i * 18 + 2 * rMax; | |
}) | |
.remove(); | |
// https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease | |
newaxis.transition().duration(duration) | |
.transition().duration(duration) | |
.call(xAxis); | |
} | |
} | |
////////////////////////////////////////////////////////////////////////////// | |
// function to update bar chart when a topic is selected | |
// the circle argument should be the appropriate circle element | |
function topic_on(circle) { | |
if (circle == null) return null; | |
// grab data bound to this element | |
var d = circle.__data__ | |
var Freq = Math.round(d.Freq * 10) / 10, | |
topics = d.topics; | |
// change opacity and fill of the selected circle | |
circle.style.opacity = highlight_opacity; | |
circle.style.fill = color2; | |
// Remove 'old' bar chart title | |
var text = d3.select(".bubble-tool"); | |
text.remove(); | |
// append text with info relevant to topic of interest | |
d3.select("#bar-freqs") | |
.append("text") | |
.attr("x", barwidth/2) | |
.attr("y", -30) | |
.attr("class", "bubble-tool") // set class so we can remove it when highlight_off is called | |
.style("text-anchor", "middle") | |
.style("font-size", "16px") | |
.text("Top-" + R + " Most Relevant Terms for Topic " + topics + " (" + Freq + "% of tokens)"); | |
// grab the bar-chart data for this topic only: | |
var dat2 = lamData.filter(function(d) { | |
return d.Category == "Topic" + topics | |
}); | |
// define relevance: | |
for (var i = 0; i < dat2.length; i++) { | |
dat2[i].relevance = lambda.current * dat2[i].logprob + | |
(1 - lambda.current) * dat2[i].loglift; | |
} | |
// sort by relevance: | |
dat2.sort(fancysort("relevance")); | |
// truncate to the top R tokens: | |
var dat3 = dat2.slice(0, R); | |
// scale the bars to the top R terms: | |
var y = d3.scale.ordinal() | |
.domain(dat3.map(function(d) { | |
return d.Term; | |
})) | |
.rangeRoundBands([0, barheight], 0.15); | |
var x = d3.scale.linear() | |
.domain([0, d3.max(dat3, function(d) { | |
return d.Total; | |
})]) | |
.range([0, barwidth]) | |
.nice(); | |
// remove the red bars if there are any: | |
d3.selectAll(".overlay").remove(); | |
// Change Total Frequency bars | |
d3.selectAll(".bar-totals") | |
.data(dat3) | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.attr("height", y.rangeBand()) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.style("fill", color1) | |
.attr("opacity", 0.4); | |
// Change word labels | |
d3.selectAll(".terms") | |
.data(dat3) | |
.attr("x", -5) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}) | |
.attr("id", function(d) { | |
return (termID + d.Term) | |
}) | |
.style("text-anchor", "end") // right align text - use 'middle' for center alignment | |
.text(function(d) { | |
return d.Term; | |
}); | |
// Create red bars (drawn over the gray ones) to signify the frequency under the selected topic | |
d3.select("#bar-freqs").selectAll(".overlay") | |
.data(dat3) | |
.enter() | |
.append("rect") | |
.attr("class", "overlay") | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.attr("height", y.rangeBand()) | |
.attr("width", function(d) { | |
return x(d.Freq); | |
}) | |
.style("fill", color2) | |
.attr("opacity", 0.8); | |
// adapted from http://bl.ocks.org/mbostock/1166403 | |
var xAxis = d3.svg.axis().scale(x) | |
.orient("top") | |
.tickSize(-barheight) | |
.tickSubdivide(true) | |
.ticks(6); | |
// redraw x-axis | |
d3.selectAll(".xaxis") | |
//.attr("class", "xaxis") | |
.call(xAxis); | |
} | |
function topic_off(circle) { | |
if (circle == null) return circle; | |
// go back to original opacity/fill | |
circle.style.opacity = base_opacity; | |
circle.style.fill = color1; | |
var title = d3.selectAll(".bubble-tool") | |
.text("Top-" + R + " Most Salient Terms"); | |
title.append("tspan") | |
.attr("baseline-shift", "super") | |
.attr("font-size", 12) | |
.text(1); | |
// remove the red bars | |
d3.selectAll(".overlay").remove(); | |
// go back to 'default' bar chart | |
var dat2 = lamData.filter(function(d) { | |
return d.Category == "Default" | |
}); | |
var y = d3.scale.ordinal() | |
.domain(dat2.map(function(d) { | |
return d.Term; | |
})) | |
.rangeRoundBands([0, barheight], 0.15); | |
var x = d3.scale.linear() | |
.domain([0, d3.max(dat2, function(d) { | |
return d.Total; | |
})]) | |
.range([0, barwidth]) | |
.nice(); | |
// Change Total Frequency bars | |
d3.selectAll(".bar-totals") | |
.data(dat2) | |
.attr("x", 0) | |
.attr("y", function(d) { | |
return y(d.Term); | |
}) | |
.attr("height", y.rangeBand()) | |
.attr("width", function(d) { | |
return x(d.Total); | |
}) | |
.style("fill", color1) | |
.attr("opacity", 0.4); | |
//Change word labels | |
d3.selectAll(".terms") | |
.data(dat2) | |
.attr("x", -5) | |
.attr("y", function(d) { | |
return y(d.Term) + 12; | |
}) | |
.style("text-anchor", "end") // right align text - use 'middle' for center alignment | |
.text(function(d) { | |
return d.Term; | |
}); | |
// adapted from http://bl.ocks.org/mbostock/1166403 | |
var xAxis = d3.svg.axis().scale(x) | |
.orient("top") | |
.tickSize(-barheight) | |
.tickSubdivide(true) | |
.ticks(6); | |
// redraw x-axis | |
d3.selectAll(".xaxis") | |
.attr("class", "xaxis") | |
.call(xAxis); | |
} | |
// event definition for mousing over a term | |
function term_hover(term) { | |
var old_term = termID + vis_state.term; | |
if (vis_state.term != "" && old_term != term.id) { | |
term_off(document.getElementById(old_term)); | |
} | |
vis_state.term = term.innerHTML; | |
term_on(term); | |
state_save(true); | |
} | |
// updates vis when a term is selected via click or hover | |
function term_on(term) { | |
if (term == null) return null; | |
term.style["fontWeight"] = "bold"; | |
var d = term.__data__ | |
var Term = d.Term; | |
var dat2 = mdsData3.filter(function(d2) { | |
return d2.Term == Term | |
}); | |
var k = dat2.length; // number of topics for this token with non-zero frequency | |
var radius = []; | |
for (var i = 0; i < K; ++i) { | |
radius[i] = 0; | |
} | |
for (i = 0; i < k; i++) { | |
radius[dat2[i].Topic - 1] = dat2[i].Freq; | |
} | |
var size = []; | |
for (var i = 0; i < K; ++i) { | |
size[i] = 0; | |
} | |
for (i = 0; i < k; i++) { | |
// If we want to also re-size the topic number labels, do it here | |
// 11 is the default, so leaving this as 11 won't change anything. | |
size[dat2[i].Topic - 1] = 11; | |
} | |
var rScaleCond = d3.scale.sqrt() | |
.domain([0, 1]).range([0, rMax]); | |
// Change size of bubbles according to the word's distribution over topics | |
d3.selectAll(".dot") | |
.data(radius) | |
.transition() | |
.attr("r", function(d) { | |
//return (rScaleCond(d)); | |
return (Math.sqrt(d*mdswidth*mdsheight*word_prop/Math.PI)); | |
}); | |
// re-bind mdsData so we can handle multiple selection | |
d3.selectAll(".dot") | |
.data(mdsData) | |
// Change sizes of topic numbers: | |
d3.selectAll(".txt") | |
.data(size) | |
.transition() | |
.style("font-size", function(d) { | |
return +d; | |
}); | |
// Alter the guide | |
d3.select(".circleGuideTitle") | |
.text("Conditional topic distribution given term = '" + term.innerHTML + "'"); | |
} | |
function term_off(term) { | |
if (term == null) return null; | |
term.style["fontWeight"] = "normal"; | |
d3.selectAll(".dot") | |
.data(mdsData) | |
.transition() | |
.attr("r", function(d) { | |
//return (rScaleMargin(+d.Freq)); | |
return (Math.sqrt((d.Freq/100)*mdswidth*mdsheight*circle_prop/Math.PI)); | |
}); | |
// Change sizes of topic numbers: | |
d3.selectAll(".txt") | |
.transition() | |
.style("font-size", "11px"); | |
// Go back to the default guide | |
d3.select(".circleGuideTitle") | |
.text("Marginal topic distribution"); | |
d3.select(".circleGuideLabelLarge") | |
.text(defaultLabelLarge); | |
d3.select(".circleGuideLabelSmall") | |
.attr("y", mdsheight + 2 * newSmall) | |
.text(defaultLabelSmall); | |
d3.select(".circleGuideSmall") | |
.attr("r", newSmall) | |
.attr("cy", mdsheight + newSmall); | |
d3.select(".lineGuideSmall") | |
.attr("y1", mdsheight + 2 * newSmall) | |
.attr("y2", mdsheight + 2 * newSmall); | |
} | |
// serialize the visualization state using fragment identifiers -- http://en.wikipedia.org/wiki/Fragment_identifier | |
// location.hash holds the address information | |
var params = location.hash.split("&"); | |
if (params.length > 1) { | |
vis_state.topic = params[0].split("=")[1]; | |
vis_state.lambda = params[1].split("=")[1]; | |
vis_state.term = params[2].split("=")[1]; | |
// Idea: write a function to parse the URL string | |
// only accept values in [0,1] for lambda, {0, 1, ..., K} for topics (any string is OK for term) | |
// Allow for subsets of the three to be entered: | |
// (1) topic only (lambda = 1 term = "") | |
// (2) lambda only (topic = 0 term = "") visually the same but upon hovering a topic, the effect of lambda will be seen | |
// (3) term only (topic = 0 lambda = 1) only fires when the term is among the R most salient | |
// (4) topic + lambda (term = "") | |
// (5) topic + term (lambda = 1) | |
// (6) lambda + term (topic = 0) visually lambda doesn't make a difference unless a topic is hovered | |
// (7) topic + lambda + term | |
// Short-term: assume format of "#topic=k&lambda=l&term=s" where k, l, and s are strings (b/c they're from a URL) | |
// Force k (topic identifier) to be an integer between 0 and K: | |
vis_state.topic = Math.round(Math.min(K, Math.max(0, vis_state.topic))); | |
// Force l (lambda identifier) to be in [0, 1]: | |
vis_state.lambda = Math.min(1, Math.max(0, vis_state.lambda)); | |
// impose the value of lambda: | |
document.getElementById(lambdaID).value = vis_state.lambda; | |
document.getElementById(lambdaID + "-value").innerHTML = vis_state.lambda; | |
// select the topic and transition the order of the bars (if approporiate) | |
if (!isNaN(vis_state.topic)) { | |
document.getElementById(topicID).value = vis_state.topic; | |
if (vis_state.topic > 0) { | |
topic_on(document.getElementById(topicID + vis_state.topic)); | |
} | |
if (vis_state.lambda < 1 && vis_state.topic > 0) { | |
reorder_bars(false); | |
} | |
} | |
lambda.current = vis_state.lambda; | |
var termElem = document.getElementById(termID + vis_state.term); | |
if (termElem !== undefined) term_on(termElem); | |
} | |
function state_url() { | |
return location.origin + location.pathname + "#topic=" + vis_state.topic + | |
"&lambda=" + vis_state.lambda + "&term=" + vis_state.term; | |
} | |
function state_save(replace) { | |
if (replace) | |
history.replaceState(vis_state, "Query", state_url()); | |
else | |
history.pushState(vis_state, "Query", state_url()); | |
} | |
function state_reset() { | |
if (vis_state.topic > 0) { | |
topic_off(document.getElementById(topicID + vis_state.topic)); | |
} | |
if (vis_state.term != "") { | |
term_off(document.getElementById(termID + vis_state.term)); | |
} | |
vis_state.term = ""; | |
document.getElementById(topicID).value = vis_state.topic = 0; | |
state_save(true); | |
} | |
}); | |
// var current_clicked = { | |
// what: "nothing", | |
// element: undefined | |
// }, | |
//debugger; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment