Pre-processing and basic analytical tasks related to working with Eurostat's symmetric input-output tables and provide basic input-output economics calculations. The package is part of rOpenGov < http://ropengov.github.io/> to open source open government initiatives.
The symmetric input-output tables (SIOTs) are complex statistical products that present inter-related statistics in a predefined structure. They are often found in spreadsheets that follow this structure, or in the case Eurostat in a data repository. In both cases they in reproducible research must be downloaded and restructured to programmatically accessible form. Often these highly structured statistics need to be analyzed together with other data, for example, when employment effects and multipliers are calculated. In this case processing the employment data to SIOT conforming format is a significant preprocessing challenge.
The iotables are exactly designed for these tasks. Currently the package downloads and processes standardized European SIOTs conforming to the latest statistical regulations, i.e. SIOTs starting from the year 2010.
The aim of this introduction is not to introduce input-output economics, or SIOTs in detail. The Eurostat Manual of Supply, Use and Input-Output Tables and the Eurostat tematic page [Eurostat Manual] in the documentation should be consulted for further information about the data and the metadata.
In order to test the analytical functions of the package and to have a manageable sized example data set, we use the real-life data from the Eurostat manual. The
germany_1990 dataset is a simplified 6x6 sized SIOT taken from the Eurostat SIOT manual (page 481). The package function examples can be checked against publisehd results from Jörg Beutel. These calculations can be followed in the Germany 1990 vignette.
The calculation of induced effects (Type-II multipliers) are following the Input-Output Multipliers Specification Sheet and Supporting Material, Spicosa Project Report. The analytical functions are tested against this example, too.
You can install iotools from CRAN or the latest development version with github:
install.packages("iotables")devtools::install_github("rOpenGov/iotables")#devtools::install_github("rOpenGov/iotables", build_vignettes = TRUE)
You can follow changes on the NEWS.md file.
Eurostat's data can be downloaded in several tidy, long-form, files, and a lot of filtering is needeed to start working with it.
Currently the following Eurostat SIOTs can be used:
product x product SIOTs
industry x industry SIOTs
use tables at basic prices
trade and transport margins
net taxes less subsidies
Supply table at basic prices incl. transformation into purchasers' prices (naio_10_cp15) and Use table at purchasers' prices (naio_10_cp16).
cp element refers to basic prices and the
pyp to previous years' prices.
Given the complexity of the data used by the package, probably the use of the vignettes is needed to get a start.
The Germany 1990 vignette presentes most of the examples of the Eurostat Manual of Supply, Use and Input-Output Tables (Eurostat Manual, Chapter 15.) This is a good introduction to understand what will the functions do, and to check that they work correctly. The
testthat infrastructure of the package checks the proper working of the functions against the published results from the Eurostat Manual.
The Working with Eurostat Data vignette shows how you can download, pre-process and use real data from Eurostat.
The United Kingdom Input-Output Analytical Tables 2010 are used for testing the
iotables package, because they are well-documented and detailed, organized data is available with them. These calculations can be followed in the United Kingdom Input-Output Analyitcal Tables vignette.
NEWS.mdfile to track changes to the package.
New functions are added which enable a very simple IO analysis. As an important milestone, an analytical solution comparable to the Eurostat manual, the German employment indicators are correctly calculated (see
input_indicator_create()creates the indicators.
equation_solve()solves the basic input-output equations on real-life data, i.e. correctly prepared the two sides of the equation product- or industrywise.
multiplier_create()is a wrapper around the more general
READMEcontains examples to use this new functions.
employment_aggregate()helper function to match SIOT data with non-conforming employment statistics.
The forthcoming update will rewrite and generalize some of the earlier functions. In particular, the following features will be available:
At this point I will go with preparing a release the table on CRAN. The current version builds without warnings or notes on Windows and Linux.
iotables 0.2 is moved to rOpenGov.
naio_10_cp1620(trade and transport margins) or
naio_10_cp1630(net taxes) with the parameter
stk_flow="TOTAL". Correctly builds on Windows and Mac OS (old and release version) but problem with the dependency
eurostatin Linux on Travis.
Default data directory for faster programmatic use and phasing out discountinued Eurostat statistics. A bit improved messages and documentation.
Handles tables with purchasers' prices. Imports Eurostat employment data.
Error corrected concerning creation of temporary files on non-Windows environments. No uses
file.path() to create platform-independent files. Released on CRAN.
use_table_get(). Released on CRAN.
equation_solve(). Removes trivial erroneous, all-zero columns. Efficiency gains in indicator and multiplier creation. New function to create backward linkages. Released on CRAN.
direct_effects()which calculates all input indicators that
iotable_year_get()which returns the available tables by year or time from the bulk database for a given country and currency unit.
Use table at basic prices(naio_10_cp1610 and naio_10_pyp1610),
Supply table at basic prices incl. transformation into purchasers' prices(naio_10_cp15),
Use table at purchasers' prices(naio_10_cp16) after correcting a vocabulary error.
coefficient_matrix_create()which is a more general version of
input_coefficient_matrix_create()and will eventually replace that function.
data(netherlands_2006), terminology and analytical improvements following Input-Output Multipliers Specification Sheet and Supporting Material, Spicosa Project Report. Results are checked against the publication.
direct_supply_effects_create()function is renamed
effects_create()currently refers to the function returning direct effects of a change in demand.
multipliers_create()refers to the function returning direct and indirect effects of a change in demand.
input_indicator_create()has a new, optional parameter for naming the new indicators in the key column.
This is a much improved, simplified pre-release version, with highly improved performance, more consistent function interface and far more readable code. The last CRAN release is stable, the following version will be a stable, better release candidate.
output_get()is now a wrapper around
gva_get()is completely deprecated.
input_coefficient_matrix_create()is now a wrapper around the more general
use_table_get()function is now named
input_flow_get()but it is seldom used, as the analytical function will call it as needed.
supplementary_add()can add a supplementary account or row to the table, useful to add employment data, for example.
total_tax_add()adds a summary of product and production taxes among the primary inputs.
input_multiplier_create()create the direct, indirect and total effects matrix.
New vignette United Kingdom Input-Output Analyitcal Tables to compare analytical function results with published results from the UK National Office for Statistics.
A small formatting error in the documentation of
netherlands_2006 threw up a note on CRAN.
On CRAN 0.4.1 passed early tests, but on deployment it
turned out that a dependency is not available for i386-pc-solaris2.10 (32-bit). This dependency is
magick, which was supposed to help printing vignettes in Word (a very rare case) for
kableExtra is not available on Solaris. I removed this dependency.