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.
Objective
The original data visualisation was created to showcase the top ten richest people on the planet on the basis of their net worth. The focus of this visualization was to consider another prespective of analysing the top richest people other than their net worth.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(tidyverse)
library(plotly)
data <- read_csv("C:/Users/sande/OneDrive/Desktop/rmit/billionaires.csv")
#data <- Richest %>% mutate( net_worth = factor(net_worth),
# Model = rownames(Richest))
# Basic bubble plot in ggplot2
plot1 <- data %>% ggplot(aes(x = name, y = age, size = net_worth)) +
geom_point(alpha = 0.5)
plot1
# Bubble plot with color and custom size
plot2 <- data %>% ggplot(aes(x = name, y = age, size = net_worth,
label = Model)) +
geom_point(alpha = 0.5) +
scale_size(range = c(.1, 15))
#plot2
Data Reference
The following plot fixes the main issues in the original.