Description Usage Arguments Examples
Plot a sankey diagram, using the D3 library networkD3
| 1 | plotsankey(linksandnodes, value = "tradevalue", units = "K€")
 | 
| linksandnodes | a list containing 2 dataframes: links and nodes | 
| value | the value to be displayed in the sankey diagram, a column in linksandnodes$links | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: 
con <- RMariaDB::dbConnect(RMariaDB::MariaDB(), dbname = "tradeflows")
wood <- tbl(con, "vld_comext_monthly") %>% 
   filter(productcode ==  44072199 & 
              flowcode == 1 & 
              period == "201708") %>% 
   # head(200) %>% 
   collect()
reporter <- tbl(con, "vld_comext_reporter") %>% collect()
partner <- tbl(con, "vld_comext_partner") %>% collect()
wood %>% 
    preparesankeynodes %>% 
    plotsankey()
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.