Philippe Rivière

Results 746 comments of Philippe Rivière

Rather than breaking silently, throw an error?

If you're working with non-gridded data you might want to take a look at https://github.com/Fil/d3-tricontour

It seems that you are computing the contours on the spherical coordinates, then project the resulting polygons. But this creates issues with the holes. If you changed the order of...

Ah, true: ``` contours = d3.contours() .size([data.width, data.height]) .thresholds(thresholds)(varData.values.map(d => Math.max(-1e13, d))) ``` is correct, but with 1e-14 it's broken: ``` contours = d3.contours() .size([data.width, data.height]) .thresholds(thresholds)(varData.values.map(d => Math.max(-1e14, d)))...

I've now implemented this through various test notebooks that are not yet fully ready (coming soon). I'm enthusiastic about the idea of selecting the bandwidth relative to the variance of...

Here's an implementation that seems to work, based on the new [d3.blur](https://github.com/d3/d3-array/pull/151) proposal. https://observablehq.com/@fil/x-y-bandwidth-for-density-contours The remarks above still stand. before ![before](https://user-images.githubusercontent.com/7001/85149673-da225680-b251-11ea-8115-294631b6f0fe.png) after ![after](https://user-images.githubusercontent.com/7001/85149685-dd1d4700-b251-11ea-9449-63edaee680c9.png)

I figure that as a first step we should ship a version that accepts x/y bandwidths as inputs, and allow experimentations (this depends in turn on d3.blur (https://github.com/d3/d3-array/pull/151). For the...

Contour simplification could be an option of d3-contour, but I believe it's enough to leave this to topojson as in https://observablehq.com/d/4fe65b865ccf545d > The tricky thing is for geographic coordinates Shameless...

Regarding `noFrame` it seems that the solution is to filter out the multipolygons that have exactly 1 polygon with 1 ring with an area equal to n * m -...

Re: "noFrame", I think that returning the area (since we've computed it) as `p.area` could be the simplest solution. Beyond "filtering out frames", it can be used to compute stats....