I have following data:
I II Total
A 15 25 40
B 5 45 50
C 15 5 20
R data input:
group <- c("A", "B", "C", "A", "B", "C")
subgroup <- c("I", "I", "I", "II", "II", "II")
yvar <- c(15, 5, 15, 25, 45, 5)
As I was thinking a better way to present it, I came to idea of pie chart (preferably 3D) combined with bar chart (preferably 3D). Here is my rough sketch of my idea where bar chart is embedded into pie chart. Please suggest me if you have any other innovative idea to present such data.
I cannot recommend strongly enough that you read some of Edward Tufte's literature on graphs and the display of quantitative data. Pie charts are close to the worst possible way to impart information to the user. Use of "3-D" images (e.g. bars) in charts is considered puerile at best -- it does nothing to improved readability or information flow.
So let me ask: what information (and what conclusions) are you trying to give to your reader? Why would you want to present the same information twice?
Please suggest me if you have any other innovative idea to present such data
I don't have an innovative idea, but I do have what I think is a better way.
Think about your data. It's divided into groups (A, B, C), each of which also has a subgroup (I, II). So when you plot the data, you need 2 "visual aids": one of which illustrates the main groups and a second showing the subgroups.
A sensible way to do this is to separate the main groups by position and indicate the subgroups by colour.
So, you can reshape your data into a data frame (df1) which looks like this:
group subgroup yvar
1 A I 15
2 B I 5
3 C I 15
4 A II 25
5 B II 45
6 C II 5
And then use ggplot to generate a stacked bar plot:
library(ggplot)
ggplot(df1, aes(x = group, y = yvar, fill = subgroup)) + geom_bar()
Result:
Note that ggplot calculates the totals for you. Look at that, look at your combined 3D bar + pie charts and ask yourself: which one best conveys the key features of the data, at a glance?
Please trust me and the data visualization experts on this forum when we tell you: what matters is clear presentation, not "what business people want."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With