Extension.plot_account(row, per_capita=False, sector=None, file_name=False, file_dpi=600, population=None, **kwargs)

Plots D_pba, D_cba, D_imp and D_exp for the specified row (account)

Plot either the total country accounts or for a specific sector, depending on the ‘sector’ parameter.

Per default the accounts are plotted as bar charts. However, any valid keyword for the pandas.DataFrame.plot method can be passed.


This looks prettier with the seaborn module (import seaborn before calling this method)

  • row (string, tuple or int) – A valid index for the row in the extension which should be plotted (one(!) row - no list allowed)
  • per_capita (boolean, optional) – Plot the per capita accounts instead of the absolute values default is False
  • sector (string, optional) – Plot the results for a specific sector of the IO table. If None is given (default), the total regional accounts are plotted.
  • population (pandas.DataFrame or np.array, optional) – Vector with population per region. This must be given if values should be plotted per_capita for a specific sector since these values are calculated on the fly.
  • file_name (path string, optional) – If given, saves the plot to the given filename
  • file_dpi (int, optional) – Dpi for saving the figure, default 600
  • **kwargs (key word arguments, optional) – This will be passed directly to the pd.DataFrame.plot method

Return type:

Axis as given by pandas.DataFrame.plot, None in case of errors