d3 quantile or quartile scale given the quartile values
Asked Answered
O

0

0

The current quantile scale takes all the input values as the domain to map the output range. But if the data is extremely large, I want the processing to happen on the server giving me the quartile values.

So I get: var quartiles=[5, 10, 15, 20, 25, 30, 35, 40, 45]; // 9 values with the mean (25) at the middle and standard deviations to each side var valueToMark = 37;

Using d3, how do I correctly create a quantile scale and mark them all on a line given only the quantiles and value to mark?

p.s. my knowledge of quantiles/quartiles is limited, therefore I would be grateful if I'm also corrected on any wrong assumptions I've exhibited here.

Oliver answered 22/9, 2014 at 13:14 Comment(2)
If you have quartiles, shouldn't you just have values at the 25%, 75% points? You're mapping the standard deviations (and maybe standard score?) with the ranges you provided.Panther
Because these are quantiles, and assuming there are 8 of them, each section would be 12.5% on the range. But the domain won't be equally split because it is a quantile scale. So if I get a single domain value, how do I know it's position on the output range?Oliver

© 2022 - 2024 — McMap. All rights reserved.