getWIOT: Download a WIOT from the second version of the WIOD project

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/getWIOT.R

Description

This function allows you to download a World Input-Output Table (WIOT) from the 2016 release of the WIOD project for a given year. Additionally you can specify among three possible formats (wide, long, list).

Usage

1
2
getWIOT(period = 2010, format = "wide", as.DT = TRUE,
  version = "October16")

Arguments

period

the year of the WIOT

format

a character string to specify the needed format, either "wide" (default), "long" or "list". See Details for more information.

as.DT

a logical value: Should the "wide" or "long" formats be returned as data.tables? Default is TRUE.

version

for (possible further) revisions. Currently not used.

Details

If format = "wide" is chosen, the data is returned in a wide data.table. This format is the format you know from the Excel sheets (available from the WIOD homepage).

The format option "long" returns a reshaped/melted data.table.

Finally, format = "list" returns a list containing these matrices/vectors:

  1. matrix Z, the square (2464 x 2464) matrix of intermediates,

  2. matrix F, the final demand block (2464 x 220),

  3. vector x, gross output per country sector,

  4. vector v, value added per country sector,

  5. matrix va.block, the valuation block (i.e. taxes, adjustments for exports, international trade margins, etc.) and

  6. 1-element vector year, specifying the year of the WIOT.

Value

the function returns either a data.table (or data.frame when as.DT = FALSE) for the chosen formats "wide" or "long", or a list for format "list"

Author(s)

Oliver Reiter

References

Timmer, M. P., Dietzenbacher, E., Los, B., Stehrer, R. and de Vries, G. J. (2015), "An Illustrated User Guide to the World Input<e2><80><93>Output Database: the Case of Global Automotive Production". Available here.

See Also

http://www.wiod.org/database/wiots16

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
wiot.2005 <- getWIOT(period = 2005, format = "wide")

##
## get all WIOTs at once
##
## wiod.list <- list()
## for(this.year in 2000:2014) {
##   wiod.list[[as.character(this.year)]] <- getWIOT(period = this.year,
##                                                     format = "list")
##}

##
## decompose the 2005 WIOT using the WWZ decomposition
##
## library(decompr)
## wiot.2005 <- getWIOT(period = 2005, format = "list")
## industries <- 1:56
## countries <- unique(substring(names(wiot.2005$x), 1, 3))
## decomp <- decomp(x = wiot.2005$Z,
##                  y = wiot.2005$F,
##                  k = countries,
##                  i = industries,
##                  o = wiot.2005$x,
##                  V = wiot.2005$v,
##                  method = "wwz",
##                  verbose = TRUE)

zauster/wiodv2 documentation built on May 4, 2019, 9:12 p.m.