This is my submission for the second test.
We will evaluate the effectiveness of Pie-Charts to reflect data in
info-graphic form and evaluate it with discrete and continous data.
cyl<-table(mtcars$cyl)
cyl_percentage<- table(mtcars$cyl)/length(mtcars$cyl)*100
lbls<- paste(names(cyl), "cyl -", cyl_percentage, "%")
colour<- c("red", "green", "blue", "yellow", "orange", "purple")
pie(cyl, labels = lbls, border = "grey", col = colour,
main = "Pie-chart showing number of Cylinders in a car (dataset = mtcars)")
box()
barplot(cyl, names.arg = lbls, border = "grey", col = colour,
main = "Bar-chart showing number of Cylinders in a car (dataset = mtcars)")
box()
We find that the Bar-Chart is able to better relay the message at a quick glance, as it gives a reference to the count. Pie-charts are bit difficult to comprehend, especially if the percentage values are not displayed and it is heavily dependent upon borders and colour coding to communicate the message. With a larger set of discrete values, a Pie-chart will look cluttered. Though, one cannot rule out its usage for high-level executive dashboards with limited data outcomes and possibly with a stark difference - for eg: a pareto analysis.
wt<-table(mtcars$wt)
lbls1<- paste(names(wt))
pie(wt, labels = lbls1, border = "grey", col = colour,
main = "Pie-chart showing distribution of car weights (dataset = mtcars)")
box()
hist(mtcars$wt, border = "grey", col = colour,
main = "Histogram showing distribution of car weights (dataset = mtcars)")
box()
We find that the Pie-chart is unable to make a meaningful
interpretation of the data and hence is more confusing than reading the
data table. On the contrary, a histogram is able to nail the hammer that
most of the cars under review weighed between 3 to 4 ‘thousand pounds’.
For the above listed reasons, we do not recommend the use of
Pie-charts but for select few specific cases. Instead, a Bar Chart or a
Histogram will be a better suited option for discrete and continous data
respectively.
Thank You, Professor!