DEV Community

loading...
Cover image for Visualizing happiness by region in a box plot [Tutorial/JS]

Visualizing happiness by region in a box plot [Tutorial/JS]

andreykh1985 profile image andreykh1985 Originally published at towardsdatascience.com ・1 min read

A box plot, also widely called a box-and-whisker plot, is a data visualization technique used to visualize descriptive statistics of datasets. While this chart type is not as useful as a histogram at understanding a single datasets distribution, these visualizations do well at allowing a user to compare different datasets.

Box plots visualize the following summary statistics: The median, the first and third quartile (Q1 and Q3), the low and the high as well as the outliers. These are displayed as follows:
Box plot scheme

There's a cool new tutorial covering how to build an interactive box plot using JavaScript and a charting library. Look at the basic steps and then finally see the technique in use, in a fun example to investigate the distribution of happiness between the different regions of the planet in an attempt to answer the question: ‘Where should you live to be happier?’.

Check out the JS box plot tutorial on Towards Data Science. All charts from the tutorial are available with the full code on CodePen.

Discussion (0)

pic
Editor guide