Labour productivity in OECD countries

Posted on sam. 31 octobre 2020 in Economics • 2 min read

Labour productivity in G7 countries


According to OECD, gross domestic product (GDP) is the standard measure of the value added created through the production of goods and services in a country during a certain period.

GDP per hour worked measures the productivity of labor, and the efficiency with which labor input and other factors of production are used in the production process. The labor factor is the total number of hours worked by all the individuals involved in production.

What is the evolution of labour productivity for G7 countries over the years ?

Import required libraries

In [1]:
import pandas as pd
import numpy as np
import plotly.express as px
import plotly.io as pio
import plotly.graph_objects as go
from IPython.display import Javascript
from plotly.subplots import make_subplots

Javascript(
"""require.config({
 paths: { 
     plotly: 'https://cdn.plot.ly/plotly-latest.min'
 }
});"""
)

pio.renderers.default = 'notebook_connected'

Data pre-processing

In [2]:
df_gdp_hour_worked = pd.read_csv('Data/GDP_per_hour_worked_indicator.csv', 
                              sep=',', 
                              usecols=['LOCATION', 'Country', 'TIME', 'Value'],
                              parse_dates=True
                             )

df_gdp_hour_worked = df_gdp_hour_worked.sort_values('Value', ascending=False)

df_gdp_hour_worked = df_gdp_hour_worked.drop(df_gdp_hour_worked[df_gdp_hour_worked['LOCATION']=='EU27_2020'].index)

df_gdp_hour_worked.head()
Out[2]:
LOCATION Country TIME Value
580 IRL Ireland 2020 121.751868
784 LUX Luxembourg 2020 111.758087
579 IRL Ireland 2019 109.617670
783 LUX Luxembourg 2019 106.010826
782 LUX Luxembourg 2018 105.443137

Plotting

Bar plot

In [3]:
fig_bar = px.bar(df_gdp_hour_worked.query("TIME==2020"), 
             x="Country", 
             y="Value", 
             hover_name="Country", 
             color="Value",
             color_continuous_scale=px.colors.sequential.Magenta, 
             labels={'Value':'GDP ($/hour worked)', 'Country':''}, 
             title="<b>Contribution to GDP in USD per person and hour worked in 2020 in a selection of countries</b><br>" + 
             "<i>Source : OECD</i>"
            )

fig_bar.update_coloraxes(showscale=False)

# Style
fig_bar.update_layout(
    font_family='Helvetica',
    font_color='grey',
    font_size=12,
    title_font_size=20,
    xaxis_tickangle=-45
)

fig_bar.show()

Scatter plot

Now, let's see the evolution of labour productivity for a selection of countries over the years.

In [4]:
df_gdp_hour_worked_scatter = df_gdp_hour_worked.sort_values(by=['TIME', 'LOCATION'], ascending=True)
             
df_gdp_hour_worked_scatter.head()
Out[4]:
LOCATION Country TIME Value
0 AUS Australia 1970 5.762347
77 BEL Belgium 1970 5.261655
128 CAN Canada 1970 6.067352
1175 CHE Switzerland 1970 7.462724
360 DEU Germany 1970 4.838160
In [5]:
df_gdp_hour_worked_us = df_gdp_hour_worked_scatter.query("Country == 'United States'")
df_gdp_hour_worked_fr = df_gdp_hour_worked_scatter.query("Country == 'France'")
df_gdp_hour_worked_ca = df_gdp_hour_worked_scatter.query("Country == 'Canada'")
df_gdp_hour_worked_uk = df_gdp_hour_worked_scatter.query("Country == 'United Kingdom'")
df_gdp_hour_worked_de = df_gdp_hour_worked_scatter.query("Country == 'Germany'")
df_gdp_hour_worked_it = df_gdp_hour_worked_scatter.query("Country == 'Italy'")
df_gdp_hour_worked_jp = df_gdp_hour_worked_scatter.query("Country == 'Japan'")
In [6]:
fig_scatter = go.Figure(data=[
    go.Scatter(
        name='United States',
        x=df_gdp_hour_worked_us['TIME'], 
        y=df_gdp_hour_worked_us['Value'],
        marker_color=df_gdp_hour_worked_us['Value'],
        text=df_gdp_hour_worked_us['Country']
    ),
    
    go.Scatter(
        name='France',
        x=df_gdp_hour_worked_fr['TIME'], 
        y=df_gdp_hour_worked_fr['Value'], 
        marker_color=df_gdp_hour_worked_fr['Value'], 
        text=df_gdp_hour_worked_fr['Country']
    ),
    
    go.Scatter(
        name='Canada',
        x=df_gdp_hour_worked_ca['TIME'], 
        y=df_gdp_hour_worked_ca['Value'], 
        marker_color=df_gdp_hour_worked_ca['Value'], 
        text=df_gdp_hour_worked_ca['Country']
    ),
    
    go.Scatter(
        name='United Kingdom',
        x=df_gdp_hour_worked_uk['TIME'], 
        y=df_gdp_hour_worked_uk['Value'], 
        marker_color=df_gdp_hour_worked_uk['Value'], 
        text=df_gdp_hour_worked_uk['Country']
    ),   
    
    go.Scatter(
        name='Germany',
        x=df_gdp_hour_worked_de['TIME'], 
        y=df_gdp_hour_worked_de['Value'], 
        marker_color=df_gdp_hour_worked_de['Value'], 
        text=df_gdp_hour_worked_de['Country']
    ), 
    
    go.Scatter(
        name='Italy',
        x=df_gdp_hour_worked_it['TIME'], 
        y=df_gdp_hour_worked_it['Value'], 
        marker_color=df_gdp_hour_worked_it['Value'], 
        text=df_gdp_hour_worked_it['Country']
    ),
    
    go.Scatter(
        name='Japan',
        x=df_gdp_hour_worked_jp['TIME'], 
        y=df_gdp_hour_worked_jp['Value'], 
        marker_color=df_gdp_hour_worked_jp['Value'], 
        text=df_gdp_hour_worked_jp['Country']
    ),
])


#Style
fig_scatter.update_layout(
    title='<b>Contribution to GDP per person and hour worked in G7 countries from 1970 to 2020 in USD</b><br>' + 
    '<i>Source : OECD</i>',
    font=dict(
        family='Helvetica',
        size=14,
        color='grey'
    ),
    legend=dict(
        x=0.825,
        y=0,
        bgcolor='rgba(255, 255, 255, 0)',
        bordercolor='rgba(255, 255, 255, 0)'
    ),
    yaxis=dict(
        title='GDP ($/hour worked)'
    )
)

fig_scatter.show()

Sources

OCDE.Stat data :