blacklight_heatmaps 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.esm.js","sources":["../../../../vendor/assets/javascripts/geostats.js","../../../../vendor/assets/javascripts/leaflet_solr_heatmap.js","../../../javascript/basemaps.js","../../../javascript/icons.js","../../../javascript/viewers/index.js","../../../javascript/viewers/show.js","../../../javascript/blacklight_heatmaps.js"],"sourcesContent":["/**\n* geostats() is a tiny and standalone javascript library for classification\n* Project page - https://github.com/simogeo/geostats\n* Copyright (c) 2011 Simon Georget, http://www.intermezzo-coop.eu\n* Licensed under the MIT license\n*/\n\n\n(function (definition) {\n // This file will function properly as a <script> tag, or a module\n // using CommonJS and NodeJS or RequireJS module formats.\n\n // CommonJS\n if (typeof exports === \"object\") {\n module.exports = definition();\n\n // RequireJS\n } else if (typeof define === \"function\" && define.amd) {\n define(definition);\n\n // <script>\n } else {\n geostats = definition();\n }\n\n})(function () {\n\nvar isInt = function(n) {\n return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);\n} // 6 characters\n\nvar _t = function(str) {\n\treturn str;\n};\n\n//taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric\nvar isNumber = function(n) {\n\t return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n\n\n//indexOf polyfill\n// from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement, fromIndex) {\n if ( this === undefined || this === null ) {\n throw new TypeError( '\"this\" is null or not defined' );\n }\n\n var length = this.length >>> 0; // Hack to convert object.length to a UInt32\n\n fromIndex = +fromIndex || 0;\n\n if (Math.abs(fromIndex) === Infinity) {\n fromIndex = 0;\n }\n\n if (fromIndex < 0) {\n fromIndex += length;\n if (fromIndex < 0) {\n fromIndex = 0;\n }\n }\n\n for (;fromIndex < length; fromIndex++) {\n if (this[fromIndex] === searchElement) {\n return fromIndex;\n }\n }\n\n return -1;\n };\n }\n\nvar geostats = function(a) {\n\n\tthis.objectID = '';\n\tthis.separator = ' - ';\n\tthis.legendSeparator = this.separator;\n\tthis.method = '';\n\tthis.precision = 0;\n\tthis.precisionflag = 'auto';\n\tthis.roundlength \t= 2; // Number of decimals, round values\n\tthis.is_uniqueValues = false;\n\tthis.debug = false;\n\tthis.silent = false;\n\n\tthis.bounds = Array();\n\tthis.ranges = Array();\n\tthis.inner_ranges = null;\n\tthis.colors = Array();\n\tthis.counter = Array();\n\n\t// statistics information\n\tthis.stat_sorted\t= null;\n\tthis.stat_mean \t\t= null;\n\tthis.stat_median \t= null;\n\tthis.stat_sum \t\t= null;\n\tthis.stat_max \t\t= null;\n\tthis.stat_min \t\t= null;\n\tthis.stat_pop \t\t= null;\n\tthis.stat_variance\t= null;\n\tthis.stat_stddev\t= null;\n\tthis.stat_cov\t\t= null;\n\n\n\t/**\n\t * logging method\n\t */\n\tthis.log = function(msg, force) {\n\n\t\tif(this.debug == true || force != null)\n\t\t\tconsole.log(this.objectID + \"(object id) :: \" + msg);\n\n\t};\n\n\t/**\n\t * Set bounds\n\t */\n\tthis.setBounds = function(a) {\n\n\t\tthis.log('Setting bounds (' + a.length + ') : ' + a.join());\n\n\t\tthis.bounds = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\n\t\tthis.bounds = a;\n\t\t//this.bounds = this.decimalFormat(a);\n\n\t};\n\n\t/**\n\t * Set a new serie\n\t */\n\tthis.setSerie = function(a) {\n\n\t\tthis.log('Setting serie (' + a.length + ') : ' + a.join());\n\n\t\tthis.serie = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\t\tthis.serie = a;\n\n\t\t//reset statistics after changing serie\n\t this.resetStatistics();\n\n\t\tthis.setPrecision();\n\n\t};\n\n\t/**\n\t * Set colors\n\t */\n\tthis.setColors = function(colors) {\n\n\t\tthis.log('Setting color ramp (' + colors.length + ') : ' + colors.join());\n\n\t\tthis.colors = colors;\n\n\t};\n\n\t/**\n\t * Get feature count\n\t * With bounds array(0, 0.75, 1.5, 2.25, 3);\n\t * should populate this.counter with 5 keys\n\t * and increment counters for each key\n\t */\n\tthis.doCount = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\n\t\tvar tmp = this.sorted();\n\n\t\tthis.counter = new Array();\n\n\t\t// we init counter with 0 value\n\t\tif(this.is_uniqueValues == true) {\n\t\t\tfor (var i = 0; i < this.bounds.length; i++) {\n\t\t\t\tthis.counter[i]= 0;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0; i < this.bounds.length -1; i++) {\n\t\t\t\tthis.counter[i]= 0;\n\t\t\t}\n\t\t}\n\n\t\tfor (var j=0; j < tmp.length; j++) {\n\n\t\t\t// get current class for value to increment the counter\n\t\t\tvar cclass = this.getClass(tmp[j]);\n\t\t\tthis.counter[cclass]++;\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Set decimal precision according to user input\n\t * or automatcally determined according\n\t * to the given serie.\n\t */\n\tthis.setPrecision = function(decimals) {\n\n\t\t// only when called from user\n\t\tif(typeof decimals !== \"undefined\") {\n\t\t\tthis.precisionflag = 'manual';\n\t\t\tthis.precision = decimals;\n\t\t}\n\n\t\t// we calculate the maximal decimal length on given serie\n\t\tif(this.precisionflag == 'auto') {\n\n\t\t\tfor (var i = 0; i < this.serie.length; i++) {\n\n\t\t\t\t// check if the given value is a number and a float\n\t\t\t\tif (!isNaN((this.serie[i]+\"\")) && (this.serie[i]+\"\").toString().indexOf('.') != -1) {\n\t\t\t\t\tvar precision = (this.serie[i] + \"\").split(\".\")[1].length;\n\t\t\t\t} else {\n\t\t\t\t\tvar precision = 0;\n\t\t\t\t}\n\n\t\t\t\tif(precision > this.precision) {\n\t\t\t\t\tthis.precision = precision;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tif(this.precision > 20) {\n\t\t\t// prevent \"Uncaught RangeError: toFixed() digits argument must be between 0 and 20\" bug. See https://github.com/simogeo/geostats/issues/34\n\t\t\tthis.log('this.precision value (' + this.precision + ') is greater than max value. Automatic set-up to 20 to prevent \"Uncaught RangeError: toFixed()\" when calling decimalFormat() method.');\n\t\t\tthis.precision = 20;\n\t\t}\n\n\t\tthis.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : '+ this.precision);\n\n\t\tthis.serie = this.decimalFormat(this.serie);\n\n\t};\n\n\t/**\n\t * Format array numbers regarding to precision\n\t */\n\tthis.decimalFormat = function(a) {\n\n\t\tvar b = new Array();\n\n\t\tfor (var i = 0; i < a.length; i++) {\n\t\t\t// check if the given value is a number\n\t\t\tif (isNumber(a[i])) {\n\t\t\t\tb[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));\n\t\t\t} else {\n\t\t\t\tb[i] = a[i];\n\t\t\t}\n\t\t}\n\n\t\treturn b;\n\t}\n\n\t/**\n\t * Transform a bounds array to a range array the following array : array(0,\n\t * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',\n\t * '2.25-3');\n\t */\n\tthis.setRanges = function() {\n\n\t\tthis.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))\n\n\t\tfor (var i = 0; i < (this.bounds.length - 1); i++) {\n\t\t\tthis.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];\n\t\t}\n\t};\n\n\t/** return min value */\n\tthis.min = function(exclude = []) {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif(!exclude.includes(this.serie[0])) this.stat_min = this.serie[0];\n\t\telse this.stat_min = 999999999999;\n\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif (this.serie[i] < this.stat_min && !exclude.includes(this.serie[i])) {\n\t\t\t\tthis.stat_min = this.serie[i];\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_min;\n\t};\n\n\t/** return max value */\n\tthis.max = function(exclude = []) {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif(!exclude.includes(this.serie[0])) this.stat_max = this.serie[0];\n\t\telse this.stat_max = -999999999999;\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif (this.serie[i] > this.stat_max && !exclude.includes(this.serie[i])) {\n\t\t\t\tthis.stat_max = this.serie[i];\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_max;\n\t};\n\n\t/** return sum value */\n\tthis.sum = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_sum == null) {\n\n\t\t\tthis.stat_sum = 0;\n\t\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\t\tthis.stat_sum += parseFloat(this.serie[i]);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_sum;\n\t};\n\n\t/** return population number */\n\tthis.pop = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_pop == null) {\n\n\t\t\tthis.stat_pop = this.serie.length;\n\n\t\t}\n\n\t\treturn this.stat_pop;\n\t};\n\n\t/** return mean value */\n\tthis.mean = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_mean == null) {\n\n\t\t\tthis.stat_mean = parseFloat(this.sum() / this.pop());\n\n\t\t}\n\n\t\treturn this.stat_mean;\n\t};\n\n\t/** return median value */\n\tthis.median = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_median == null) {\n\n\t\t\tthis.stat_median = 0;\n\t\t\tvar tmp = this.sorted();\n\n\t\t\t// serie pop is odd\n\t\t\tif (tmp.length % 2) {\n\t\t\t\tthis.stat_median = parseFloat(tmp[(Math.ceil(tmp.length / 2) - 1)]);\n\n\t\t\t// serie pop is even\n\t\t\t} else {\n\t\t\t\tthis.stat_median = ( parseFloat(tmp[((tmp.length / 2) - 1)]) + parseFloat(tmp[(tmp.length / 2)]) ) / 2;\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_median;\n\t};\n\n\t/** return variance value */\n\tthis.variance = function() {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_variance == null) {\n\n\t\t\tvar tmp = 0, serie_mean = this.mean();\n\t\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\t\ttmp += Math.pow( (this.serie[i] - serie_mean), 2 );\n\t\t\t}\n\n\t\t\tthis.stat_variance = tmp / this.pop();\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_variance = Math.round(this.stat_variance * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_variance;\n\t};\n\n\t/** return standard deviation value */\n\tthis.stddev = function(round) {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_stddev == null) {\n\n\t\t\tthis.stat_stddev = Math.sqrt(this.variance());\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_stddev = Math.round(this.stat_stddev * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_stddev;\n\t};\n\n\t/** coefficient of variation - measure of dispersion */\n\tthis.cov = function(round) {\n\n\t\tvar round = (typeof round === \"undefined\") ? true : false;\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tif (this.stat_cov == null) {\n\n\t\t\tthis.stat_cov = this.stddev() / this.mean();\n\n\t\t\tif(round == true) {\n\t\t\t\tthis.stat_cov = Math.round(this.stat_cov * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.stat_cov;\n\t};\n\n\t/** reset all attributes after setting a new serie */\n\tthis.resetStatistics = function() {\n\t this.stat_sorted = null;\n\t this.stat_mean = null;\n\t this.stat_median = null;\n\t this.stat_sum = null;\n\t this.stat_max = null;\n\t this.stat_min = null;\n\t this.stat_pop = null;\n\t this.stat_variance = null;\n\t this.stat_stddev = null;\n\t this.stat_cov = null;\n\t}\n\n\t/** data test */\n\tthis._nodata = function() {\n\t\tif (this.serie.length == 0) {\n\n\t\t\tif(this.silent) this.log(\"[silent mode] Error. You should first enter a serie!\", true);\n\t\t\telse throw new TypeError(\"Error. You should first enter a serie!\");\n\t\t\treturn 1;\n\t\t} else\n\t\t\treturn 0;\n\n\t};\n\n\t/** data test */\n\tthis._classificationCheck = function(nbClass) {\n\n\t\tif(nbClass >= this.pop()) {\n\t\t\tvar errnum ='Error. ' + nbClass + ' classes are defined for only ' + this.pop() + ' values in serie ! For the current serie, no more than ' + (this.pop() - 1 ) + ' classes can be defined.';\n\n\t\t\tif(this.silent) this.log(errnum, true);\n\t\t\telse {\n\t\t\t\talert(errnum);\n\t\t\t\tthrow new TypeError(errnum);\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/** ensure nbClass is an integer */\n\tthis._nbClassInt = function(nbClass) {\n\n\t\tvar nbclassTmp = parseInt(nbClass, 10);\n\t\tif (isNaN(nbclassTmp)) {\n\t\t\tif(this.silent) this.log(\"[silent mode] '\" + nbclassTmp + \"' is not a valid integer. Enable to set class number.\", true);\n\t\t\telse throw new TypeError(\"'\" + nbclassTmp + \"' is not a valid integer. Enable to set class number.\");\n\t\t} else {\n\t\t\treturn nbclassTmp;\n\t\t}\n\n\t};\n\n\t/** check if the serie contains negative value */\n\tthis._hasNegativeValue = function() {\n\n\t\tfor (var i = 0; i < this.serie.length; i++) {\n\t \tif(this.serie[i] < 0)\n\t \t\treturn true;\n\t }\n\n\t\treturn false;\n\t};\n\n\t/** check if the serie contains zero value */\n\tthis._hasZeroValue = function() {\n\n\t\tfor (var i = 0; i < this.serie.length; i++) {\n\t \tif(parseFloat(this.serie[i]) === 0)\n\t \t\treturn true;\n\t }\n\n\t\treturn false;\n\t};\n\n\t/** return sorted values (as array) */\n\tthis.sorted = function() {\n\n\t\tif (this.stat_sorted == null) {\n\n\t\t\tif(this.is_uniqueValues == false) {\n\t\t\t\tthis.stat_sorted = this.serie.sort(function(a, b) {\n\t\t\t\t\treturn a - b;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.stat_sorted = this.serie.sort(function(a,b){\n\t\t\t\t\tvar nameA=a.toString().toLowerCase(), nameB=b.toString().toLowerCase();\n\t\t\t\t if(nameA < nameB) return -1;\n\t\t\t\t if(nameA > nameB) return 1;\n\t\t\t\t return 0;\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn this.stat_sorted;\n\n\t};\n\n\t/** return all info */\n\tthis.info = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tvar content = '';\n\t\tcontent += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min')\n\t\t\t\t+ ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()\n\t\t\t\t+ ']' + \"\\n\";\n\t\tcontent += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median')\t+ ' : ' + this.median() + \"\\n\";\n\t\tcontent += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation')\t+ ' : ' + this.stddev()\n\t\t\t\t+ ' - ' + _t('Coefficient of variation')\t+ ' : ' + this.cov() + \"\\n\";\n\n\t\treturn content;\n\t};\n\n\t/**\n\t * Set Manual classification Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t * Set ranges and prepare data for displaying legend\n\t *\n\t */\n\tthis.setClassManually = function(array) {\n\n\t\tif (this._nodata())\n\t return;\n\n\t if(array[0] !== this.min() || array[array.length-1] !== this.max()) {\n\t \tif(this.silent) this.log(\"[silent mode] \" + t('Given bounds may not be correct! please check your input.\\nMin value : ' + this.min() + ' / Max value : ' + this.max()), true);\n\t\t\telse throw new TypeError(_t('Given bounds may not be correct! please check your input.\\nMin value : ' + this.min() + ' / Max value : ' + this.max()));\n\t \treturn;\n\t }\n\n\t this.setBounds(array);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('manual classification') + ' (' + (array.length -1) + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Equal intervals classification Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassEqInterval = function(nbClass, forceMin, forceMax) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t\tvar tmpMin = (typeof forceMin === \"undefined\") ? this.min() : forceMin;\n\t\tvar tmpMax = (typeof forceMax === \"undefined\") ? this.max() : forceMax;\n\n\t var a = Array();\n\t var val = tmpMin;\n\t var interval = (tmpMax - tmpMin) / nbClass;\n\n\t for (var i = 0; i <= nbClass; i++) {\n\t a[i] = val;\n\t val += interval;\n\t }\n\n\t //-> Fix last bound to Max of values\n\t a[nbClass] = tmpMax;\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\n\tthis.getQuantiles = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tvar tmp = this.sorted();\n\t\tvar quantiles = [];\n\n\t\tvar step = this.pop() / nbClass;\n\t\tfor (var i = 1; i < nbClass; i++) {\n\t\t\tvar qidx = Math.round(i*step+0.49);\n\t\t\tquantiles.push(tmp[qidx-1]); // zero-based\n\t\t}\n\n\t\treturn quantiles;\n\t};\n\n\t/**\n\t * Quantile classification Return an array with bounds : ie array(0, 0.75,\n\t * 1.5, 2.25, 3);\n\t */\n\tthis.getClassQuantile = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar tmp = this.sorted();\n\t\tvar bounds = this.getQuantiles(nbClass);\n\t\tbounds.unshift(tmp[0]);\n\n\t\tif (bounds[tmp.length - 1] !== tmp[tmp.length - 1])\n\t\t\tbounds.push(tmp[tmp.length - 1]);\n\n\t\tthis.setBounds(bounds);\n\t\tthis.setRanges();\n\n\t\t// we specify the classification method\n\t\tthis.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds;\n\n\t};\n\n\t/**\n\t * Standard Deviation classification\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassStdDeviation = function(nbClass, matchBounds) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t var tmpMax = this.max();\n\t\tvar tmpMin = this.min();\n\t\tvar tmpStdDev = this.stddev();\n\t\tvar tmpMean = this.mean();\n\n\t var a = Array();\n\n\t // number of classes is odd\n\t if(nbClass % 2 == 1) {\n\n\t \t// Euclidean division to get the inferior bound\n\t \tvar infBound = Math.floor(nbClass / 2);\n\n\t \tvar supBound = infBound + 1;\n\n\t \t// we set the central bounds\n\t \ta[infBound] = tmpMean - (tmpStdDev / 2);\n\t \ta[supBound] = tmpMean + (tmpStdDev / 2);\n\n\t \t// Values < to infBound, except first one\n\t \tfor (var i = infBound - 1; i > 0; i--) {\n\t \t\tvar val = a[i+1] - tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// Values > to supBound, except last one\n\t \tfor (var i = supBound + 1; i < nbClass; i++) {\n\t \t\tvar val = a[i-1] + tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// number of classes is even\n\t } else {\n\n\t \tvar meanBound = nbClass / 2;\n\n\t \t// we get the mean value\n\t \ta[meanBound] = tmpMean;\n\n\t \t// Values < to the mean, except first one\n\t \tfor (var i = meanBound - 1; i > 0; i--) {\n\t \t\tvar val = a[i+1] - tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\n\t \t// Values > to the mean, except last one\n\t \tfor (var i = meanBound + 1; i < nbClass; i++) {\n\t \t\tvar val = a[i-1] + tmpStdDev;\n\t\t a[i] = val;\n\t\t }\n\t }\n\n\n\t // we finally set the first value\n\t // do we excatly match min value or not ?\n\t a[0] = (typeof matchBounds === \"undefined\") ? a[1]- tmpStdDev : tmpMin;\n\n \t// we finally set the last value\n\t // do we excatly match max value or not ?\n \ta[nbClass] = (typeof matchBounds === \"undefined\") ? a[nbClass-1] + tmpStdDev : tmpMax;\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes')+ ')';\n\n\t return this.bounds;\n\t};\n\n\n\t/**\n\t * Geometric Progression classification\n\t * http://en.wikipedia.org/wiki/Geometric_progression\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassGeometricProgression = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t if(this._hasNegativeValue() || this._hasZeroValue()) {\n\t \tif(this.silent) this.log(\"[silent mode] \" + _t('geometric progression can\\'t be applied with a serie containing negative or zero values.'), true);\n\t\t\telse throw new TypeError(_t('geometric progression can\\'t be applied with a serie containing negative or zero values.'));\n\t \treturn;\n\t }\n\n\t var a = Array();\n\t var tmpMin = this.min();\n\t var tmpMax = this.max();\n\n\t var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)\n\t var logMin = Math.log(tmpMin) / Math.LN10;; // min decimal logarithm (or base 10)\n\n\t var interval = (logMax - logMin) / nbClass;\n\n\t // we compute log bounds\n\t for (var i = 0; i < nbClass; i++) {\n\t \tif(i == 0) {\n\t \t\ta[i] = logMin;\n\t \t} else {\n\t \t\ta[i] = a[i-1] + interval;\n\t \t}\n\t }\n\n\t // we compute antilog\n\t a = a.map(function(x) { return Math.pow(10, x); });\n\n\t // and we finally add max value\n\t a.push(this.max());\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Arithmetic Progression classification\n\t * http://en.wikipedia.org/wiki/Arithmetic_progression\n\t * Return an array with bounds : ie array(0,\n\t * 0.75, 1.5, 2.25, 3);\n\t */\n\tthis.getClassArithmeticProgression = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t return;\n\n\t var denominator = 0;\n\n\t // we compute the (french) \"Raison\"\n\t for (var i = 1; i <= nbClass; i++) {\n\t denominator += i;\n\t }\n\n\t var a = Array();\n\t var tmpMin = this.min();\n\t var tmpMax = this.max();\n\n\t var interval = (tmpMax - tmpMin) / denominator;\n\n\t for (var i = 0; i <= nbClass; i++) {\n\t \tif(i == 0) {\n\t \t\ta[i] = tmpMin;\n\t\t\t} else if(i == nbClass) {\n\t\t\t\ta[i] = tmpMax;\n\t\t\t} else {\n\t \t\ta[i] = a[i-1] + (i * interval);\n\t \t}\n\t }\n\n\t this.setBounds(a);\n\t this.setRanges();\n\n\t // we specify the classification method\n\t this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t return this.bounds;\n\t};\n\n\t/**\n\t * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)\n\t * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b\n\t * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/\n\t */\n\tthis.getClassJenks2 = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar dataList = this.sorted();\n\n\t\t// now iterate through the datalist:\n\t\t// determine mat1 and mat2\n\t\t// really not sure how these 2 different arrays are set - the code for\n\t\t// each seems the same!\n\t\t// but the effect are 2 different arrays: mat1 and mat2\n\t\tvar mat1 = []\n\t\tfor ( var x = 0, xl = dataList.length + 1; x < xl; x++) {\n\t\t\tvar temp = []\n\t\t\tfor ( var j = 0, jl = nbClass + 1; j < jl; j++) {\n\t\t\t\ttemp.push(0)\n\t\t\t}\n\t\t\tmat1.push(temp)\n\t\t}\n\n\t\tvar mat2 = []\n\t\tfor ( var i = 0, il = dataList.length + 1; i < il; i++) {\n\t\t\tvar temp2 = []\n\t\t\tfor ( var c = 0, cl = nbClass + 1; c < cl; c++) {\n\t\t\t\ttemp2.push(0)\n\t\t\t}\n\t\t\tmat2.push(temp2)\n\t\t}\n\n\t\t// absolutely no idea what this does - best I can tell, it sets the 1st\n\t\t// group in the\n\t\t// mat1 and mat2 arrays to 1 and 0 respectively\n\t\tfor ( var y = 1, yl = nbClass + 1; y < yl; y++) {\n\t\t\tmat1[0][y] = 1\n\t\t\tmat2[0][y] = 0\n\t\t\tfor ( var t = 1, tl = dataList.length + 1; t < tl; t++) {\n\t\t\t\tmat2[t][y] = Infinity\n\t\t\t}\n\t\t\tvar v = 0.0\n\t\t}\n\n\t\t// and this part - I'm a little clueless on - but it works\n\t\t// pretty sure it iterates across the entire dataset and compares each\n\t\t// value to\n\t\t// one another to and adjust the indices until you meet the rules:\n\t\t// minimum deviation\n\t\t// within a class and maximum separation between classes\n\t\tfor ( var l = 2, ll = dataList.length + 1; l < ll; l++) {\n\t\t\tvar s1 = 0.0\n\t\t\tvar s2 = 0.0\n\t\t\tvar w = 0.0\n\t\t\tfor ( var m = 1, ml = l + 1; m < ml; m++) {\n\t\t\t\tvar i3 = l - m + 1\n\t\t\t\tvar val = parseFloat(dataList[i3 - 1])\n\t\t\t\ts2 += val * val\n\t\t\t\ts1 += val\n\t\t\t\tw += 1\n\t\t\t\tv = s2 - (s1 * s1) / w\n\t\t\t\tvar i4 = i3 - 1\n\t\t\t\tif (i4 != 0) {\n\t\t\t\t\tfor ( var p = 2, pl = nbClass + 1; p < pl; p++) {\n\t\t\t\t\t\tif (mat2[l][p] >= (v + mat2[i4][p - 1])) {\n\t\t\t\t\t\t\tmat1[l][p] = i3\n\t\t\t\t\t\t\tmat2[l][p] = v + mat2[i4][p - 1]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tmat1[l][1] = 1\n\t\t\tmat2[l][1] = v\n\t\t}\n\n\t\tvar k = dataList.length\n\t\tvar kclass = []\n\n\t\t// fill the kclass (classification) array with zeros:\n\t\tfor (var i = 0; i <= nbClass; i++) {\n\t\t\tkclass.push(0);\n\t\t}\n\n\t\t// this is the last number in the array:\n\t\tkclass[nbClass] = parseFloat(dataList[dataList.length - 1])\n\t\t// this is the first number - can set to zero, but want to set to lowest\n\t\t// to use for legend:\n\t\tkclass[0] = parseFloat(dataList[0])\n\t\tvar countNum = nbClass\n\t\twhile (countNum >= 2) {\n\t\t\tvar id = parseInt((mat1[k][countNum]) - 2)\n\t\t\tkclass[countNum - 1] = dataList[id]\n\t\t\tk = parseInt((mat1[k][countNum] - 1))\n\t\t\t// spits out the rank and value of the break values:\n\t\t\t// console.log(\"id=\"+id,\"rank = \" + String(mat1[k][countNum]),\"val =\n\t\t\t// \" + String(dataList[id]))\n\t\t\t// count down:\n\t\t\tcountNum -= 1\n\t\t}\n\t\t// check to see if the 0 and 1 in the array are the same - if so, set 0\n\t\t// to 0:\n\t\tif (kclass[0] == kclass[1]) {\n\t\t\tkclass[0] = 0\n\t\t}\n\n\t\tthis.setBounds(kclass);\n\t\tthis.setRanges();\n\n\n\t\tthis.method = _t('Jenks2') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds; //array of breaks\n\t}\n\n\t/**\n\t * Credits from simple-statistics library\n\t * https://github.com/simple-statistics/simple-statistics\n\t * https://gist.githubusercontent.com/tmcw/4969184/raw/cfd9572d00db6bcdc34f07b088738fc3a47846b4/simple_statistics.js\n\t */\n\tthis.getClassJenks = function(nbClass) {\n\n\t\tvar nbClass = this._nbClassInt(nbClass); // ensure nbClass is an integer\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis._classificationCheck(nbClass); // be sure number of classes is valid\n\n\t\tvar dataList = this.sorted();\n\n\t\t// Compute the matrices required for Jenks breaks. These matrices\n\t\t// can be used for any classing of data with `classes <= n_classes`\n\t\tvar jenksMatrices = function(data, n_classes) {\n\n\t\t\t// in the original implementation, these matrices are referred to\n\t\t\t// as `LC` and `OP`\n\t\t\t//\n\t\t\t// * lower_class_limits (LC): optimal lower class limits\n\t\t\t// * variance_combinations (OP): optimal variance combinations for all classes\n\t\t\tvar lower_class_limits = [],\n\t\t\t\tvariance_combinations = [],\n\t\t\t\t// loop counters\n\t\t\t\ti, j,\n\t\t\t\t// the variance, as computed at each step in the calculation\n\t\t\t\tvariance = 0;\n\n\t\t\t// Initialize and fill each matrix with zeroes\n\t\t\tfor (var i = 0; i < data.length + 1; i++) {\n\t\t\t\tvar tmp1 = [], tmp2 = [];\n\t\t\t\tfor (var j = 0; j < n_classes + 1; j++) {\n\t\t\t\t\ttmp1.push(0);\n\t\t\t\t\ttmp2.push(0);\n\t\t\t\t}\n\t\t\t\tlower_class_limits.push(tmp1);\n\t\t\t\tvariance_combinations.push(tmp2);\n\t\t\t}\n\n\t\t\tfor (var i = 1; i < n_classes + 1; i++) {\n\t\t\t\tlower_class_limits[1][i] = 1;\n\t\t\t\tvariance_combinations[1][i] = 0;\n\t\t\t\t// in the original implementation, 9999999 is used but\n\t\t\t\t// since Javascript has `Infinity`, we use that.\n\t\t\t\tfor (var j = 2; j < data.length + 1; j++) {\n\t\t\t\t\tvariance_combinations[j][i] = Infinity;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var l = 2; l < data.length + 1; l++) {\n\n\t\t\t\t// `SZ` originally. this is the sum of the values seen thus\n\t\t\t\t// far when calculating variance.\n\t\t\t\tvar sum = 0,\n\t\t\t\t\t// `ZSQ` originally. the sum of squares of values seen\n\t\t\t\t\t// thus far\n\t\t\t\t\tsum_squares = 0,\n\t\t\t\t\t// `WT` originally. This is the number of\n\t\t\t\t\tw = 0,\n\t\t\t\t\t// `IV` originally\n\t\t\t\t\ti4 = 0;\n\n\t\t\t\t// in several instances, you could say `Math.pow(x, 2)`\n\t\t\t\t// instead of `x * x`, but this is slower in some browsers\n\t\t\t\t// introduces an unnecessary concept.\n\t\t\t\tfor (var m = 1; m < l + 1; m++) {\n\n\t\t\t\t\t// `III` originally\n\t\t\t\t\tvar lower_class_limit = l - m + 1,\n\t\t\t\t\t\tval = data[lower_class_limit - 1];\n\n\t\t\t\t\t// here we're estimating variance for each potential classing\n\t\t\t\t\t// of the data, for each potential number of classes. `w`\n\t\t\t\t\t// is the number of data points considered so far.\n\t\t\t\t\tw++;\n\n\t\t\t\t\t// increase the current sum and sum-of-squares\n\t\t\t\t\tsum += val;\n\t\t\t\t\tsum_squares += val * val;\n\n\t\t\t\t\t// the variance at this point in the sequence is the difference\n\t\t\t\t\t// between the sum of squares and the total x 2, over the number\n\t\t\t\t\t// of samples.\n\t\t\t\t\tvariance = sum_squares - (sum * sum) / w;\n\n\t\t\t\t\ti4 = lower_class_limit - 1;\n\n\t\t\t\t\tif (i4 !== 0) {\n\t\t\t\t\t\tfor (var j = 2; j < n_classes + 1; j++) {\n\t\t\t\t\t\t\tif (variance_combinations[l][j] >=\n\t\t\t\t\t\t\t\t(variance + variance_combinations[i4][j - 1])) {\n\t\t\t\t\t\t\t\tlower_class_limits[l][j] = lower_class_limit;\n\t\t\t\t\t\t\t\tvariance_combinations[l][j] = variance +\n\t\t\t\t\t\t\t\t\tvariance_combinations[i4][j - 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlower_class_limits[l][1] = 1;\n\t\t\t\tvariance_combinations[l][1] = variance;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tlower_class_limits: lower_class_limits,\n\t\t\t\tvariance_combinations: variance_combinations\n\t\t\t};\n\t\t};\n\n // get our basic matrices\n var matrices = jenksMatrices(dataList, nbClass),\n // we only need lower class limits here\n lower_class_limits = matrices.lower_class_limits,\n k = dataList.length - 1,\n kclass = [],\n countNum = nbClass;\n\n // the calculation of classes will never include the upper and\n // lower bounds, so we need to explicitly set them\n kclass[nbClass] = dataList[dataList.length - 1];\n kclass[0] = dataList[0];\n\n // the lower_class_limits matrix is used as indexes into itself\n // here: the `k` variable is reused in each iteration.\n while (countNum > 1) {\n kclass[countNum - 1] = dataList[lower_class_limits[k][countNum] - 2];\n k = lower_class_limits[k][countNum] - 1;\n countNum--;\n }\n\n\t\tthis.setBounds(kclass);\n\t\tthis.setRanges();\n\n\n\t\tthis.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';\n\n\t\treturn this.bounds; //array of breaks\n\t}\n\n\n\t/**\n\t * Unique classification Return as many entries as unique values : ie array('blue', 'red', yellow')\n\t * 1.5, 2.25, 3);\n\t */\n\tthis.getClassUniqueValues = function() {\n\n\t\tif (this._nodata())\n\t\t\treturn;\n\n\t\tthis.is_uniqueValues = true;\n\n\t\tvar tmp = this.sorted(); // display in alphabetical order\n\n\t\tvar a = Array();\n\n\t\tfor (var i = 0; i < this.pop(); i++) {\n\t\t\tif(a.indexOf(tmp[i]) === -1)\n\t\t\t\ta.push(tmp[i]);\n\t\t}\n\n\t\tthis.bounds = a;\n\n\t\t// we specify the classification method\n\t\tthis.method = _t('unique values');\n\n\t\treturn a;\n\n\t};\n\n\n\t/**\n\t * Return the class of a given value.\n\t * For example value : 6\n\t * and bounds array = (0, 4, 8, 12);\n\t * Return 2\n\t */\n\tthis.getClass = function(value) {\n\n\t\tfor (var i = 0; i < this.bounds.length; i++) {\n\n\t\t\tif(this.is_uniqueValues == true) {\n\n\t\t\t\tif(value == this.bounds[i]) {\n\t\t\t\t\t// console.log(value + ' - ' + this.bounds[i] + ' returned value : ' + i);\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// parseFloat() is necessary\n\t\t\t\tif(parseFloat(value) <= this.bounds[i + 1]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn _t(\"Unable to get value's class.\");\n\n\t};\n\n\t/**\n\t * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',\n\t * '2.25-3');\n\t */\n\tthis.getRanges = function() {\n\n\t\treturn this.ranges;\n\n\t};\n\n\t/**\n\t * Returns the number/index of this.ranges that value falls into\n\t */\n\tthis.getRangeNum = function(value) {\n\n\t\tvar bounds, i;\n\n\t\tfor (var i = 0; i < this.ranges.length; i++) {\n\t\t\tbounds = this.ranges[i].split(/ - /);\n\t\t\tif (value <= parseFloat(bounds[1])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Compute inner ranges based on serie.\n\t * Produce discontinous ranges used for legend - return an array similar to :\n\t * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');\n\t * If inner ranges already computed, return array values.\n\t */\n\tthis.getInnerRanges = function() {\n\n\t\t// if already computed, we return the result\n\t\tif(this.inner_ranges != null)\n\t\t\treturn this.inner_ranges;\n\n\n\t\tvar a = new Array();\n\t\tvar tmp = this.sorted();\n\n\t\tvar cnt = 1; // bounds array counter\n\n\t\tfor (var i = 0; i < tmp.length; i++) {\n\n\t\t\tif(i == 0) var range_firstvalue = tmp[i]; // we init first range value\n\n\t\t\tif(parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {\n\n\t\t\t\ta[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i-1];\n\n\t\t\t\tvar range_firstvalue = tmp[i];\n\n\t\t\t\tcnt++;\n\n\t\t\t}\n\n\t\t\t// we reach the last range, we finally complete manually\n\t\t\t// and return the array\n\t\t\tif(cnt == (this.bounds.length - 1)) {\n\t\t\t\t// we set the last value\n\t\t\t\ta[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length-1];\n\n\t\t\t\tthis.inner_ranges = a;\n\t\t\t\treturn this.inner_ranges;\n\t\t\t}\n\n\n\t\t}\n\n\t};\n\n\tthis.getSortedlist = function() {\n\n\t\treturn this.sorted().join(', ');\n\n\t};\n\n\t/**\n\t * Return an html legend\n\t * colors : specify an array of color (hexadecimal values)\n\t * legend : specify a text input for the legend. By default, just displays 'legend'\n\t * counter : if not null, display counter value\n\t * callback : if not null, callback function applied on legend boundaries\n\t * mode : \tnull, 'default', 'distinct', 'discontinuous' :\n\t * \t\t\t- if mode is null, will display legend as 'default mode'\n\t * \t\t\t- 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84\n\t * \t\t\t- 'distinct' : Add + 1 according to decimal precision to distinguish classes (discrete values), sample : 29.26 - 378.80 / 378.81 - 2762.25 / 2762.26 - 6884.84\n\t * \t\t\t- 'discontinuous' : indicates the range of data actually falling in each class , sample : 29.26 - 225.43 / 852.12 - 2762.20 / 3001.25 - 6884.84 / not implemented yet\n\t * order : \tnull, 'ASC', 'DESC'\n\t */\n\tthis.getHtmlLegend = function(colors, legend, counter, callback, mode, order) {\n\n\t\tvar cnt= '';\n\t\tvar elements = new Array();\n\n\t\tthis.doCount(); // we do count, even if not displayed\n\n\t\tif(colors != null) {\n\t\t\tccolors = colors;\n\t\t}\n\t\telse {\n\t\t\tccolors = this.colors;\n\t\t}\n\n\t\tif(legend != null) {\n\t\t\tlg = legend;\n\t\t}\n\t\telse {\n\t\t\tlg = 'Legend';\n\t\t}\n\n\t\tif(counter != null) {\n\t\t\tgetcounter = true;\n\t\t}\n\t\telse {\n\t\t\tgetcounter = false;\n\t\t}\n\n\t\tif(callback != null) {\n\t\t\tfn = callback;\n\t\t}\n\t\telse {\n\t\t\tfn = function(o) {return o;};\n\t\t}\n\t\tif(mode == null) {\n\t\t\tmode = 'default';\n\t\t}\n\t\tif(mode == 'discontinuous') {\n\t\t\tthis.getInnerRanges();\n\t\t\t// check if some classes are not populated / equivalent of in_array function\n\t\t\tif(this.counter.indexOf(0) !== -1) {\n\t\t \tif(this.silent) this.log(\"[silent mode] \" + _t(\"Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\\nPlease switch to 'default' or 'distinct' modes. Exit!\"), true);\n\t\t\t\telse throw new TypeError(_t(\"Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\\nPlease switch to 'default' or 'distinct' modes. Exit!\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\tif(order !== 'DESC') order = 'ASC';\n\n\t\tif(ccolors.length < this.ranges.length) {\n\t\t\tif(this.silent) this.log(\"[silent mode] \" + _t('The number of colors should fit the number of ranges. Exit!'), true);\n\t\t\telse throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(this.is_uniqueValues == false) {\n\n\t\t\tfor (var i = 0; i < (this.ranges.length); i++) {\n\t\t\t\tif(getcounter===true) {\n\t\t\t\t\tcnt = ' <span class=\"geostats-legend-counter\">(' + this.counter[i] + ')</span>';\n\t\t\t\t}\n\t\t\t\t//console.log(\"Ranges : \" + this.ranges[i]);\n\n\t\t\t\t// default mode\n\t\t\t\tvar tmp = this.ranges[i].split(this.separator);\n\n\t\t\t\tvar start_value = parseFloat(tmp[0]).toFixed(this.precision);\n\t\t\t\tvar end_value = parseFloat(tmp[1]).toFixed(this.precision);\n\n\n\t\t\t\t// if mode == 'distinct' and we are not working on the first value\n\t\t\t\tif(mode == 'distinct' && i != 0) {\n\n\t\t\t\t\tif(isInt(start_value)) {\n\t\t\t\t\t\tstart_value = parseInt(start_value) + 1;\n\t\t\t\t\t\t// format to float if necessary\n\t\t\t\t\t\tif(this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstart_value = parseFloat(start_value) + (1 / Math.pow(10,this.precision));\n\t\t\t\t\t\t// strangely the formula above return sometimes long decimal values,\n\t\t\t\t\t\t// the following instruction fix it\n\t\t\t\t\t\tstart_value = parseFloat(start_value).toFixed(this.precision);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if mode == 'discontinuous'\n\t\t\t\tif(mode == 'discontinuous') {\n\n\t\t\t\t\tvar tmp = this.inner_ranges[i].split(this.separator);\n\t\t\t\t\t// console.log(\"Ranges : \" + this.inner_ranges[i]);\n\n\t\t\t\t\tvar start_value = parseFloat(tmp[0]).toFixed(this.precision);\n\t\t\t\t\tvar end_value = parseFloat(tmp[1]).toFixed(this.precision);\n\n\t\t\t\t}\n\n\t\t\t\t// we apply callback function\n\t\t\t\tvar el = fn(start_value) + this.legendSeparator + fn(end_value);\n\n\t\t\t\tvar block = '<div><div class=\"geostats-legend-block\" style=\"background-color:' + ccolors[i] + '\"></div> ' + el + cnt + '</div>';\n\t\t\t\telements.push(block);\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// only if classification is done on unique values\n\t\t\tfor (var i = 0; i < (this.bounds.length); i++) {\n\t\t\t\tif(getcounter===true) {\n\t\t\t\t\tcnt = ' <span class=\"geostats-legend-counter\">(' + this.counter[i] + ')</span>';\n\t\t\t\t}\n\t\t\t\tvar el = fn(this.bounds[i]);\n\t\t\t\tvar block = '<div><div class=\"geostats-legend-block\" style=\"background-color:' + ccolors[i] + '\"></div> ' + el + cnt + '</div>';\n\n\t\t\t\telements.push(block);\n\t\t\t}\n\n\t\t}\n\n\t\t// do we reverse the return legend ?\n\t\tif(order === 'DESC') elements.reverse();\n\n\t\t// finally we create HTML and return it\n\t\tvar content = '<div class=\"geostats-legend\"><div class=\"geostats-legend-title\">' + _t(lg) + '</div>';\n\t\tfor (var i = 0; i < (elements.length); i++) {\n\t\t\tcontent += elements[i];\n\t\t}\n\t\tcontent += '</div>';\n\n\t\treturn content;\n\t};\n\n\n\n\t// object constructor\n\t// At the end of script. If not setPrecision() method is not known\n\n\t// we create an object identifier for debugging\n\tthis.objectID = new Date().getUTCMilliseconds();\n\tthis.log('Creating new geostats object');\n\n\tif(typeof a !== 'undefined' && a.length > 0) {\n\t\tthis.serie = a;\n\t\tthis.setPrecision();\n\t\tthis.log('Setting serie (' + a.length + ') : ' + a.join());\n\t} else {\n\t\tthis.serie = Array();\n\n\t};\n\n\t// creating aliases on classification function for backward compatibility\n\tthis.getJenks = this.getClassJenks;\n\tthis.getJenks2 = this.getClassJenks2;\n\tthis.getGeometricProgression = this.getClassGeometricProgression;\n\tthis.getEqInterval = this.getClassEqInterval;\n\tthis.getQuantile = this.getClassQuantile;\n\tthis.getStdDeviation = this.getClassStdDeviation;\n\tthis.getUniqueValues = this.getClassUniqueValues;\n\tthis.getArithmeticProgression = this.getClassArithmeticProgression;\n\n};\n\n\nreturn geostats;\n});\n","import geostats from './geostats'\n\nL.SolrHeatmap = L.GeoJSON.extend({\n options: {\n solrRequestHandler: 'select',\n type: 'geojsonGrid',\n colors: ['#f1eef6', '#d7b5d8', '#df65b0', '#dd1c77', '#980043'],\n maxSampleSize: Number.MAX_SAFE_INTEGER, // for Jenks classification\n logging: false,\n },\n\n initialize: function (url, options) {\n var _this = this;\n options = L.setOptions(_this, options);\n _this._solrUrl = url;\n _this._layers = {};\n _this._getData();\n },\n\n onAdd: function (map) {\n var _this = this;\n\n // Call the parent function\n L.GeoJSON.prototype.onAdd.call(_this, map);\n\n map.on('moveend', function () {\n _this._getData();\n });\n },\n\n _computeHeatmapObject: function (data) {\n var _this = this;\n _this.facetHeatmap = data.response.facet_heatmaps[this.options.field];\n this._computeIntArrays();\n },\n\n _clearLayers: function () {\n var _this = this;\n\n switch (_this.options.type) {\n case 'geojsonGrid':\n _this.clearLayers();\n break;\n case 'clusters':\n _this.clusterMarkers.clearLayers();\n break;\n case 'heatmap':\n _this._map.removeLayer(_this.heatmapLayer);\n break;\n }\n },\n\n _createGeojson: function () {\n var _this = this;\n var geojson = {};\n\n geojson.type = 'FeatureCollection';\n geojson.features = [];\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var newFeature = {\n type: 'Feature',\n geometry: {\n type: 'Polygon',\n coordinates: [\n [\n [_this._minLng(column), _this._minLat(row)],\n [_this._minLng(column), _this._maxLat(row)],\n [_this._maxLng(column), _this._maxLat(row)],\n [_this._maxLng(column), _this._minLat(row)],\n [_this._minLng(column), _this._minLat(row)]\n ]\n ]\n },\n properties: {\n count: val\n }\n };\n geojson.features.push(newFeature);\n });\n });\n\n _this.addData(geojson);\n var colors = _this.options.colors;\n if (_this.facetHeatmap.counts_ints2D && _this.facetHeatmap.counts_ints2D.length > 0) {\n var classifications = _this._getClassifications(colors.length);\n _this._styleByCount(classifications);\n _this._showRenderTime();\n }\n },\n\n _createHeatmap: function () {\n var _this = this;\n var heatmapCells = [];\n var cellSize = _this._getCellSize() * .75;\n var colors = _this.options.colors;\n var classifications = _this._getClassifications(colors.length - 1);\n var maxValue = classifications[classifications.length - 1];\n var gradient = _this._getGradient(classifications);\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var scaledValue = Math.min((val / maxValue), 1);\n var current = [_this._minLat(row), _this._minLng(column), scaledValue];\n heatmapCells.push(current);\n\n // need to create options object to set gradient, blu, radius, max\n });\n });\n\n // settting max due to bug\n // http://stackoverflow.com/questions/26767722/leaflet-heat-issue-with-adding-points-with-intensity\n var options = { max: .0001, radius: cellSize, gradient: gradient };\n var heatmapLayer = L.heatLayer(heatmapCells, options);\n heatmapLayer.addTo(_this._map);\n _this.heatmapLayer = heatmapLayer;\n _this._showRenderTime();\n },\n\n // heatmap display need hash of scaled counts value, color pairs\n _getGradient: function (classifications) {\n var gradient = {};\n var maxValue = classifications[classifications.length - 1];\n var colors = _this.options.colors;\n // skip first lower bound, assumed to be 0 from Jenks\n for (var i = 1; i < classifications.length; i++)\n gradient[classifications[i] / maxValue] = colors[i];\n return gradient;\n },\n\n // compute size of heatmap cells in pixels\n _getCellSize: function () {\n _this = this;\n var mapSize = _this._map.getSize(); // should't we use solr returned map extent?\n var widthInPixels = mapSize.x;\n var heightInPixels = mapSize.y;\n var heatmapRows = _this.facetHeatmap.rows;\n var heatmapColumns = _this.facetHeatmap.columns;\n var sizeX = widthInPixels / heatmapColumns;\n var sizeY = heightInPixels / heatmapRows;\n var size = Math.ceil(Math.max(sizeX, sizeY));\n return size;\n },\n\n _showRenderTime: function () {\n if (this.options.logging) {\n var _this = this;\n var renderTime = 'Render time: ' + (Date.now() - _this.renderStart) + ' ms';\n console.log(renderTime);\n }\n },\n\n _createClusters: function() {\n var _this = this;\n\n _this.clusterMarkers = new L.MarkerClusterGroup({\n maxClusterRadius: 140,\n });\n\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value === null) {\n return;\n }\n\n value.forEach(function (val, column) {\n if (val === 0) {\n return;\n }\n\n var bounds = new L.latLngBounds([\n [_this._minLat(row), _this._minLng(column)],\n [_this._maxLat(row), _this._maxLng(column)],\n ]);\n _this.clusterMarkers.addLayer(new L.Marker(bounds.getCenter(), {\n count: val,\n }).bindPopup(val.toString()));\n });\n });\n\n _this._map.addLayer(_this.clusterMarkers);\n _this._showRenderTime();\n },\n\n _computeIntArrays: function () {\n var _this = this;\n\n _this.lengthX = (_this.facetHeatmap.maxX - _this.facetHeatmap.minX) / _this.facetHeatmap.columns;\n _this.lengthY = (_this.facetHeatmap.maxY - _this.facetHeatmap.minY) / _this.facetHeatmap.rows;\n _this._clearLayers();\n switch (_this.options.type) {\n case 'geojsonGrid':\n _this._createGeojson();\n break;\n case 'clusters':\n _this._createClusters();\n break;\n case 'heatmap':\n _this._createHeatmap();\n break;\n }\n },\n\n _getClassifications: function (howMany) {\n var _this = this;\n var oneDArray = [];\n _this.facetHeatmap.counts_ints2D.forEach(function(value, row) {\n if (value != null) {\n oneDArray = oneDArray.concat(value);\n }\n });\n\n var sampledArray = _this._sampleCounts(oneDArray);\n\n var series = new geostats(sampledArray);\n var scale = _this.options.colors;\n var classifications = series.getClassJenks(howMany - 1);\n return classifications.reduce(function (previous, current) {\n if (previous.indexOf(current) == -1) {\n previous.push(current);\n }\n\n return previous;\n }, []);\n },\n\n _styleByCount: function (classifications) {\n var _this = this;\n var scale = _this.options.colors.slice(this.options.colors.length - classifications.length, this.options.colors.length);\n\n _this.eachLayer(function (layer) {\n var color;\n classifications.forEach(function (val, i) {\n if (layer.feature.properties.count >= val) {\n color = scale[i];\n }\n });\n\n layer.setStyle({\n fillColor: color,\n fillOpacity: 0.5,\n weight: 0,\n });\n });\n },\n\n // Jenks classification can be slow so we optionally sample the data\n // typically any big sample of counts are much the same, don't need to classify on all of them\n _sampleCounts: function (passedArray) {\n const _this = this;\n if (passedArray.length <= _this.options.maxSampleSize) {\n return passedArray; // array too small to sample\n }\n\n var maxValue = Math.max.apply(Math, passedArray);\n var sampledArray = [];\n var period = Math.ceil(passedArray.length / _this.options.maxSampleSize);\n for (let i = 0; i < passedArray.length; i = i + period) {\n sampledArray.push(passedArray[i]);\n }\n\n sampledArray.push(maxValue); // make sure largest value gets in, doesn't matter much if duplicated\n return sampledArray;\n },\n\n _minLng: function (column) {\n return this.facetHeatmap.minX + (this.lengthX * column);\n },\n\n _minLat: function (row) {\n return this.facetHeatmap.maxY - (this.lengthY * row) - this.lengthY;\n },\n\n _maxLng: function (column) {\n return this.facetHeatmap.minX + (this.lengthX * column) + this.lengthX;\n },\n\n _maxLat: function (row) {\n return this.facetHeatmap.maxY - (this.lengthY * row);\n },\n\n _getData: function () {\n var _this = this;\n var startTime = Date.now();\n\n var url = new URL(_this._solrUrl);\n url.searchParams.append('bbox', _this._mapViewToBbox());\n\n fetch(url, {\n headers: {\n 'Accept': 'application/json',\n }\n }).then(function (response) {\n return response.json();\n }).then(function (data) {\n var totalTime = 'Solr response time: ' + (Date.now() - startTime) + ' ms';\n if (_this.options.logging) {\n console.log(totalTime);\n }\n\n _this.docsCount = data.response.numFound;\n _this.renderStart = Date.now();\n _this._computeHeatmapObject(data);\n _this.fireEvent('dataAdded', data);\n });\n },\n\n _mapViewToBbox: function () {\n if (this._map === undefined) {\n return '-180,-90,180,90';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return [wrappedSw.lng, bounds.getSouth(), wrappedNe.lng, bounds.getNorth()].join(',');\n },\n\n _mapViewToEnvelope: function () {\n if (this._map === undefined) {\n return ':\"Intersects(ENVELOPE(-180, 180, 90, -90))\"';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return ':\"Intersects(ENVELOPE(' + wrappedSw.lng + ', ' + wrappedNe.lng + ', ' + bounds.getNorth() + ', ' + bounds.getSouth() + '))\"';\n },\n\n _mapViewToWkt: function () {\n if (this._map === undefined) {\n return '[\"-180 -90\" TO \"180 90\"]';\n }\n\n var bounds = this._map.getBounds();\n var wrappedSw = bounds.getSouthWest().wrap();\n var wrappedNe = bounds.getNorthEast().wrap();\n return '[\"' + wrappedSw.lng + ' ' + bounds.getSouth() + '\" TO \"' + wrappedNe.lng + ' ' + bounds.getNorth() + '\"]';\n },\n\n _solrQuery: function () {\n return '/' + this.options.solrRequestHandler + '?' + this.options.field;\n },\n});\n\nL.solrHeatmap = function (url, options) {\n return new L.SolrHeatmap(url, options);\n};\n\n// Check if L.MarkerCluster is included\nif (typeof L.MarkerCluster !== 'undefined') {\n L.MarkerCluster.prototype.initialize = function (group, zoom, a, b) {\n\n L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), { icon: this });\n\n this._group = group;\n this._zoom = zoom;\n\n this._markers = [];\n this._childClusters = [];\n this._childCount = 0;\n this._iconNeedsUpdate = true;\n\n this._bounds = new L.LatLngBounds();\n\n if (a) {\n this._addChild(a);\n }\n\n if (b) {\n this._addChild(b);\n this._childCount = b.options.count;\n }\n };\n}\n","const Basemaps = {\n darkMatter: L.tileLayer(\n 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', {\n attribution: '&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, &copy; <a href=\"http://cartodb.com/attributions\">CartoDB</a>',\n maxZoom: 18,\n worldCopyJump: true,\n detectRetina: true,\n }\n ),\n positron: L.tileLayer(\n 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', {\n attribution: '&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, &copy; <a href=\"http://cartodb.com/attributions\">CartoDB</a>',\n maxZoom: 18,\n worldCopyJump: true,\n detectRetina: true,\n }\n ),\n 'OpenStreetMap.HOT': L.tileLayer(\n 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {\n attribution: '&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>, Tiles courtesy of <a href=\"http://hot.openstreetmap.org/\" target=\"_blank\">Humanitarian OpenStreetMap Team</a>',\n maxZoom: 19,\n }\n ),\n}\n\nexport default Basemaps\n","const Icons = {\n default: new L.Icon.Default()\n}\n\nexport default Icons\n","const IndexView = L.Class.extend({\n options: {},\n\n initialize: function (el, options) {\n var requestUrl = el.dataset.searchUrl + '&format=heatmaps';\n var geometryField = el.dataset.geometryField;\n var template = el.dataset.sidebarTemplate;\n var colorRamp = JSON.parse(el.dataset.colorRamp);\n\n // Blank out page link content first and disable pagination\n document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {\n links.innerHTML = '';\n });\n document.querySelectorAll('ul.pagination').forEach(function (links) {\n links.classList.add('d-none');\n });\n\n var map = L.map(el.id).setView([0, 0], 1);\n var basemap = BlacklightHeatmaps.selectBasemap(\n el.dataset.basemapProvider\n ).addTo(map);\n\n var solrLayer = L.solrHeatmap(requestUrl, {\n field: geometryField,\n maxSampleSize: 50,\n colors: colorRamp,\n }).addTo(map);\n\n var sidebar = L.control.sidebar('index-map-sidebar', {\n position: 'right',\n });\n\n map.addControl(sidebar);\n\n solrLayer.on('click', function (e) {\n if (!sidebar.isVisible()) {\n map.setView(e.latlng);\n } else {\n var point = map.project(e.latlng);\n var offset = sidebar.getOffset();\n var newPoint = L.point(point.x - (offset / 2), point.y);\n map.setView(map.unproject(newPoint));\n }\n\n sidebar.show();\n });\n\n solrLayer.on('dataAdded', function (e) {\n if (e.response && e.response.docs) {\n var html = '';\n e.response.docs.forEach(function (value) {\n html += L.Util.template(template, value);\n });\n\n sidebar.setContent(html);\n\n var docCount = e.response.pages.total_count;\n\n document.querySelectorAll('#sortAndPerPage .page-links').forEach(function (links) {\n links.innerHTML = parseInt(docCount).toLocaleString() + ' ' + (docCount == 1 ? 'item' : 'items') + ' found';\n });\n }\n });\n },\n\n pluralize: function (count, word) {\n switch (count) {\n case 1:\n return word;\n default:\n return word + 's';\n }\n },\n});\n\nexport default IndexView;\n","const ShowView = L.Class.extend({\n options: {},\n\n initialize: function (el, options) {\n var json = JSON.parse(el.dataset.features);\n\n var map = L.map(el.id).setView([0, 0], 1);\n var basemap = BlacklightHeatmaps.selectBasemap(\n el.dataset.basemapProvider\n ).addTo(map);\n\n var features = L.geoJson(json, {\n pointToLayer: function(feature, latlng) {\n return L.marker(latlng, {\n icon: BlacklightHeatmaps.Icons.default\n })\n }\n }).addTo(map);\n\n map.fitBounds(features.getBounds());\n },\n});\n\nexport default ShowView\n","import L from 'leaflet'\nimport '../../vendor/assets/javascripts/leaflet_solr_heatmap'\nimport Basemaps from './basemaps'\nimport Icons from './icons'\nimport IndexView from './viewers/index'\nimport ShowView from './viewers/show'\n\nconst BlacklightHeatmaps = L.Class.extend({\n statics: {\n __version__: '0.0.3',\n\n selectBasemap: function (basemap) {\n if (basemap && basemap !== undefined) {\n return BlacklightHeatmaps.Basemaps[basemap];\n } else {\n return BlacklightHeatmaps.Basemaps.positron;\n }\n },\n },\n})\n\nBlacklightHeatmaps.Basemaps = Basemaps\nBlacklightHeatmaps.Icons = Icons\nBlacklightHeatmaps.IndexView = IndexView\nBlacklightHeatmaps.indexView = function (el, options) {\n return new IndexView(el, options)\n}\nBlacklightHeatmaps.ShowView = ShowView;\nBlacklightHeatmaps.showView = function (el, options) {\n return new ShowView(el, options);\n};\n\nBlacklight.onLoad(function () {\n document.querySelectorAll('[data-index-map]').forEach(function (el) {\n BlacklightHeatmaps.indexView(el, {});\n })\n document.querySelectorAll('[data-show-map]').forEach(function (el) {\n BlacklightHeatmaps.showView(el);\n });\n})\n\nexport default BlacklightHeatmaps;\n"],"names":["BlacklightHeatmaps","L"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAQA,CAAC,UAAU,UAAU,EAAE;AACvB;AACA;;AAEA;AACA,MAAqC;UAC7B,MAAA,CAAA,OAAA,GAAiB,UAAU,EAAE;;AAErC;;;AASA,GAAC,EAAE,YAAY;;AAEf,EAAA,IAAI,KAAK,GAAG,SAAS,CAAC,EAAE;KACrB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E;;AAED,EAAA,IAAI,EAAE,GAAG,SAAS,GAAG,EAAE;AACvB,GAAC,OAAO,GAAG;GACV;;AAED;AACA,EAAA,IAAI,QAAQ,GAAG,SAAS,CAAC,EAAE;AAC3B,KAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;AAC9C;;;;AAIA;AACA;AACA,EAAA,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE;MAC1B,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,aAAa,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