Commit 259bee71 authored by Simon, Wolfram's avatar Simon, Wolfram
Browse files

grassland changes. added sheets to input data

parent 2348a097
This diff is collapsed.
......@@ -37,43 +37,13 @@ FUNload_list_monfreda <- function(path, type) {
# Loading Model data from local repository
Fun_ModelData = function(sheet){
# loads CiFoS model input data
# INPUT:
# - sheet: string with name of sheet to be read
# OUTPUT:
# - dataframe with sheet content
library("readxl")
if (Sys.getenv("USERNAME") == "wacke003") {
dir = "C:/Users/wacke003/Git/cifos-model.eu/"
} else {
dir = "D:/GAMS/EU_model_Feb2022/"
}
return(read_excel(paste0(dir,"European_CiFoS_model_data.xlsx"),
sheet = sheet))
}
# Loading table with country name mapping
Fun_CountryMapping = function(){
# loads a table with the mapping of ISO3 country names and respective country
# names used in the CiFoS model.
# OUTPUT:
# - tibble with country name mapping
library("readxl")
EU_iso3 = c("AUT","BEL", "BGR", "HRV", "CZE", "DNK", "EST","FIN", "FRA", "DEU",
"GRC", "HUN", "IRL", "ITA","LVA", "LTU", "LUX", "MLT", "NLD", "POL",
"PRT","ROU", "SVK","SVN", "ESP", "SWE", "GBR", "CYP")
if (Sys.getenv("USERNAME") == "wacke003") {
dir_mapping = "C:/Users/wacke003/Git/wolfram/Input_data/Mappings/"
} else {
dir_mapping = "C:/Users/simon083/OneDrive - Wageningen University & Research/PhD_WJS/Academic/RQ1/Data_analysis/Spatial_mod/Modified_scripts/R/CifoS_Crop/Input_data/Mappings/"
dir_mapping = "D:/GAMS/EU_model_Feb2022/"
}
dat_map_SPAM_GAUL_CIFOS_FAO = read.csv(paste(dir_mapping,
"dat_map_SPAM_GAUL_CIFOS_FAO.csv",
sep="")) %>%
as_tibble() %>% dplyr::select(iso3_SPAM, name_cntr_CIFOS2021) %>%
filter(iso3_SPAM %in% EU_iso3)
return(dat_map_SPAM_GAUL_CIFOS_FAO)
}
read_excel(paste0(dir_mapping,"European_CiFoS_model_data.xlsx"), sheet = sheet) }
# Crop variable conversion ------------------------------------------------
# Calculate production from yields and area - here: suitable yields
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
item,proc_out,FoodGroups
Apples and products,temperate_fruit_whole,Fruits
Apples and products,temperate_fruit_juice,Fruits
Apples and products,temperate_fruit_pulp,Fruits
Bananas,bananas,Fruits
Barley and products,barley_pearl,Grains
Barley and products,barley_flour,Grains
Barley and products,barley_bran,Grains
Barley and products,barley_hulls,Grains
Barley and products,barley_malt,Grains
Beans,NA,Legumes
Beer,pearl_millet_beer,Other
Beer,sorghum_beer,Other
Beer,barley_beer,Other
Bovine Meat,Beef_meat,RedMeat
Bovine Meat,Beef_bone_meal,RedMeat
Bovine Meat,Beef_blood_meal,RedMeat
"Butter, Ghee",Butter,Dairy
Cassava and products,cassava_flour,Tubers
Cassava and products,cassava_tapioca,Tubers
Cassava and products,cassava_dry,Tubers
Cassava and products,cassava_starch,Tubers
Cephalopods,NA,Fish
"Cereals, Other",other_cereals_flour,Grains
"Cereals, Other",other_cereals_bran,Grains
"Cereals, Other",other_cereals_whole,Grains
"Citrus, Other",NA,Fruits
Cloves,NA,Other
Cocoa Beans and products,cocoa_butter,Other
Cocoa Beans and products,cocoa_powder_cake,Other
Cocoa Beans and products,cocoa_husks,Other
Coconut Oil,coconuts_oil_copra,UnsaturatedOils
Coconuts - Incl Copra,coconuts_dessicated,NutsSeeds
Coconuts - Incl Copra,coconuts_cake_copra,NutsSeeds
Coffee and products,coffee_roasted,Other
Coffee and products,coffee_hulls,Other
Cottonseed,NA,NutsSeeds
Cottonseed Oil,seed_cotton_oil,UnsaturatedOils
Cream,NA,Dairy
Crustaceans,Norway_lobster_FOil,Fish
Crustaceans,Norway_lobster_FMeal,Fish
Crustaceans,Norway_lobster,Fish
Crustaceans,Northern_prawn_FOil,Fish
Crustaceans,Northern_prawn_FMeal,Fish
Crustaceans,Northern_prawn,Fish
Dates,NA,Fruits
Demersal Fish,NA,Fish
Eggs,Egg,Eggs
"Fats, Animals, Raw",Beef_Tallow,LardTallow
"Fats, Animals, Raw",Poultry_fat,LardTallow
"Fats, Animals, Raw",Pork_Lard,LardTallow
"Fish, Body Oil",Atlantic_horse_mackerel_FOil,Fish
"Fish, Body Oil",Atlantic_herring_FOil,Fish
"Fish, Body Oil",Norway_pout_FOil,Fish
"Fish, Body Oil",Sandeels_FOil,Fish
"Fish, Body Oil",Pollock_FOil,Fish
"Fish, Body Oil",Blue_whiting_FOil,Fish
"Fish, Body Oil",Ling_FOil,Fish
"Fish, Body Oil",European_Sprat_FOil,Fish
"Fish, Body Oil",European_plaice_FOil,Fish
"Fish, Body Oil",European_pilchard_FOil,Fish
"Fish, Body Oil",European_hake_FOil,Fish
"Fish, Body Oil",Haddock_FOil,Fish
"Fish, Body Oil",Salmon_oil,Fish
"Fish, Body Oil",Tilapia_oil,Fish
"Fish, Body Oil",Atlantic_cod_FOil,Fish
Freshwater Fish,Tilapia_fillet,Fish
"Fruits, other",NA,Fruits
Grapefruit and products,NA,Fruits
Grapes and products (excl wine),NA,Fruits
Groundnut Oil,groundnut_oil,UnsaturatedOils
Groundnuts,groundnut_shelled,Legumes
Groundnuts,groundnut_shell,Legumes
Groundnuts,groundnut_butter,Legumes
"Lemons, Limes and products",NA,Fruits
Maize and products,maize_flour,Grains
Maize and products,maize_bran,Grains
Maize and products,maize_germ,Grains
Maize Germ Oil,maize_oil,UnsaturatedOils
Maize Germ Oil,maize_oil,UnsaturatedOils
"Marine Fish, Other",Atlantic_mackerel_FOil,Fish
"Marine Fish, Other",Atlantic_mackerel_fillet,Fish
"Marine Fish, Other",Atlantic_horse_mackerel_fillet,Fish
"Marine Fish, Other",Atlantic_herring_fillet,Fish
"Marine Fish, Other",Atlantic_cod_fillet,Fish
"Marine Fish, Other",Norway_pout_fillet,Fish
"Marine Fish, Other",Sandeels_fillet,Fish
"Marine Fish, Other",Pollock_fillet,Fish
"Marine Fish, Other",Blue_whiting_fillet,Fish
"Marine Fish, Other",Ling_fillet,Fish
"Marine Fish, Other",European_sprat_fillet,Fish
"Marine Fish, Other",European_plaice_fillet,Fish
"Marine Fish, Other",European_pilchard_fillet,Fish
"Marine Fish, Other",European_hake_fillet,Fish
"Marine Fish, Other",Haddock_fillet,Fish
"Marine Fish, Other",Salmon_fillet,Fish
"Meat, Other",NA,RedMeat
"Meat, Other",Sheep_Meat,RedMeat
"Meat, Other",Goat_Meat,RedMeat
Milk - Excluding Butter,Milk_full,Dairy
Milk - Excluding Butter,Yoghurt,Dairy
Milk - Excluding Butter,Cheese,Dairy
Milk - Excluding Butter,Cream,Dairy
Milk - Excluding Butter,Whey,Dairy
Milk - Excluding Butter,Butter_milk,Dairy
Milk - Excluding Butter,Milk_skimmed,Dairy
Millet and products,pearl_millet_flour,Grains
Millet and products,pearl_millet_bran,Grains
Mutton & Goat Meat,NA,RedMeat
Nuts and products,walnuts,NutsSeeds
Nuts and products,nut_shell,NutsSeeds
Oats,NA,Grains
"Oilcrops Oil, Other",NA,UnsaturatedOils
"Oilcrops, Other",NA,UnsaturatedOils
Olive Oil,other_oil_crops_oil,UnsaturatedOils
Olives (including preserved),other_oil_crops_cake,Vegetables
Onions,NA,Vegetables
"Oranges, Mandarines",tropical_fruits_whole,Fruits
"Oranges, Mandarines",tropical_fruits_juice,Fruits
"Oranges, Mandarines",tropical_fruits_pulp,Fruits
Palm kernels,oil_palm_kernels_cake,PalmOil
Palm Oil,oil_palm_fruits_oil,PalmOil
Palmkernel Oil,oil_palm_kernels_oil,PalmOil
Peas,NA,Legumes
Pelagic Fish,NA,Fish
Pepper,NA,Other
Pigmeat,Pork_meat,RedMeat
Pigmeat,Pork_bone_meal,RedMeat
Pigmeat,Pork_blood_meal,RedMeat
Pimento,NA,Other
Pineapples and products,NA,Fruits
Plantains,plantains,Vegetables
Potatoes and products,potatoes,Tubers
Potatoes and products,tuber_peel,Tubers
Potatoes and products,potatoes_flour,Tubers
Potatoes and products,potatoes_starch,Tubers
Poultry Meat,Chicken_meat,Chicken
Poultry Meat,Chicken_feather_meal,Chicken
Poultry Meat,Chicken_bone_meal,Chicken
"Pulses, Other and products",other_crops,Legumes
"Pulses, Other and products",chickpea_vegetable,Legumes
"Pulses, Other and products",chickpea_flour,Legumes
"Pulses, Other and products",chickpea_bran,Legumes
"Pulses, Other and products",beans_dry_vegetable,Legumes
"Pulses, Other and products",beans_dry_flour,Legumes
"Pulses, Other and products",beans_dry_bran,Legumes
"Pulses, Other and products",other_pulses_vegetable,Legumes
"Pulses, Other and products",other_pulses_flour,Legumes
"Pulses, Other and products",other_pulses_bran,Legumes
"Pulses, Other and products",lentils_vegetable,Legumes
"Pulses, Other and products",lentils_flour,Legumes
"Pulses, Other and products",lentils_bran,Legumes
"Pulses, Other and products",pigeon_peas_vegetable,Legumes
"Pulses, Other and products",pigeon_peas_flour,Legumes
"Pulses, Other and products",pigeon_peas_bran,Legumes
"Pulses, Other and products",cow_peas_dry_vegetable,Legumes
"Pulses, Other and products",cow_peas_dry_flour,Legumes
"Pulses, Other and products",cow_peas_dry_bran,Legumes
Rape and Mustard Oil,rapeseed_oil,UnsaturatedOils
Rice and products,rice_husked,Grains
Rice and products,rice_hulls,Grains
Rice and products,rice_husked_milled,Grains
Rice and products,rice_bran,Grains
Rice and products,rice_paddy_milled,Grains
Rice and products,hulls_paddy_milled,Grains
Rice and products,bran_paddy_milled,Grains
"Roots, Other",yams_flour,Tubers
"Roots, Other",yams_dry,Tubers
"Roots, Other",other_tubers_flour,Tubers
"Roots, Other",other_tubers_dry,Tubers
Rye and products,NA,Grains
Sesameseed Oil,sesame_oil,UnsaturatedOils
Sorghum and products,sorghum_flour,Grains
Sorghum and products,sorghum_bran,Grains
Soyabean Oil,soyabean_oil,UnsaturatedOils
Soyabean Oil,soyabean_feed_oil,UnsaturatedOils
Soyabeans,soyabean_table,Legumes
Soyabeans,soyabean_hulls,Legumes
Soyabeans,soyabean_feed_hulls,Legumes
Spices,NA,Other
"Spices, Other",NA,Other
Sugar (Raw Equivalent),sugar_raw,Sugar
Sugar (Raw Equivalent),sugar_white,Sugar
Sugar (Raw Equivalent),sugar_refined,Sugar
Sugar beet,sugarbeet_toptails,Sugar
Sugar beet,sugarbeet_pulp,Sugar
Sugar beet,sugarbeet_molasses,Sugar
Sugar cane,sugarcane_molasse,Sugar
Sugar cane,sugarcane_bagasse,Sugar
Sunflower seed,sunflower_hulls,NutsSeeds
Sunflower seed,sunflower_seed,NutsSeeds
Sunflowerseed Oil,sunflower_oil,UnsaturatedOils
Sweet potatoes,sweet_potatoe_flour,Tubers
Sweet potatoes,sweet_potatoe_starch,Tubers
"Sweeteners, Other",NA,Sugar
Tea (including mate),tea_leave,Other
Tomatoes and products,NA,Vegetables
"Vegetables, other",other_vegetables_whole,Vegetables
"Vegetables, other",red_vegetables_whole,Vegetables
"Vegetables, other",green_vegetables_whole,Vegetables
Wheat and products,wheat_wholemeal,Grains
Wheat and products,wheat_wholemeal_germ,Grains
Wheat and products,wheat_germ,Grains
Wheat and products,wheat_flour,Grains
Wheat and products,wheat_bran,Grains
Yams,NA,Tubers
---
title: "test"
author: "wjs"
date: "11/02/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=TRUE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
This diff is collapsed.
File added
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment