Advanced Multi Axis Spider Chart #849
Ringomed
announced in
2024 Plotnine Contest
Replies: 3 comments 1 reply
-
Ahoy @Ringomed , |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Ringomed, The winning submission has been announced here. Thank you for taking part in the contest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🕸️ Multi Axis Spider Chart
🪶 Authors
Zvonimir Boban
LinkedIn | GitHub
💡 Motivation
As a long-time R user who ocasionally does work in Python as well, hearing of the plotnine library trying to bring the ggplot experience to Python instantly piqued my curiosity and this competition was the perfect opportunity to try it out.
Inspired by R's ggplot2, the plotnine library is also based on the concept of grammar of graphics, allowing for creation of graphs by stacking multiple layers on top of one another. This powerful concept lets us create essentially any visualization, as long as we know how to code it. Here, I used it to construct an advanced version of a spider chart from scratch. The chart presents a comparison of Titanic passenger across the three passenger classes.
📈 The Chart
Aside from enabling the usual comparison of values on a relative scale, this version of the spider chart also allows a quick insight into the absolute feature values as well, without having to go back to the original dataset. We can clearly see that the 1st class passengers were the oldest and the wealthiest of the three. The 3rd class passengers had the highest number of both male and female passengers and were the youngest group — probably mostly young people and families in search for better life abroad. However, the 1st class passengers had the highest survival rate of 63 %, and the 3rd the lowest (just 24 %). This is probably partly due to the 1st class quarters being closer to the boat deck and partly due to the higher proportion of women in that class (since woman and children were rescued first).
➕ Bonus Chart
Out of curiosity, I also tested the chart on the mtcars data to compare the properties of thre different cars. Enjoy!
💻 Code Repository
You can find all the neccessary files and notebooks with the code at the accompanying GitHub repository. The tutorial detailing each step of chart creation can be found in the README file 🙂.
Beta Was this translation helpful? Give feedback.
All reactions