diff --git a/package.json b/package.json index 4dc7f994f..1cdbaab35 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,7 @@ "d3-geo": "^3.0.1", "d3-random": "^3.0.1", "d3-selection": "^3.0.0", - "d3-zoom": "^3.0.0", - "fast-kde": "^0.2.1" + "d3-zoom": "^3.0.0" }, "devDependencies": { "@babel/core": "^7.9.0", diff --git a/src/index.js b/src/index.js index 958b61dce..71c2a395f 100644 --- a/src/index.js +++ b/src/index.js @@ -22,9 +22,6 @@ export { JoyPlotStyle } from './style/JoyPlotStyle.js' export { CompositionStyle } from './style/CompositionStyle.js' export { SegmentStyle } from './style/SegmentStyle.js' export { TextStyle } from './style/TextStyle.js' -export { KernelSmoothingStyle } from './style/KernelSmoothingStyle.js' -//export { KernelSmoothingOldStyle } from "./style/KernelSmoothingStyle" -//export { KernelSmoothingWGLStyle } from "./style/KernelSmoothingStyle" export { PillarStyle } from './style/PillarStyle.js' export { SideStyle } from './style/SideStyle.js' export { ContourStyle } from './style/ContourStyle.js' diff --git a/src/style/KernelSmoothingOldStyle.js b/src/style/KernelSmoothingOldStyle.js deleted file mode 100644 index 1de177e4f..000000000 --- a/src/style/KernelSmoothingOldStyle.js +++ /dev/null @@ -1,221 +0,0 @@ -//@ts-check -'use strict' - -import { Style } from '../Style.js' - -/** - * A style representing the cell as a smoothed layer, to smoothing local variations and show main trends across space. - * - * @author Julien Gaffuri - */ -export class KernelSmoothingStyle extends Style { - //bandwidth - // https://observablehq.com/@uwdata/fast-kde - // https://observablehq.com/d/3127b6d89ada959f - //TODO use https://github.com/uwdata/fast-kde ? - //TODO https://observablehq.com/@sahilchinoy/areal-interpolation-iii ? - - /** @param {object} opts */ - constructor(opts) { - super(opts) - opts = opts || {} - - /** A function specifying the value to consider for each cell. This is the value to smooth. - * @type {function(import("../Dataset").Cell):number} */ - this.value = opts.value - - /** The smoothing parameter, in geo unit. The larger, the more smoothed. - * @type {function(number,number):number} - */ - this.sigma = opts.sigma // (r, zf)=>... - - /** The styles to represent the smoothed cells. - * @type {Array.