fineprint-global / fabio

Food and Agriculture Biomass Input-Output Tables
Other
17 stars 13 forks source link

Fodder crop feed requirements #60

Closed nk027 closed 4 years ago

nk027 commented 4 years ago

New commit adds this -- investigate.

  # estimate fodder crop requirements as a share of "residues and fodder crops"
  fodder_share <- data.frame(Proc.Code = c("p085", "p086", "p087", "p088", "p089", "p090", "p099", "p100"),
                             Process = c("Cattle husbandry","Buffaloes husbandry","Sheep husbandry","Goats husbandry",
                                         "Pigs farming","Poultry Birds farming","Dairy cattle husbandry","Dairy buffaloes husbandry"),
                             value = c(0.9,0.9,0.9,0.9,0.1,0,0.9,0.9))
  feedrequ_B$fodder_share <- fodder_share$value[match(feedrequ_B$Proc.Code,fodder_share$Proc.Code)]
  feedrequ_B$Fodder <- feedrequ_B$Residues * feedrequ_B$fodder_share
  feedrequ_B$fodder_share <- NULL
  feedrequ_K$Fodder <- 0 
nk027 commented 4 years ago

Apparently this is done twice in the new commits -- it's currently implemented according to the second version (did this together with Martin): https://github.com/nk027/fabio/blob/034815a73ab1a13140a1032e1c1a36b1c7ad5298/R/3_use.R#L251.