io_load_wiot: Load IO tables from the WIOD

View source: R/io_load_wiot.R

io_load_wiotR Documentation

Load IO tables from the WIOD

Description

Function to load the set of world input output tables (wiot) made available by the World Input Output Database's (WIOD) 2016 release.

Usage

io_load_wiot(cache_dir = NULL, years = 2000:2014, quiet = FALSE)

Arguments

cache_dir

path to read the WIOD data from. If the necessary files are not found in this location, they will be downloaded using io_dl_wiot

years

which year(s) to load. Must be a single value or vector of values between 2000 and 2014

quiet

if TRUE will try to avoid printing messages

Value

Returns one data.frame combining wiots from all requested years from the WIOD's 2016 release

References

Timmer, M. P., Dietzenbacher, E., Los, B., Stehrer, R. and de Vries, G. J. (2015), "An Illustrated User Guide to the World Input–Output Database: the Case of Global Automotive Production", Review of International Economics., 23: 575–605, www.wiod.org

Examples

## Not run: 

library(iotr)

# set cache_dir for WIOD to avoid long download times on every run !!!
cache_dir <- NULL

wiot_raw <- io_load_wiot(cache_dir, years = 2000:2014)

wiot_long <- io_tidy_wiot(wiot_raw)

# get wiot into standard long IO-table format
iot <- dplyr::filter(wiot_long, Country != "TOT", Year == "2014")
iot <-
  dplyr::select(iot,
                origin = Country,
                sector = RNr,
                destination,
                use,
                flow)

iot <- io_rm_negative_vad(iot, category_to_scale = 57)

iot <-
  io_rm_dynamics(iot,
                 dynamic_categories = c(60, 61),
                 category_to_scale = 57)

iot <- io_gen_own_trade(iot, max_replace = 1e-6)


## End(Not run)

okrebs/iotr documentation built on Aug. 22, 2023, 12:06 p.m.