This report analyzes the top 7 countries based on GDP (2019) using Penn World Table data. It covers population, employment, GDP, and related indicators, offering insights into their comparative performance.
data <- read_excel("C:\\Users\\User\\Downloads\\pwt1001.xlsx", sheet = "Data")
# Filter 2019 data
data_2019 <- data %>%
filter(year == 2019 & !is.na(rgdpe)) %>%
arrange(desc(rgdpe))
# Select top 7 countries
top_countries <- data_2019 %>%
slice(1:7) %>%
pull(country)
# Filter data for selected countries
selected_countries_data <- data %>%
filter(country %in% top_countries & year >= 2014 & year <= 2019)
Top Economies by GDP: This table highlights the top 7 countries based on GDP in 2019. The United States, China, and Japan dominate, with the U.S. leading in both GDP and human capital (HC).
Population and Economic Disparities: While China and India have the largest populations, their economic outputs and HC levels differ significantly. India, despite its large population, shows lower GDP and HC, indicating potential for growth with better workforce development.
Economic and Workforce Comparisons: The table provides a clear comparison of how each country’s population, employment rate, and GDP are related, helping identify patterns in economic performance and labor utilization.
# Create table
table_data <- data_2019 %>%
filter(country %in% top_countries) %>%
select(country, pop, rgdpe, hc, emp, avh)
# Display interactive table
datatable(table_data, options = list(pageLength = 10))
Dominance of China and India: The treemap emphasizes the massive populations of China and India, where China’s population is the largest by far. These countries hold a significant share of the world’s population.
Smaller Economies’ Contribution: Countries like Japan and Germany have smaller population sizes but remain highly influential in global economic terms due to their high GDP and HC.
Visualizing Population Distribution: This treemap clearly shows that population size is not always directly correlated with economic power—China and India have vast populations but still face challenges in maximizing their economic potential per capita.
# Treemap for population
treemap(
data_2019 %>% filter(country %in% top_countries),
index = "country", # Defines the label (country names)
vSize = "pop", # Defines the size of each rectangle (population)
vColor = "pop", # Optional: color by population (to add depth)
type = "value", # Type of color scale
title = "Population Proportion of Top 7 Countries (2019)",
palette = "Pastel2", # Color palette
fontsize.labels = 14 # Font size for labels
)
High Employment Rates in Developed Nations: Countries like the United States and Japan have high percentages of their populations employed, reflecting strong labor market integration and efficient utilization of human resources.
India’s Lower Employment Rate: India shows a significantly lower percentage of its population employed, which could point to structural issues such as underemployment or the informal economy, reducing its potential economic output.
Employment Efficiency: This bar chart allows for easy comparison of how different countries perform in terms of workforce participation, providing insights into the effectiveness of labor markets in these nations.
# Calculate percentage of population employed
bar_chart_data <- data_2019 %>%
filter(country %in% top_countries) %>%
mutate(percent_employed = (emp / pop) * 100)
# Bar chart for percentage employed
ggplot(bar_chart_data, aes(x = reorder(country, -percent_employed), y = percent_employed, fill = country)) +
geom_bar(stat = "identity", show.legend = FALSE) +
labs(
title = "Percentage of Population Employed (2019)",
x = "Country",
y = "Percentage Employed"
) +
theme_minimal()
High HC and GDP Relationship: Countries like the United States and Germany exhibit both high human capital and GDP, indicating a strong correlation between workforce quality and economic output.
Population Size: Larger bubbles, such as for China and India, highlight their immense populations. However, India has lower human capital, pointing to untapped potential for growth.
Outliers: Countries with similar GDPs but differing HC values suggest varying efficiencies in converting human capital into economic output.
This visualization effectively illustrates the balance between human capital development and economic prosperity, with population providing additional context.
# Step 5: Visualization 4 - Bubble Chart Comparing HC and GDP (2014–2019)
# Prepare the data for the bubble chart
bubble_chart_data <- selected_countries_data %>%
group_by(country) %>%
summarise(
avg_hc = mean(hc, na.rm = TRUE), # Average Human Capital
avg_gdp = mean(rgdpe, na.rm = TRUE), # Average GDP
pop_2019 = mean(pop[year == 2019], na.rm = TRUE) # Population in 2019 for bubble size
)
# Create the Bubble Chart
ggplot(bubble_chart_data, aes(x = avg_hc, y = avg_gdp, size = pop_2019, fill = country)) +
geom_point(alpha = 0.8, shape = 21, color = "black") +
scale_size_continuous(name = "Population (2019)", range = c(5, 20)) + # Bubble size range
scale_fill_brewer(palette = "Set3") + # Color palette for countries
scale_y_continuous(labels = scales::comma, limits = c(0, max(bubble_chart_data$avg_gdp) * 1.1)) + # GDP axis
scale_x_continuous(labels = scales::number_format(accuracy = 0.01), limits = c(2, max(bubble_chart_data$avg_hc) * 1.1)) + # HC axis
labs(
title = "Comparison of Human Capital vs. GDP (2014–2019)",
x = "Average Human Capital (HC)",
y = "Average GDP (in millions)",
size = "Population (2019)",
fill = "Country"
) +
theme_minimal() +
theme(
plot.title = element_text(hjust = 0.5, size = 16, face = "bold"),
axis.title = element_text(size = 14),
legend.title = element_text(size = 12),
legend.text = element_text(size = 10)
)