Historical Unemployment rates in the Nordic countries

This chart shows the historical unemployment rate in the nordic countries as defined by IMF using their World Economic Oulook data as of October 2021.

Below is some example python code that can be used to generate this chart using the novem python library.

import pandas as pd
from novem import Plot

# get IMF World Economic Outlook
weo = pd.read_csv(
  "https://www.imf.org/-/media/Files/Publications/WEO/WEO-Database/2021/WEOOct2021all.ashx",
  encoding="windows-1252",
  sep="\t"
)

# define the nordics using IMF 3 letter codes
nordic = ['NOR','DNK','FIN','ISL','SWE']

# define our subject
subject = ['Unemployment rate']

# construct our filter
flt = pd.concat([
  pd.DataFrame(nordic),
  pd.DataFrame(subject),
], axis=1).fillna(method='pad')


flt.columns = [
  'ISO',
  'Subject Descriptor',
]

# filter data
cdata = pd.merge(weo, flt, how='inner')

# select numeric data ranges and clean up data
cdata = cdata.set_index('Country') \
  .iloc[:, 9:-1] \
  .apply(lambda x: x.apply(float), axis=1)

# transpose and filter for years we care about
data = cdata.T['1980':'2021']

# construct novem plot
sbar = Plot('imf_weo_unemployment_hist_1',
  name='Historical Unemployment rates in the Nordic countries',
  type='sbar'
)

# send data to novem
data.pipe(sbar)

# get novem url
print(sbar.url) # https://novem.no/p/2v1rV