gcubed.io_data
This module contains the IOData
class for input/output table access.
The tax row label.
The labor row label.
The capital row label.
The consumption column label.
The investment column label.
The government spending column label.
The exports column label.
The imports column label.
The list of non-sector uses in the IO tables.
The list of non-sector inputs in the IO tables.
Overview
This class manages loading and provision of IO table information.
It encapsulates all of the information about the input/output tables for each region.
Arguments
sym_data
: The information about the SYM model definition.
This argument also provides access to the model configuration so that the location of the CSV file containing the IO tables data is known.
CSV file format
The
Each region has an Input/Output table.
The Input/Output tables are stacked vertically in the Input/Output tables file.
The first column of the IO table, with the
<REGION_CODE>
in the first cell, must be in the first column of the CSV file.
Each Input/Output table has the following structure, repeated down the file for each region:
<REGION_CODE> |
a01 | … | a0N | C | I | G | X | M |
---|---|---|---|---|---|---|---|---|
g01 | ||||||||
: | ||||||||
g0N | ||||||||
L | ||||||||
K | ||||||||
TAX |
The region code
The first row and the first column of the table are labels for the rows and columns respectively.
Columns of the table describe 'uses' by a particular sector or for one of the following:
- Consumption -
C
- Investment -
I
- Government spending -
G
- Exports -
X
- Imports -
M
The sector labels must be the sector identifiers in the set of sectors in the
SYM model definition. Typically these are a01
for sector 1 etc.
Rows of the table describe 'inputs' by type of sectoral good (service) produced or:
- Labour -
L
- Capital -
K
- Tax -
TAX
The goods labels must be the good identifiers in the set of goods in the
SYM model definition. Typically these are g01
for sector 1 etc.
Overview
Use this function to retrieve the IO table content for a single region. That IO table can then be analysed using the input (row) index and the output (column) label for the rows and columns of the dataframe that is the IO table.
Arguments
region
: the identifier for the region of interest.
Returns
The dataframe containing the input/output table for the specified region.
Overview
Checks if there is an IO table for the given region.
Arguments
region
: The region of interest.
Returns
True
if there is an IO table for the specified region and False
otherwise.
The row names (one per input) in the IO tables. All regions have the same rows in their IO tables.
The column names, one column for each output in the IO tables. The IO table has the same columns for each region.
Returns
The IO tables as a a single dataframe.
The dataframe has a single column index that is the IO table uses.
The dataframe has a row multi-index with:
- level 0 being the region
- level 1 being the IO table inputs