Download standard input–output (IO) and related tables. At the moment,
only Eurostat products are supported. You usually do not need to call
this directly; iotable_get() will invoke it as needed and return a
filtered, tidy table.
Arguments
- source
Character. The Eurostat product code (see above) or
"uk_2010".- data_directory
Optional directory path where the processed nested tables will be saved as
"<source>_processed.rds". IfNULL(default), results are saved totempdir().- force_download
Logical. If
FALSE(default), reuse a cached file indata_directoryortempdir()when available. IfTRUE, force a fresh download from Eurostat.
Value
A nested data.frame (one row per IO table) with metadata columns
(geo, unit, year, stk_flow, etc.) and a list-column data
containing the tidy table for each combination.
Details
Files are cached under tempdir() as RDS (e.g., "naio_10_cp1750.rds").
The temporary directory is cleared when the R session ends. To persist
downloads across sessions (recommended for analytics), supply
data_directory and the processed, nested output will also be
written there as "<source>_processed.rds".
Supported Eurostat products include (non-exhaustive):
naio_10_cp1700— Symmetric IO table, basic prices (product × product)naio_10_pyp1700— Same, previous years’ pricesnaio_10_cp1750— Symmetric IO table, basic prices (industry × industry)naio_10_pyp1750— Same, previous years’ pricesnaio_10_cp15— Supply table at basic prices incl. margins/taxesnaio_10_cp16— Use table at purchasers’ pricesnaio_10_cp1610— Use table at basic pricesnaio_10_pyp1610— Use table at basic prices (previous years’ prices)naio_10_cp1620— Trade and transport margins at basic pricesnaio_10_pyp1620— Trade and transport margins at previous years’ pricesnaio_10_cp1630— Taxes less subsidies on products at basic pricesnaio_10_pyp1630— Taxes less subsidies on products, prev. years’ pricesuk_2010— United Kingdom IO Analytical Tables (handled internally)
Eurostat API/format changes (e.g., TIME_PERIOD vs time) are handled
for backward compatibility.
See also
Other import functions:
airpol_get(),
employment_get(),
iotables_metadata_get(),
iotables_read_tempdir()
Examples
# \donttest{
io_tables <- iotables_download(source = "naio_10_pyp1750")
#> Table naio_10_pyp1750 cached at C:\Users\DANIEL~1\AppData\Local\Temp\RtmpSeC1Nd/eurostat/d7fe4dbf5ff51114a5dde14ae27de3d2.rds
#> Saving 114 input-output tables into the temporary directory.
#> Saved the raw data of this table type in temporary directory C:\Users\DANIEL~1\AppData\Local\Temp\RtmpSeC1Nd/naio_10_pyp1750_processed.rds.
# }
