#Task A
library(ggplot2)
library(tidyr)
gdp_filtered <- subset(gdp_data, `UNIT/TIME` >= 2000 & `UNIT/TIME` <= 2017)
gdp_long <- pivot_longer(gdp_filtered,
cols = c("GDP in current prices, million euro", "Real GDP in constant (2010) prices, million euro"),
names_to = "Type",
values_to = "GDP")
gdp_long$`UNIT/TIME` <- as.numeric(gdp_long$`UNIT/TIME`)
ggplot(gdp_long, aes(x = `UNIT/TIME`, y = GDP, color = Type, group = Type)) +
geom_line(linewidth = 1.2) +
scale_x_continuous(breaks = seq(2000, 2017, by = 3)) +
labs(title = "GDP Trends in Slovenia (2000–2017)",
x = "Year",
y = "GDP (Million EUR)",
color = "GDP Type") +
theme_minimal()
Slovenia’s GDP steadily grew from 2000 to 2017, with a dip during the 2009 financial crisis and a sharper rise in nominal GDP after 2013 due to inflation.
#Task B Chain index: GDPt/GDPt-1( X100).
GDP 2007 = 35,152.6 million EUR GDP 2008 = 37,951.2 million EUR Chain Index2008= (37951.2/35152.6)×100=107.95 An increase around 7.95%
GDP 2015 = 38,863.3 million EUR GDP 2016 = 40,357.2 million EUR Chain Index2016= (40357.2/38863.3)×100=103.84 An increase around 3.84%
#Task C GDP in 2005 = 29,643.2 million EUR GDP in 2015 = 38,863.3 million EUR Chain index: GDPt/GDPt-1( X100).
Index2015=(38,863.3/29,643.2)×100=131.07
In a decade, Slovenia’s GDP rose by 31.07%
#Task D Growth Rate𝑡=(GDP𝑡−GDP𝑡−1/GDP𝑡−1)×100 Nominal GDP (Current Prices): 2015 → 2016 2015: 38,863.3 million EUR 2016: 40,357.2 million EUR Growth Rate Nominal (40,357.2−38,863.3/38,863.3)×100=3.84%
Real GDP (Constant 2010 Prices): 2015 → 2016 2015: 34,582.6 million EUR 2016: 35,646.3 million EUR Growth Rate Real (35,646.3−34,582.6/34,582.6)×100=3.08%
Nominal GDP grew by 3.84% Real GDP grew by 3.08% So, nominal GDP is growing faster. The difference comes from inflation: Nominal GDP includes price changes — so if prices rise, nominal GDP increases even if output stays the same. Real GDP adjusts for inflation — it reflects actual economic output. So the faster growth in nominal GDP suggests that price levels increased, boosting the monetary value of GDP beyond real production.
#Task E In 2015, Slovenia’s nominal GDP was 38,863.3 million EUR and real GDP was 34,582.6 million EUR, so dividing 38,863.3 by 34,582.6 gives approximately 1.124 — meaning nominal GDP was about 12.4% higher than real GDP due to price growth.