This is a template file. The example included is not considered a good example to follow for Assignment 2. Remove this warning prior to submitting.

Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.

Original


Source: https://www.reddit.com/r/dataisbeautiful/comments/b076tf/top_10_richest_companies_in_the_world_by_revenue/.


Objective

Explain the objective of the original data visualisation

The original data visualisation was intened to shed knowledge on the top ten richest companies across the globe on the basis of their financial 2017 revenue. The focus of this visualization was to consider a different prespective of analysing the top richest companies other than market cap, brand value and profits. It was also the targetted audience who wished to look at the richest companies in terms of fiscal revenue and not brand value or market cap

However, the original visualization had few issues in it which made the visualization a little ambiguous. Few points in the visualization make it abstruse

The visualisation chosen had the following three main issues:

  • Briefly explain issue 1 The first and foremost issue with this visualization is that the data is not sorted. As the data is not sorted, it becomes hard to capture in a go as which company is the richest. Thus, it lacks the main purpose of the data and its visualization.

  • Briefly explain issue 2 The bars are depicted with different colors. Using different colors for the bars here was not necessary. It ended up by adding complexity to the visualization for no essential reason.

  • Briefly explain issue 3 Logos are inconsistent is shape, size and off context. The logos to depict each of the companies (as well as the owners in some case), are not synced in the shape and size. Also, there is no need of the logos as the names of the companies are already mentined on the x-axis. The logos are intrusive in this visualization for a smoother understanding.

Reference

Reference

Code

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

library(readr)
library(ggplot2)
library(dplyr)


df <- read_csv("C:/Users/namra/OneDrive/Pictures/assignment2template/companiesmarketcap.com - Companies ranked by Market Cap - CompaniesMarketCap.com.csv")


plot <- ggplot(df$x, aes(x = reorder(Country,marketcap), y = marketcap))
plot <- plot + 
  geom_bar(stat = "identity", position = "dodge", width= 0.5, color="skyblue", fill="steelblue") + 
  geom_text(aes(label = marketcap), size = 3, vjust=-0.3)+
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1),
        plot.title = element_text(size = 11,hjust = 0.5)) +
  
  labs(
    title = "Top 10 Richest Companies in the world",
    y = "Revenue in Billion Dollars",
    x = "Companies") 

Data Reference

Reconstruction

The following plot fixes the main issues in the original.