Analyzing German economy in R: 2000–2019 indicator analysis

Analyzing German GDP, consumption, import/export and capital formation in RStudio

Linnart Felkl M.Sc. ETH
Analytics Vidhya
6 min readJan 2, 2020

--

Photo by Ansgar Scheffold on Unsplash

Using OECD data I analyze key economic indicators for Germany. I summarize key developments in Germany up until this year`s stagnation and recession. Our period of analysis is 2000–2018. In particular, I find that: — During 2000 to 2018 strong and stable gdp strong growth can be observed, except during 2009 to 2010 — Growth in German household consumption expenditure was positive during all years — Gross capital formation was negative up until 2006 and has, except during 2009 to 2010 crisis, developed along path of rapid growth — Strong raises in wages and salaries can be observed up until 2018, which might have driven stable growth in consumption

Our results suggest that positive trends in German consumption contributes to novel stabilization of previously primarily export-oriented German economy. Nevertheless, strong and steadily increasing growth rate in German salaries and wages poses risk for historically strong German exports but may contribute further to strong consumption growth.German GDP development (measured with output method)

During entire period from 2000 to 2018 Germany enjoyed strong GDP growth, except in 2009 (global crisis). Post 2009 crisis development was very positive, in fast surprisingly positive. German economy was performing beyond expectations and forecasts.

library(ggplot2)# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == "B1_GA")) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), col = "darkgreen", fill = "darkgreen") +
ggtitle("German GDP development since 2000, measured by output in billions EUR") + ylab("gross domestic product [billions of EUR]") +
xlab("Year")
Fig. 1: gross domestic development in Germany, since 2000

Development in German goods and service exports vs imports

GDP growth during 2000–2018 period was driven by strong exports; in some years growth trend in exports even exceeded gdp growth.

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P6"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("German exports of goods and services, in billions of EUR") + ylab("exports of goods and services [billions of EUR]") +
xlab("Year")
Fig. 2: german export development since 2000

Imports of goods and services where growing slowly around 2010, but in 2017 and 2018 imports grew strongly.

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P7"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("German imports of goods and services, in billions of EUR") + ylab("imports of goods and services [billions of EUR]") +
xlab("Year")
Fig. 3: import development in Germany since 2000

Imports and exports of goods only: Development since year 2000

Export of goods was quick to rise after 2010. Export of goods grew at somewhat steady pace between 2010 and 2019.

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P61"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("German exports of goods only, in billions of EUR") + ylab("exports of goods only [billions of EUR]") +
xlab("Year")
Fig. 4: goods only export development in Germany since 2000

While growth in imports was steady and strong between after 2009-crisis, imports of goods was stagnating after 2010 and merely grew strongly in 2017 and 2018.

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P71"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("German imports of goods only, in billions of EUR") + ylab("imports of goods only [billions of EUR]") +
xlab("Year")
Fig. 5: goods only import development in Germany since 2000

Developments in German household consumption expenditure after 2010

Throughout all years, final German household consumption expenditure grew steadily (stagnation merely during 2008–2010):

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P31S14"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("German household consumption expenditure, in billions of EUR") + ylab("household consumption expenditure [billions of EUR]") +
xlab("Year")
Fig. 6: household consumption expenditure development in Germany since 2000

Was growth in German consumption driven by growht in wages and salaries?

For a long time salaries and wages increased only slightly. Nevertheless, labour costs increased rapidly towards end of period (2017, 2018).

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("D11"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("Wages and salaries, in billions of EUR") + ylab("wages and salaries [billions of EUR]") +
xlab("Year")
Fig. 7: wage and salary development in Germany since 2000

Finally: Analysis of gross capital formation development during 2000–2019 period:

Gross capital formation deviated from positive trend in gross domestic product up until 2006. During 2006–2007 gross capital formation finally catched up but suffered major blow-back during 2009–2010 crisis. Since then, strong yearly growth in German gross capital formation took place.

# The following TRANSACT keys will be relevant for filtering:
# B1_GA: GDP measured with output approach
# P6: Exports of goods and services
# B11: External balance of goods and services
# D11: Wages and salaries
# P7: Imports of goods and services
# P61: Exports of goods
# P71: Imports of goods
# P31S14: Final consumption expenditure of households
# P5: Gross capital formation
ggplot(filter(data_df,TRANSACT == c("P5"))) +
geom_col(mapping = aes(x = obsTime,y = obsValue/1000), fill = "darkgreen", color = "darkgreen") +
ggtitle("Gross capital formation, in billions of EUR") + ylab("gross capital formation [billions of EUR]") +
xlab("Year")
Fig. 8: gross capital formation development in Germany since 2000

For more on OECD data analysis in R visit SupplyChainDataAnalytics.com

--

--