0

I have some data in a csv. I want to get the first and the last decile of all the numbers. I think I might need to use d3.scale.quantize() but I do not know how...

Thanks for your help I'm stuck since a while.

Melki
  • 579
  • 2
  • 5
  • 26

1 Answers1

1

You can use d3.quantile() for this, i.e.

d3.quantile(numbers, 0.1);
d3.quantile(numbers, 0.9);

Demo here.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204