Original


Source: https://www.statisticshowto.com/probability-and-statistics/descriptive-statistics/misleading-graphs/.


Objective Climate change is a longterm shift in weather patterns & temperatures. These kind of shifts had been natural, but in later years various factors were contributing too. The objective of this data visualization is to provide the reader with a Global warming information over the years as a comparative analysis, of the temperature over the time. The target audience is the general public. It visualizes the temperature over the last 16 years. The visualization aims to educate its audience about the changes in the temperature.

The visualization chosen had the following three main issues:

1.The graph is showing just the temperature of the air. This is not a great way of representing the global warming measure.

2.This graph talks about information from 1960 onwards, we probably only need to look at the last few years to see the current situation.

3.As best practice, we dont use colors which cannot be read by color blind individuals.

Reference

Glen, S. (2021). Misleading Graphs: Real Life Examples. [online] Statistics How To. Available at: https://www.statisticshowto.com/probability-and-statistics/descriptive-statistics/misleading-graphs/.

Code

The following code was used to fix the issues identified in the original.

library(readr)
library(knitr)
library(ggplot2)
annualglobal <- read.csv("C:/Users/SueKumar/viz-assign2/annual-global-warming-data.csv")


annualglobal1 <- ggplot(data = annualglobal, aes(x = Year, y = TemperaturePercentage))

annualglobal1 + geom_bar(stat = "identity", fill = "#FF97E8", colour="white") + theme(axis.text.x = element_text(angle=45,hjust = 1)) +
  labs(title ="Global Warming Statistics",
       y = "Temperature",element_text(hjust = 0.2))+
geom_text(aes(label=round( TemperaturePercentage,2)), vjust = -.06,size = 2)

Data Reference

Data is taken from kaggle, it was the closest to the original data.

www.kaggle.com. (n.d.). Global temperature ( Elon… Rocket? ). [online] Available at: https://www.kaggle.com/datasets/programmerrdai/global-temperature?select=annual.csv [Accessed 31 Jul. 2022].

Reconstruction

The following plot fixes the main issues in the original.