io_tidy_wiot | R Documentation |
Converts raw WIOT table(s) from the 2016 release of the World Input Output Database, usually obtained by a call to io_load_wiot, into a long format tibble, i.e. a 'tidy' data frame.
io_tidy_wiot(wiot)
wiot |
A |
Returns one tibble
with the WIOT tables converted to a long
format
io_load_wiot
for (down)loading WIOT tables
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.