3 ms·
I know this is cheating and missing the point, but using d3-array: d3.mean(victorianSlang, d => d.popularity) This implicitly ignores invalid values (null, Na
by mbostock 7y ago
I know this is cheating and missing the point, but using d3-array:
d3.mean(victorianSlang, d => d.popularity)
This implicitly ignores invalid values (null, NaN or undefined) after coercing to a number.