Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The chosen visualisation was obtained from patient info website. Patient info is a website that connects users to knowledge that improves their health., so i expect the visualisation may have been designed to show the global health trends and how height is connected to life expectancy, disease and even financial and academic achievements. The intended objective of original data visualisation is to give a general overview of the average height of males in various nations as well as some of the variables that could affect height.
The target audience is anyone who is interested in learning more about the factors that affect physical development or who are curious about global health trends, like doctors, researchers, policy makers, general people, students. It can also be of interest to people who are self-conscious about their height or curious to learn more about the possible health effects of being shorter or taller than usual.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(ggplot2)
library(dplyr)
library(readr)
# Load data
height_country <- read_csv("C:/Users/atul dahiya/Downloads/NCD_RisC_Lancet_2020_height_child_adolescent_country/NCD_RisC_Lancet_2020_height_child_adolescent_country.csv")
# Filter data for boys, age 18, and select countries
hC2 <- height_country %>%
filter(Year == 2018, Sex == "Boys", `Age group` == "18",
Country %in% c("Netherlands", "United Kingdom", "United States of America", "India", "Indonesia")) %>%
# Recode long country names to abbreviations
mutate(Country = recode(Country, "United Kingdom" = "UK", "United States of America" = "USA")) %>%
# Calculate mean height for each country
group_by(Country) %>%
summarise(mean_height = mean(`Mean height`))
# plot graph
plot_height <- ggplot(data = hC2, aes(y = mean_height, x = Country )) +
geom_bar(fill = "#3F3FD4", stat = "identity" ) +
geom_text(color = "#FFFFFF", size = 5 ,aes(label = round(mean_height, digits = 1)), vjust = 1.5 ) +
theme_minimal() +
theme(
plot.title = element_text(hjust = 0.7, size = 18, face = "bold"),
plot.subtitle = element_text(hjust = 0.7, size = 14),
plot.caption = element_text(hjust = 0.9, face = "bold"),
axis.text.x = element_text(size = 13, color = "#000000"),
axis.title.x = element_text(size = 15, color = "#000000", face = "bold"),
axis.text.y = element_text(size = 13, color = "#000000"),
axis.title.y = element_text(size = 15, color = "#000000", face = "bold"),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "#FFFFFF", color = "#000000"),
panel.border = element_rect(fill = NA, color = "#000000", size = 1)
) +
labs(
title = "Male Height per Country (Average)",
subtitle = "Mean height for individuals born in 2018 at age 18",
x = "Country",
y = "Height (cm)",
caption = "Source of the data: NCD Lancet 2020 height nation") +
coord_cartesian(ylim = c(0, 200))
Data Reference
The following plot fixes the main issues in the original. In the reconstructed plot, i tried to solve the issues in original visualisation. For instance, I provided the source of data as well as the measure for average height is mean height. Secondly, i change the male gender sign with a bar chart and take a single color instead of different shades of blue color. Lastly, i choose centimeter (cm) as unit of measurement and specify it on y-axis.