Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
jenks: function(fc, z, numBreaks, colors, style){
var vals = _.chain(fc.features)
.pluck('properties')
.pluck(z)
.value()
var breaks = ss.jenks(vals, numBreaks)
var normals = normalize(breaks.length)
fc = colorize(fc, z, colors, breaks, normals)
fc = setLegend(fc, z, colors, breaks, normals)
fc = applyStyle(fc, style)
return fc
},
module.exports = function(fc, field, num, done){
var vals = []
var breaks = []
done = done || function () {};
_.each(fc.features, function(feature){
if(!(feature.properties[field]===undefined)){
vals.push(feature.properties[field])
}
})
breaks = ss.jenks(vals, num)
done(null, breaks)
return breaks;
}
module.exports = function (fc, field, num) {
var vals = [];
var breaks = [];
fc.features.forEach(function (feature) {
if (feature.properties[field] !== undefined) {
vals.push(feature.properties[field]);
}
});
breaks = ss.jenks(vals, num);
return breaks;
};