library(tradeflows) library(knitr) opts_knit$set(root.dir="../..") # file paths are relative to the root of the project directory opts_knit$set(fig.width=12) library(dplyr) library(ggplot2) library(tidyr)
level from the database. Start with the last chunk and redo this flag extraction once and for all.
rawflow <- readdbtbl("raw_flow_yearly") %>% select(productcode) %>% distinct() %>% arrange(productcode) %>% collect() valid <- readdbtbl("validated_flow_yearly") %>% group_by(flow, flag, unit) %>% summarise(quantity = sum(quantity)) %>% collect()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.