borntofrappe / learning-d3

d3.js is vast. Here's a repository filled with projects to master the library, its many modules and powerful features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

boxplot experiment

borntofrappe opened this issue · comments

researching d3-scale I thought you can actually find quantiles without using d3.quantile directly

  • try to find quantiles with d3.scaleQuantile instead of d3.quantile
  • as a proof of concept implement the solution to draw a boxplot matching the one highlighting the corresponding Wikipedia page

A basic visual which hides plenty of D3 concepts:

  • node, appendChildandcloneNode` to repeat the path elements (and frame the data in between the axis)
  • each to iterate through the selection of groups
  • scaleQuantile to extract the boxplot values
  • datum to bind the quantiles to a single group element
  • marker to delimit the whiskers

boxplot experiments