Filter and reshape one IO/SUT table from a bulk dataset (typically a
Eurostat download). In most workflows you will call this function
rather than iotables_download(), which it invokes as needed.
Usage
iotable_get(
labelled_io_data = NULL,
source = "germany_1995",
geo = "DE",
year = 1990,
unit = "MIO_EUR",
stk_flow = "DOM",
labelling = "iotables",
data_directory = NULL,
force_download = TRUE
)Arguments
- labelled_io_data
Optional nested bulk data as returned by
iotables_download(). IfNULL(default), data are retrieved from cache or downloaded.- source
Data source code (see list above).
- geo
Country code or name, e.g.
"SK"or"Slovakia".- year
Numeric year. Defaults to
1990forgermany_1995.- unit
Currency unit, usually
"MIO_NAC"or"MIO_EUR".- stk_flow
Stock/flow:
"DOM","IMP", or"TOTAL". For margins/taxes (cp1620,cp1630andpypvariants) only"TOTAL"is used; other inputs are coerced with a warning.- labelling
Column naming scheme:
"iotables"(default) for consistent names;"short"for original short codes;"eurostat"is treated as"short".- data_directory
Optional directory to save the processed wide table (RDS). If
NULL, nothing is saved.- force_download
Logical. If
TRUE, force a fresh download whenlabelled_io_datais not supplied. Defaults toTRUE.
Value
A wide data.frame representing the selected IO table, with a key
column followed by ordered numeric columns.
Details
The Eurostat bulk tables arrive in long form and are not ordered for
matrix algebra. This function selects the requested country (geo),
year, unit and stock/flow (stk_flow), joins iotables metadata for
consistent row/column labelling, and returns a wide table ready
for analysis.
Supported sources include:
naio_10_cp1700— symmetric IO, basic prices (prod × prod)naio_10_pyp1700— previous years' pricesnaio_10_cp1750— symmetric IO, basic prices (ind × ind)naio_10_pyp1750— previous years' pricesnaio_10_cp15— supply at basic prices incl. margins/taxesnaio_10_cp16— use at purchasers' pricesnaio_10_cp1610— use at basic pricesnaio_10_cp1620— trade & transport margins (basic prices)naio_10_cp1630— taxes less subsidies on products (basic prices)naio_10_pyp*— corresponding previous years' prices variantsgermany_1995— packaged Beutel examplecroatia_2010_1700/1800/1900— packaged examplesuk_2010_*— packaged UK 2010 variants
