Objective
The main objective of the original visualisation was to represent and compare the migration flows occurred during the economic crisis in Venezuela; specifically, between the years 2014 and 2017. The infographic targets a general population with a notion of Venezuela’s political situation. And aims to provide figures related to the Venezuelan migration dynamic in the region.
The chosen visualisation had the following three main issues:
Asylum-Seekers from Venezuela, bar chart. Data integrity might be compromised, as the emphasis on the United States as the main country option for asylum-seekers might be deceiving. It is worth noting that the figures represent the total cumulative between 2014 and 2018. Even if it shows the top countries, the bar chart does not offer more information on migration changes over the years.
Venezuelans as Temporary Residents, circled map. Visual Comparison Accuracy compromised, the circles in the map might not accurately represent the proportion of Venezuelan temporary residents abroad. It can be inferred that the main reason to use the map as a visualisation was to point out the number of Venezuelans living abroad in the region; with the circles helping to identify the countries with highest number of Venezuelan Temporary Residents.
Poverty in Venezuela, stacked bar chart. Visual Comparison Accuracy compromised, the stacked bar chart does not have label numbers within the bars, and different variables are stacked on a same year. Making it difficult to know the exact percentages for each type of poverty. The main objective of this graph could have been to show and compare the increase of these poverty percentages over the years.
Reference
The following code was used to reconstruct the issues previously identified in the original visualisation.
Libraries
Packages loaded to reproduce the report.
library(readr)
library(ggplot2)
library(dplyr)
library(tidyr)
Issue 1. Asylum-Seekers from Venezuela, bar chart.
Fixed to be a Vertical Bar chart displaying the top twelve countries (as shown in original); with total number of asylum seekers labelled for each country.
Venezuela<- read_csv("~/MC242/Sem 2 - 2019/Data Visualisation/Assignments/VenezuelaUNHCR.csv")
#Extract from original dataset columns "Country"" and "Total"
VEtotal <- Venezuela[ ,c(1, 7)]
#Sort largest to smallest "Total"
VEtotal <- VEtotal[order(-VEtotal$Total),]
#Subset first 12 observations, as per original visualization
VEtotal <- VEtotal[1:12, ]
V1.1 <- ggplot(data=VEtotal, aes(x=reorder(Country, -Total), Total)) + geom_bar(stat="identity", fill="dodgerblue3")+
labs(title = "Venezuelan Asylum Seekers per Country (2014-2018)", x="Country", y="Total asylum seekers")+
theme(axis.text.x=element_text(angle = 45, hjust = 1))+
geom_text(aes(label=round(Total,2)),vjust=-0.5, size=3)
V1.1
Added scatter plot for top 3 countries to perceive migration rapid increase per country. Interesting to note that proportional immigration increase per country reveals the rapid increase of Venezuelan immigrants in a short period of time.
#Define initial dataset, select "Country", Years and Total
VEyears <- Venezuela[, c(1:5,7)]
#Add "Initial"" number of venezuelans per country, due to NAs present
VEmin <- VEyears %>% mutate(Initial = apply(VEyears[,2:5], 1, FUN=min, na.rm=TRUE))
#Sort largest to smallest based on "Total"
VEmin <- VEmin[order(-VEmin$Total),]
#Select top 3 countries (USA, Brazil, Peru)
Top3 <- VEmin[1:3,]
#Convert to long format
Main3 <- Top3 %>% gather("Year", "Count", 2:6)
#Convert to factor to order accordingly
Main3$Country_f = factor(Main3$Country, levels=c('USA','Brazil','Peru'))
#Faceting scatter plots
V1.2 <- ggplot(data = Main3, aes(x = Year, y = Count, size=Count))+
geom_point(alpha=0.7, colour="dodgerblue3") + facet_grid(. ~ Country_f, scales = "free")+
labs(title = "Countries with higest Proportional increase on Venezuelan Asylum Seekers", x="Year", y="Total asylum seekers")+
theme(legend.position = "none")+
geom_text(aes(label=round(Count,2)),vjust=-0.5, size=4)
V1.2
Issue 2. Venezuelans as Temporary Residents, circled map.
Fixed to be a Vertical Bar chart displaying the ten countries (as shown in original visualisation) with data regarding Venezuelan Temporary Residents. Each bar is labelled with the total number of Residents per country; sorted largest to smallest.
#Subset from original dataset columns for "Country" and "Temporary Residents".
VEtemp <- Venezuela[, c(1,8)]
#Remove NAs, keep only countries with data (as per original visualisation)
VEtemp <- na.omit(VEtemp)
#Constructing visualisation
V2 <- ggplot(data=VEtemp, aes(x=reorder(Country, -TempRes), TempRes)) + geom_bar(stat="identity", fill="dodgerblue3")+ labs(title = "Venezuelan Temporary Residents Abroad", y="Temporary Residents", x="Country")+theme(axis.text.x=element_text(angle = 45, hjust = 1))+geom_text(aes(label=round(TempRes,2)),vjust=-0.5, size=3)
V2
Issue 3. Poverty in Venezuela, stacked bar chart
Fixed to display a clustered bar chart with the different levels of Poverty (as per original visualisation). Each Poverty level has a different colour, and each bar has its value label to add precission.
#Read Poverty dataset
Poverty<- read_csv("~/MC242/Sem 2 - 2019/Data Visualisation/Assignments/VenezuelaPoverty.csv")
VEpoverty<- Poverty[, c(1,3,4)] #Subset data to Poverty and Extreme Poverty
#Convert to long format. 2 categorical, 1 value
Pov <- VEpoverty %>% gather("Level", "Percent", 2:3)
V3 <- ggplot(data = Pov, aes(x=Year, y=Percent, fill=Level))+
geom_bar(stat="identity", position = "dodge")+
labs(title = "Poverty in Venezuela (2014-2017)", y="Percent of population", x="Year")+
geom_text(aes(label=Percent), position = position_dodge(0.9), vjust=-0.2)+
scale_fill_manual(values=c("#006699", "#0099CC"))
V3
Data References
UNHCR (2019) Venezuela Situation: Responding to the needs of people displaced from Venezuela. UNHCR, The UN Refugee Agency. Supplementary Appeal, January-December 2018; page 6. Document Online. Accessed on 13 September 2019. Obtained from https://www.unhcr.org/5ab8e1a17.pdf
España, Luis Pedro & Ponce, Maria G. (2018) Encuesta sobre Condiciones de Vida en Venezuela, Febrero 2018.ENCOVI, Encuesta de https://www.ucab.edu.ve/wp-content/uploads/sites/2/2018/02/ENCOVI-2017-presentaci%C3%B3n-para-difundir-.pdf
The following charts fix the main issues in the original visualisation.
Venezuelan Asylum Seekers per country (2014-2018)
Venezuelan Temporary Residents abroad
Poverty in Venezuela (2014-2017)