Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Introduction
GDP is important because it gives information about the size of the economy and how an economy is performing. The growth rate of real GDP is often used as an indicator of the general health of the economy,International trade analysis for each US state’s economy.Markets are down as political rhetoric continues to escalate around everything from tariffs to the trade deficits.By giving proper attention to international trade,this graph figures out which states economies depend the most on imports and exports using the parameters Trade Shares of GDP,GDP in billions for the year 2017.
Objective
The Bureau of Economic Analysis keeps track of GDP figures at the state level, the US Census Bureau tabulates trade figures for each state for each year, and the American Enterprise Institute neatly synthesized the information and represents the analysis in this data visualisation.The main objective of this data visualisation is to find out which states economies occupies most on the exports and imports.The above one is a circular bar chart where each blue area denotes total GDP in $B for each state.Here a color coded red area used to highlight the percentage of states economy which is dependant on trade as states vary significantly in size.In other words we can say that the main goal is to highlight how important trade is to the overall economy of both large and small states.
Targetted Audience
The graph tries to capture the attention of:
*Consumers in the US and people who get access to the best products in the world at the lowest price and greatest value.
*Global Market finders,Traders like U.S Exporters and Importers
*Researchers and economists who want to study trade shares of GDP,GDP values to ascertain whether the domestic economy is in trade surplus/trade deficit, as it is an important indicator for the level of economic growth in the country.
*Economic Student/Individual who need to explore about American Economy
*US Trade statisticians who are using the Census API’s and also important for the Government focusing on GDP values and deciding whether to continue importing/exporting from that state with a particular commodity and for further policy making, like setting up trade duties and tarrifs, etc. Government also needs this informtion to study the country’s balance of trade as it directly affects currency value which could impact the exchange rates, GDP and inflation rates.
*Global traders, data enthusiasts,audiences include foreign investors and stock market employees.
Issues
The visualisation chosen had the following three main issues:
Information Bombardment or Visual Complexity: The spiral shape is highly intriguing to observers eye but there is an information burst is present in the visualisation.Its hard to get a proper analysis or objective because of this and hard for comparison.Instead of this shape if its represented by regular bar plot comparison between the State GDP and the Trade would be much easier.The viewers will get deceived because of constant angles where observers try to analyse by finding the angles and area partition in this kind of plots.Too many variables and picture icons in a single visualistion are increasing the complexity and time involved for its comprehension.
Deceptive Issue: In this visualisation its sorted by one element GDP and the participant is not made fully aware to make a comparison between trade shares of GDP of 2017 which is one of the specific purpose of the study.This issue is a bit haphazard and makes one find it difficult to make comparison.For example if you need to make a comparison between the top five states where international trade makes up the greatest percentage of the local economy of each state it is difficult as the values mentioned over here are not sorted.Directly we will notice Texas with trade share 31.2% due to its size and in a eye catching position top of spiral with highest trade share.But as per statistics the actual value is Michigan with 38.9% trade share.This kind of things leads to analyzer is getting misinformed as a part of the study
Color Issues:The combination of redand blue used to visualize are quite contradictive and eye catching where gradient color used for the Trade shares of GDP which is confusing and not clear.When we are analysing towards the decreasing GDP’s in the end of the spiral it is hard to see the difference and also the values/information denoted.For example the Montana with trade share 12.4% and South Dakota is with trade share 5.1% which is not clear enough and difficult for a person with a colour vision deficiency.
Reference
The following code was used to fix the issues identified in the original.
#Packages required
installed.packages("dplyr") # package to use %>% pipe operator
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
installed.packages("readr") # package to import dataset
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
installed.packages("tidyr") # package to tidy data
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
installed.packages("tidyverse") #package to make operations faster
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
installed.packages("hablar") #package used to deal the data types
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
installed.packages("ggplot2") # package to plot data visualisation
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
#Libraries
library(tidyverse) #useful to make faster
library(hablar) #useful to work with data types
library(dplyr) # useful to use %>% pipe operator
library(readr) #useful to import dataset
library(tidyr) # useful to tidy data
library(ggplot2) # useful to plot data visulisation
#Import the data, csv file and assigning in to the df variable
df <- read_csv("C:/Users/Geena George/Desktop/Sem2/DataVisualisation/International Trade as a Share of State GDP (2017).csv")
#Data processing Steps
#Renaming column names for ease of data plotting
colnames(df) [1] <- 'States' #first column
colnames(df) [2] <- 'StateGDP_2017' #Second column
colnames(df) [3] <- 'Exports_and_Imports' #Third column
colnames(df) [4] <- 'Trade_Shares_2017' #Fourth column
#Checking the renamed column names by displaying first six rows
head(df)
## # A tibble: 6 x 4
## States StateGDP_2017 Exports_and_Imports Trade_Shares_2017
## <chr> <dbl> <dbl> <dbl>
## 1 CALIFORNIA 2734 613 22.4
## 2 TEXAS 1692 527 31.2
## 3 NEW YORK 1550 202 13
## 4 FLORIDA 971 130 13.4
## 5 ILLINOIS 818 201 24.6
## 6 PENNSYLVANIA 746 122 16.3
#Factorizing functions to create the value labels for the graphs for more efficiency
#Using the data structure factor creating labels
df$States <- factor(df$States,
levels = c( "CALIFORNIA",
"TEXAS",
"NEW YORK",
"FLORIDA",
"ILLINOIS",
"PENNSYLVANIA",
"OHIO",
"NEW JERSEY",
"GEORGIA",
"NORTH CAROLINA",
"MASSACHUSETTS",
"MICHIGAN",
"VIRGINIA",
"WASHINGTON",
"MARYLAND",
"INDIANA",
"MINNESOTA",
"TENNESSEE",
"COLORADO",
"WISCONSIN",
"ARIZONA",
"MISSOURI",
"CONNECTICUT",
"LOUISIANA",
"OREGON",
"SOUTH AROLINA",
"ALABAMA",
"KENTUCKY",
"OKLAHOMA",
"IOWA",
"UTAH",
"NEVADA",
"KANSAS",
"DISTRICT OF COLUMBIA",
"ARKANSAS",
"NEBRASKA",
"MISSISSIPPI",
"NEW MEXICO",
"HAWAII",
"NEW HAMPSHIRE",
"WEST VIRGINIA",
"DELAWARE",
"IDAHO",
"MAINE",
"RHODE ISLAND",
"NORTH DAKOTA",
"ALASKA",
"SOUTH DAKOTA",
"MONTANA",
"WYOMING",
"VERMONT" ),
labels = c("CALIFORNIA",
"TEXAS",
"NEW YORK",
"FLORIDA",
"ILLINOIS",
"PENNSYLVANIA",
"OHIO",
"NEW JERSEY",
"GEORGIA",
"NORTH CAROLINA",
"MASSACHUSETTS",
"MICHIGAN",
"VIRGINIA",
"WASHINGTON",
"MARYLAND",
"INDIANA",
"MINNESOTA",
"TENNESSEE",
"COLORADO",
"WISCONSIN",
"ARIZONA",
"MISSOURI",
"CONNECTICUT",
"LOUISIANA",
"OREGON",
"SOUTH AROLINA",
"ALABAMA",
"KENTUCKY",
"OKLAHOMA",
"IOWA",
"UTAH",
"NEVADA",
"KANSAS",
"DISTRICT OF COLUMBIA",
"ARKANSAS",
"NEBRASKA",
"MISSISSIPPI",
"NEW MEXICO",
"HAWAII",
"NEW HAMPSHIRE",
"WEST VIRGINIA",
"DELAWARE",
"IDAHO",
"MAINE",
"RHODE ISLAND",
"NORTH DAKOTA",
"ALASKA",
"SOUTH DAKOTA",
"MONTANA",
"WYOMING",
"VERMONT" ))
#Combining the values of State GDP into Vector in column StateGDP_2017
df$StateGDP_2017 = c(2734,1692,1550,971,818,746,651,589,555,543,527,515,511,503,396,360,354,345,341,324,
320,307,262,243,238,219,215,204,190,189,166,153,153,132,127,119,112,98,88,80,77,75,
72,61,59,55,52,49,48,41,32)
#Plotting the Graph 1
#Graph 1 is to represent State GDP 2017 of USA where States sorted with respect to the State GDP
Plot1 <- ggplot(df, aes(reorder(States, StateGDP_2017,width=1.8,position = position_dodge(width=2)), StateGDP_2017, fill = StateGDP_2017)) +
geom_bar(stat = "identity", color = "white") +
labs(x = "States Ranked by GDP in 2017",
y = "GDP in $ billions of 2017",
title = "State GDP of 2017 USA",
subtitle = "States in the order of decreasing GDP",
caption = "Source: Data obtained from howMuch.net articles",
fill= "State GDP Value")+
coord_flip() +
scale_fill_gradient(high = "#53258f",low = "#f598ae") +
scale_y_continuous(labels=function(StateGDP_2017) format(StateGDP_2017, big.mark = ",", scientific = FALSE)) +
geom_text(aes(label = StateGDP_2017), position = position_dodge(width= 1.2),
size = 5, vjust = 0.3,hjust=-0.10, color= 'black') +
theme_classic()+
theme(plot.title = element_text(color="black",hjust=0.5, size = 40, face = "bold"),
plot.subtitle = element_text(color="black",hjust = 0.5,face = "italic", size = 20),
text = element_text(size=14),
plot.caption = element_text(color = "black", size=15, face = "italic"),
strip.placement = "outside",
strip.background = element_blank(),
panel.border = element_blank())
background <- "#85948D"
#Plotting the GDP plot using the above plot1
GDP_Plot <- Plot1+ theme(plot.background = element_rect(fill = background),
panel.background = element_rect(fill = background),
legend.background = element_rect(fill = background),
text=element_text(family="Georgia"),
title = element_text(face = "bold"),
panel.grid.major.x = element_line(colour = "#999394"))
#Plotting the Graph 2
#Graph 2 is to represent the State Trade Share towards GDP sorted by Trade shares of GDP 2017
Plot2 <- ggplot(df, aes(reorder(States, Trade_Shares_2017,width=1.8,position = position_dodge(width=2)), Trade_Shares_2017, fill = Trade_Shares_2017 )) +
geom_bar(stat = "identity", color = "white") +
labs(x = "States Ranked by the Trade Share",
y = "Trade Shares of GDP in Percentage(%)",
title = "International Trade Shares as a share of State GDP 2017",
subtitle = "States in order of decreasing Trade Share of GDP",
caption = "Source: Data obtained from howMuch.net Articles",
fill= "Trade Share Value ") +
coord_flip() +
scale_fill_gradient(high = "#53258f",low = "#f598ae") +
geom_text(aes(label = Trade_Shares_2017), position = position_dodge(width= 1.2),
size = 5.0, vjust = 0.3,hjust=-0.10, color= 'black') +
theme_classic()+
theme(plot.title = element_text(hjust=0.5, size = 35, face = "bold"),
plot.subtitle = element_text(color="black",hjust = 0.5,face = "italic",size = 20),
plot.caption = element_text(color = "black", size= 15, face = "italic"),
text = element_text(size=14),
strip.placement = "outside",
strip.background = element_blank(),
panel.border = element_blank())
#Plotting the Trade shares plot using the above plot2
Trade_Shares <- Plot2 + theme(plot.background = element_rect(fill = background),
panel.background = element_rect(fill = background),
legend.background = element_rect(fill = background),
text=element_text(family="Georgia"),
title = element_text(face = "bold"),
panel.grid.major.x = element_line(colour = "#999394"))
Data Reference
The following plot fixes the main issues in the original.