# Calculate standard results
#
#' Aggregates columns for each farms using a formula
#'
#' @param data a fadn.container, containing all tables
#' @param SEdata a data.table of already calculated SE
#' @param formulaString The formula String to use for aggregation
#' @return [FID VALUE]
#' @export
#' @examples
#' #definition of formula SE610+SE615+SE624-SE626
#' formula=list(add=c("SE610","J830(2)","#289","#267..270"),substract=c("SE626","M632..634(2)"))
#' list(add=c("#48","#49","#50"),substract=list())
#'
#
getFormulaResult=function(data,SEdata,formulaString,aggregator=sum,onlyValue=T) {
if(! ("fadn.container"%in%class(data))) {stop('data is not a fadn.container class')}
result=data.frame(FID=data$tableAI$FID,value=rep(0,nrow(data$tableAI)));
formula=analyzeFormula(formulaString);
for(f in c(formula$add,formula$substract)) {
#warning(f);
if(sum(grepl(f,formula$add,fixed=T))>0) {doAdd=T;} else {doAdd=F;}
if(grepl("^SE.",f)) { #----- Calculate SE section -------------
if(! (f %in% names(SEdata))) {
warning(paste(f," was not found on SEdata. It was ommited from the calculations.",sep=""))
}
else {
result[,f]=SEdata[,f,with=F];
if(doAdd) {result$value=result$value+result[,f];}
else {result$value=result$value-result[,f];}
}
}
else if(grepl("^#.",f)) { #----- Calculate fixed columns section -------------
#warning("^#.");
if(grepl("\\.\\.",f)) { #if a range of vars is given
#warning("range")
reg="^.(.+)(\\.\\.)(.+)$";
from=as.numeric(gsub(reg,"\\1",f));
to=as.numeric(gsub(reg,"\\3",f));
vars=c(seq(from,to));
}
else {
#warning("single")
reg="^.(.+)$";
vars=gsub(reg,"\\1",f);
}
for(v in vars) {
#print(as.numeric(v))
colName=paste("V",v,sep="");
#print(colName);
result[,colName]=data$tableAI[,as.numeric(v),with=FALSE];
#print(data$tableAI[,as.numeric(v),with=FALSE])
if(doAdd) {result$value=result$value+result[,colName];}
else {result$value=result$value-result[,colName];}
}
}
else if(grepl("^[K]",f)) { #----- Calculate K table section -------------
# warning("^[K]")
table=gsub('^(.).+$','\\1',f)
dta=as.data.frame(data$tableK)
# print(dta)
#find col range
col_raw=gsub('^(.+?)(\\()(.+)(\\))$','\\3',f)
# print(col_raw); print(grepl("\\|",col_raw));
if(!grepl("\\:",col_raw)) { #check if there is conditional
col=col_raw;
cond.check=F
}else { #if there is conditional
cond.check=T
col=gsub('(.+?)(\\:)(.+)$','\\1',col_raw);
cond_raw=gsub('(.+?)(\\:)(.+)$','\\3',col_raw);
cond.data=list();
cond.data.raw=strsplit(cond_raw,"&",fixed = T)[[1]];
for(cond.cur in cond.data.raw) {
cond.data[[cond.cur]]=character();
cond.col.val=strsplit(cond.cur,"=",fixed = T)[[1]]
cond.data[[cond.cur]]["col"]=cond.col.val[1]
cond.data[[cond.cur]]["val"]=cond.col.val[2]
if(grepl("\\(",cond.col.val[2])) {
cond.data[[cond.cur]]["val_type"]="c"
} else {
cond.data[[cond.cur]]["val_type"]="val"
}
}
# print(cond_raw);print(cond_col);print(cond_val)
} #end if conditional exists
if(grepl("\\.\\.",col)) {
reg='^(.+?)(\\.\\.)(.+)$'
from=as.numeric(gsub(reg,"\\1",col));
to=as.numeric(gsub(reg,"\\3",col));
cols=c(seq(from,to));
} else {
cols=c(as.numeric(col));
}
# print(cols)
#find var range
if(grepl("^(.+?)(\\.\\.)(.+?)\\(",f)) { #if a range of vars is given
reg="^.(.+?)(\\.\\.)(.+?)\\((.+)$";
from=as.numeric(gsub(reg,"\\1",f));
to=as.numeric(gsub(reg,"\\3",f));
vars=c(seq(from,to))
}
else {
reg="^.(.+?)(\\(.+\\))$";
vars=gsub(reg,"\\1",f);
}
# print(vars)
for(v in vars) {
for(c in cols) {
colName=paste(table,v,"(",c,")",sep="");
# print(colName);
if(cond.check==T) {
cmd1="(dta[,1]==v";
cmd2=""
for(cond.cur in cond.data) {
# print(cond.cur)
cmd2=paste0(cmd2," & dta[,",cond.cur["col"],"]",sep="" )
if(cond.cur["val_type"]=="val") {
cmd2=paste0(cmd2,"==",cond.cur["val"],sep="")
}else {
cmd2=paste0(cmd2,"%in%c",cond.cur["val"],sep="")
}
}
cmd=paste0(cmd1,cmd2,")",sep="");
# print(cmd)
p=eval(parse(text=cmd))
#p=(dta[,1]==v & dta[,as.numeric(cond_col)]==as.numeric(cond_val));
# print(sum(p))
# str(dta)
# print(dta[p,])
}
else {
p=(dta[,1]==v);
}
if(sum(p)>0) {
# print(c)
tk=aggregate(dta[p,c],by=list(dta[p,"FID"]),aggregator)
}
else {
tk=data.frame(FID=seq(1,nrow(data$tableAI)),value=rep(0,nrow(data$tableAI)));
}
names(tk)=c("FID",colName);
# print(head(tk))
result=merge(result,tk,all.x=T,by="FID");
result[is.na(result[,colName]),colName]=0;
if(doAdd) {result$value=result$value+result[,colName];}
else {result$value=result$value-result[,colName];}
} #end for cols
} #end for vars
}
else if(grepl("^[L,M,N]",f)) { #----- Calculate LMN section -------------
# warning("^[L,M,N]")
table=gsub('^(.).+$','\\1',f)
dta=as.data.frame(data$tableJ$tens)
#find col range
col=gsub('^(.+)(\\()(.+)(\\))$','\\3',f)
if(grepl("\\.\\.",col)) {
reg='^(.+)(\\.\\.)(.+)$'
from=as.numeric(gsub(reg,"\\1",col));
to=as.numeric(gsub(reg,"\\3",col));
cols=c(seq(from,to));
}
else {
cols=c(as.numeric(col));
}
# print(cols)
#find var range
if(grepl("^(.+)(\\.\\.)(.+)\\(",f)) { #if a range of vars is given
reg="^.(.+)(\\.\\.)(.+)(\\(.+\\))";
from=as.numeric(gsub(reg,"\\1",f));
to=as.numeric(gsub(reg,"\\3",f));
vars=c(seq(from,to))
}
else {
reg="^.(.+)(\\(.+\\))$";
vars=gsub(reg,"\\1",f);
}
# print(vars)
for(v in vars) {
for(c in cols) {
colName=paste(table,v,"(",c,")",sep="");
# warning(colName)
p=(dta[,3]==v);
# warning(sum(p))
if(sum(p)>0) {
tk=aggregate(dta[p,c],by=list(dta[p,"FID"]),aggregator)
}
else {
tk=data.frame(FID=seq(1,nrow(data$tableAI)),value=rep(0,nrow(data$tableAI)));
}
names(tk)=c("FID",colName);
# print(head(tk))
result=merge(result,tk,all.x=T,by="FID");
result[is.na(result[,colName]),colName]=0;
if(doAdd) {result$value=result$value+result[,colName];}
else {result$value=result$value-result[,colName];}
} #end for cols
} #end for vars
}
else if(grepl("^J",f)) { #----- Calculate J section -------------
table="J";
dta=data.frame(data$tableJ$tens)
#find var range
if(grepl("^(.+)(\\.\\.)(.+)\\(",f)) { #if a range of vars is given
reg="^.(.+)(\\.\\.)(.+)(\\(.+\\))";
from=as.numeric(gsub(reg,"\\1",f));
to=as.numeric(gsub(reg,"\\3",f));
vars=c(seq(from,to))
}
else {
reg="^.(.+)(\\(.+\\))$";
vars=gsub(reg,"\\1",f);
}
# print(vars)
for(v in vars) {
colName=paste(table,v,sep="");
# print(colName)
p=(dta[,"CODE"]==v);
# print(sum(p))
if(sum(p)>0) {
tk=aggregate(dta[p,"AMOUNT"],by=list(dta[p,"FID"]),aggregator)
}
else {
tk=data.frame(FID=seq(1,nrow(data$tableAI)),value=rep(0,nrow(data$tableAI)));
}
names(tk)=c("FID",colName);
# print(head(tk))
result=merge(result,tk,all.x=T,by="FID");
result[is.na(result[,colName]),colName]=0;
if(doAdd) {result$value=result$value+result[,colName];}
else {result$value=result$value-result[,colName];}
} #end for vars
} #end if J
}
attr(result,"formula")=formulaString;
if(onlyValue) {return(result$value);}
else{return(result);}
}
#' Dissagregates a string formula to a list(add=c("SE610","J830(2)","#289","#267..270"),substract=c("SE626","M632..634(2)"))
#'
#' @param formula a formula string, see examples
#' @return list(add=c(),substract=())
#' @export
#' @examples
#' formula="K120..148(7)+K120..148(8)+K120..148(9)+K120..148(10)-K120..148(6)"
#' formula="#48+#49+#50"
#
analyzeFormula=function(formula) {
result=list(add=character(0),substract=character(0));
formula=gsub("\\s","",formula);
s1=strsplit(formula,"(?<=[-+])|(?=[-+])",perl=T)[[1]]
doAdd=T;
for(s in s1) {
if(grepl("\\+",s)) {
doAdd=T;
}
else if(grepl("\\-",s)) {
doAdd=F;
}
else {
if(doAdd){result$add=c(result$add,s)}
else {result$substract=c(result$substract,s)}
}
}
return(result);
}
translateTableCell=function(table,heading,col) {
theMap=list();
theMap$E=list("51"=c(232:233),
"52"=c(234:236),
"53"=c(237:239),
"54"=c(240:242),
"55"=c(243:245),
"56"=c(246:248),
"57"=c(249:251),
"58"=c(252:254)
);
theMap$D=list("22"=c(86:90),
"23"=c(91:95),
"24"=c(96:100),
"25"=c(101:105),
"26"=c(106:110),
"27"=c(111:115),
"28"=c(116:120),
"29"=c(121:125),
"30"=c(126:130),
"31"=c(131:135),
"32"=c(136:140),
"33"=c(141:145),
"34"=c(146:150),
"35"=c(151:155),
"36"=c(156:160),
"37"=c(161:165),
"38"=c(166:170),
"39"=c(171:175),
"40"=c(176:180),
"41"=c(181:185),
"42"=c(186:190),
"43"=c(191:195),
"44"=c(196:200),
"45"=c(201:205),
"46"=c(206:210),
"47"=c(211:215),
"48"=c(216:220),
"49"=c(221:225),
"50"=c(NULL,227,NULL,229)
);
}
R/utilities.R 0 → 100644
#' Utility to copy data to clipboard for pasting to Excel
#'
#' @param d the data to copy
#' @param getRownames set to T to opy also row.names
#' @param ... any other parameter for passing to write.table
#' @return nothing
#' @export
#' @examples
#' write.excel(d);
write.excel=function(d,getRownames=F,...) {write.table(d,"clipboard-65000",sep="\t",row.names = getRownames,...)}
#' Updates selected elements of data stored in one DT with new one given in melted format
#'
#' The user provides the data.new: {id,variable,new value}. The function overwrites all existing id-column with the new values
#'
#' @param data.old The DT to update
#' @param data.new The data to insert. It must have three columns: {id,variable,new value}. E.g. data.new=data.table("id"=c(810001100105),"variable"=c("AASBIO_CV"),value=c(999999))
#'
#'
#' @return a DT with the updated values
#' @export
#'
#' @examples
update_elements.DT = function(data.old,data.new) {
id.var = names(data.new)[1]
vars.to.replace = unique(data.new$variable)
for(v in vars.to.replace) {
setkeyv(data.old,id.var)
data.col.new = merge(
data.old[,mget(c(id.var,v))],
data.new[variable==v,mget(c(id.var,"value"))],
all.x=T
)
data.col.new[,value.merged:=ifelse(is.na(value),eval(parse(text = v)),value)]
data.old[,(v):=data.col.new$value.merged]
}
return(data.old)
}
R/zzz.R 0 → 100644
env.stored.rds <- new.env(parent = emptyenv());
.onAttach <- function(libname, pkgname) {
# to show a startup message
packageStartupMessage("fadnUtils is loaded.")
}
.onLoad <- function(libname, pkgname) {
}
File added
fadnUtils.Rproj 0 → 100644
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageBuildArgs: --no-manual
PackageCheckArgs: --no-manual
PackageRoxygenize: rd,collate,namespace
fadnUtils.pdf 0 → 100644
File added
{
"id": {
},
"info": {
},
"costs": {
},
"livestock": {
"animals": {
"DCOW": {
"description": "Dairy cows and Bufallo (2013 and bef.)",
"columns": {
"LEVL": "LCOWBUFDAIR_AN_X",
"OV": "LCOWBUFDAIR_OV_X",
"CV": "LCOWBUFDAIR_OV_X + LCOWBUFDAIR_CV_X",
"PV": "LCOWBUFDAIR_PV_X",
"PN": "LCOWBUFDAIR_PN_X",
"SV": "LCOWBUFDAIR_SV_X",
"SN": "LCOWBUFDAIR_SN_X",
"FCV": "NA",
"FCN": "NA",
"FUV": "NA",
"FUN": "NA"
}
}
},
"production": {}
},
"subsidies": {
},
"crops": {
"SWHE": {
"columns": {
"UVSA": "NA"
}
},
"DWHE": {
"columns": {
"UVSA": "NA"
}
},
"RYEM": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"BARL": {
"columns": {
"UVSA": "NA"
}
},
"OATS": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"MAIZ": {
"columns": {
"UVSA": "NA"
}
},
"PARI": {
"columns": {
"UVSA": "NA"
}
},
"OCER": {
"columns": {
"LEVL": "CCEROTHNS_TA_X + CCEROTHS_TA_X",
"GROF": "CCEROTHNS_PRQ_X + CCEROTHS_PRQ_X",
"INTF": "CCEROTHNS_FUV_X + CCEROTHS_FUV_X",
"EAAP": "CCEROTHNS_TO_X + CCEROTHS_TO_X",
"UVAG": "ifelse( CCEROTHNS_PRQ_X + CCEROTHS_PRQ_X>0, (CCEROTHNS_SV_X+CCEROTHNS_FCV_X+CCEROTHNS_FUV_X+CCEROTHNS_CV_X-CCEROTHNS_OV_X + CCEROTHS_SV_X+CCEROTHS_FCV_X+CCEROTHS_FUV_X+CCEROTHS_CV_X-CCEROTHS_OV_X)/(CCEROTHNS_PRQ_X + CCEROTHS_PRQ_X), 0 )",
"UVSA": "NA",
"IRTA": "CCEROTHNS_IRA_X"
}
},
"RAPE": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"SUNF": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"SOYA": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"OOIL": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"PULS": {
"columns": {
"LEVL": "CCRPPROT_TA_X",
"GROF": "CCRPPROT_PRQ_X",
"INTF": "CCRPPROT_FUV_X",
"EAAP": "CCRPPROT_SV_X+CCRPPROT_FCV_X+CCRPPROT_FUV_X+CCRPPROT_CV_X-CCRPPROT_OV_X",
"UVAG": "ifelse( CCRPPROT_PRQ_X>0 , (CCRPPROT_SV_X+CCRPPROT_FCV_X+CCRPPROT_FUV_X+CCRPPROT_CV_X-CCRPPROT_OV_X)/CCRPPROT_PRQ_X, 0 )",
"UVSA": "NA",
"IRTA": "NA"
}
},
"POTA": {
"columns": {
"UVSA": "NA"
}
},
"SUGB": {
"columns": {
"UVSA": "NA"
}
},
"TEXT": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"TOBA": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"OIND": {
"columns": {
"LEVL": "CHOP_TA+CCRPINDOTHEXSED_TA_X-CCOTN_TA",
"GROF": "CHOP_PRQ+CCRPINDOTHEXSED_PRQ_X-CCOTN_PRQ",
"INTF": "CHOP_FUV+CCRPINDOTHEXSED_FUV_X-CCOTN_FUV",
"EAAP": "CHOP_SV+CHOP_FCV+CHOP_FUV+CHOP_CV-CHOP_OV + CCRPINDOTHEXSED_SV_X+CCRPINDOTHEXSED_FCV_X+CCRPINDOTHEXSED_FUV_X+CCRPINDOTHEXSED_CV_X-CCRPINDOTHEXSED_OV_X - CCOTN_SV+CCOTN_FCV+CCOTN_FUV+CCOTN_CV-CCOTN_OV",
"UVAG": "NA",
"UVSA": "NA",
"IRTA": "NA"
}
},
"OCRO": {
"columns": {
"LEVL": "CSEEDGRAS_TA_X+CSEEDSOTH_TA_X+CARAOTH_TA+CPERMUG_TA+CCRPPERMOTH_TA",
"GROF": "CSEEDGRAS_PRQ_X+CSEEDSOTH_PRQ_X+CARAOTH_PRQ+CPERMUG_PRQ_X+CCRPPERMOTH_PRQ_X+CYNG_PRQ",
"INTF": "CSEEDGRAS_FUV_X+CSEEDSOTH_FUV_X+CARAOTH_FUV+CPERMUG_FUV+CCRPPERMOTH_FUV+CYNG_FUV",
"EAAP": "CSEEDGRAS_SV_X+CSEEDGRAS_FCV_X+CSEEDGRAS_FUV_X+CSEEDGRAS_CV_X-CSEEDGRAS_OV_X + CSEEDSOTH_SV_X+CSEEDSOTH_FCV_X+CSEEDSOTH_FUV_X+CSEEDSOTH_CV_X-CSEEDSOTH_OV_X + CARAOTH_SV+CARAOTH_FCV+CARAOTH_FUV+CARAOTH_CV-CARAOTH_OV + CPERMUG_SV+CPERMUG_FCV+CPERMUG_FUV+CPERMUG_CV-CPERMUG_OV + CCRPPERMOTH_SV+CCRPPERMOTH_FCV+CCRPPERMOTH_FUV+CCRPPERMOTH_CV-CCRPPERMOTH_OV + CYNG_SV+CYNG_FCV+CYNG_FUV+CYNG_CV-CYNG_OV",
"UVAG": "ifelse( (CSEEDGRAS_PRQ_X+CSEEDSOTH_PRQ_X+CARAOTH_PRQ+CPERMUG_PRQ_X+CCRPPERMOTH_PRQ_X+CYNG_PRQ)>0 , (CSEEDGRAS_SV_X+CSEEDGRAS_FCV_X+CSEEDGRAS_FUV_X+CSEEDGRAS_CV_X-CSEEDGRAS_OV_X + CSEEDSOTH_SV_X+CSEEDSOTH_FCV_X+CSEEDSOTH_FUV_X+CSEEDSOTH_CV_X-CSEEDSOTH_OV_X + CARAOTH_SV+CARAOTH_FCV+CARAOTH_FUV+CARAOTH_CV-CARAOTH_OV + CPERMUG_SV+CPERMUG_FCV+CPERMUG_FUV+CPERMUG_CV-CPERMUG_OV + CCRPPERMOTH_SV+CCRPPERMOTH_FCV+CCRPPERMOTH_FUV+CCRPPERMOTH_CV-CCRPPERMOTH_OV + CYNG_SV+CYNG_FCV+CYNG_FUV+CYNG_CV-CYNG_OV)/(CSEEDGRAS_PRQ_X+CSEEDSOTH_PRQ_X+CARAOTH_PRQ+CPERMUG_PRQ_X+CCRPPERMOTH_PRQ_X+CYNG_PRQ) , 0 )",
"UVSA": "NA",
"IRTA": "NA"
}
},
"TOMA": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"OVEG": {
"columns": {
"LEVL": "CVEGOF_TA+CVEGMG_TA+CVEGUG_TA-CTOMAT_TA",
"GROF": "CVEGOF_PRQ+CVEGMG_PRQ+CVEGUG_PRQ-CTOMAT_PRQ-CNONPERFRU_PRQ_X",
"INTF": "CVEGOF_FUV+CVEGMG_FUV+CVEGUG_FUV-CTOMAT_FUV-CNONPERFRU_FUV_X",
"EAAP": "CVEGOF_SV+CVEGOF_FCV+CVEGOF_FUV+CVEGOF_CV-CVEGOF_OV+CVEGMG_SV+CVEGMG_FCV+CVEGMG_FUV+CVEGMG_CV+CVEGMG_CV-CVEGMG_OV+CVEGUG_SV+CVEGUG_FCV+CVEGUG_FUV+CVEGUG_CV-CVEGUG_OV-CTOMAT_SV+CTOMAT_FCV+CTOMAT_FUV+CTOMAT_CV-CTOMAT_OV-CNONPERFRU_SV_X+CNONPERFRU_FCV_X+CNONPERFRU_FUV_X+CNONPERFRU_CV_X-CNONPERFRU_OV_X",
"UVAG": "NA",
"UVSA": "NA",
"IRTA": "NA"
}
},
"APPL": {
"columns": {
"LEVL": "CAPPLEPEAR_A_X",
"GROF": "CAPPLEPEAR_PRQ_X",
"INTF": "CAPPLEPEAR_FUV_X",
"EAAP": "CAPPLEPEAR_SV_X+CAPPLEPEAR_FCV_X+CAPPLEPEAR_FUV_X+CAPPLEPEAR_CV_X-CAPPLEPEAR_OV_X",
"UVAG": "ifelse( CAPPLEPEAR_PRQ_X>0, (CAPPLEPEAR_SV_X+CAPPLEPEAR_FCV_X+CAPPLEPEAR_FUV_X+CAPPLEPEAR_CV_X-CAPPLEPEAR_OV_X)/(CAPPLEPEAR_PRQ_X), 0 )",
"UVSA": "NA",
"IRTA": "NA"
}
},
"OFRU": {
"columns": {
"LEVL": "CSTNFRUT_A_X+CFRUTTRPL_TA+CNUT_TA+CSMLFRUTBER_A_X+CNONPERFRU_A_X",
"GROF": "CSTNFRUT_PRQ_X+CFRUTTRPL_PRQ+CNUT_PRQ+CSMLFRUTBER_PRQ_X+CNONPERFRU_PRQ_X",
"INTF": "CSTNFRUT_FUV_X+CFRUTTRPL_FUV+CNUT_FUV+CSMLFRUTBER_FUV_X+CNONPERFRU_FUV_X",
"EAAP": "CSTNFRUT_SV_X+CSTNFRUT_FCV_X+CSTNFRUT_FUV_X+CSTNFRUT_CV_X-CSTNFRUT_OV_X + CFRUTTRPL_SV+CFRUTTRPL_FCV+CFRUTTRPL_FUV+CFRUTTRPL_CV-CFRUTTRPL_OV + CNUT_SV+CNUT_FCV+CNUT_FUV+CNUT_CV-CNUT_OV + CSMLFRUTBER_SV_X+CSMLFRUTBER_FCV_X+CSMLFRUTBER_FUV_X+CSMLFRUTBER_CV_X-CSMLFRUTBER_OV_X + CNONPERFRU_SV_X+CNONPERFRU_FCV_X+CNONPERFRU_FUV_X+CNONPERFRU_CV_X-CNONPERFRU_OV_X",
"UVAG": "ifelse( (CSTNFRUT_PRQ_X+CFRUTTRPL_PRQ+CNUT_PRQ+CSMLFRUTBER_PRQ_X+CNONPERFRU_PRQ_X)>0 , (CSTNFRUT_SV_X+CSTNFRUT_FCV_X+CSTNFRUT_FUV_X+CSTNFRUT_CV_X-CSTNFRUT_OV_X + CFRUTTRPL_SV+CFRUTTRPL_FCV+CFRUTTRPL_FUV+CFRUTTRPL_CV-CFRUTTRPL_OV + CNUT_SV+CNUT_FCV+CNUT_FUV+CNUT_CV-CNUT_OV + CSMLFRUTBER_SV_X+CSMLFRUTBER_FCV_X+CSMLFRUTBER_FUV_X+CSMLFRUTBER_CV_X-CSMLFRUTBER_OV_X + CNONPERFRU_SV_X+CNONPERFRU_FCV_X+CNONPERFRU_FUV_X+CNONPERFRU_CV_X-CNONPERFRU_OV_X)/(CSTNFRUT_PRQ_X+CFRUTTRPL_PRQ+CNUT_PRQ+CSMLFRUTBER_PRQ_X+CNONPERFRU_PRQ_X) , 0 )",
"UVSA": "NA",
"IRTA": "NA"
}
},
"CITR": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"TAGR": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"OLIV": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"TABO": {
"columns": {
"UVSA": "NA",
"IRTA": "NA"
}
},
"TWIN": {
"columns": {
"LEVL": "CVIN_A_X-CGRPTAB_TA",
"GROF": "CVIN_PRQ_X-CGRPTAB_PRQ",
"INTF": "CVIN_FUV_X-CGRPTAB_FUV",
"EAAP": "CVIN_SV_X+CVIN_FCV_X+CVIN_FUV_X+CVIN_CV_X-CVIN_OV_X - CGRPTAB_SV+CGRPTAB_FCV+CGRPTAB_FUV+CGRPTAB_CV-CGRPTAB_OV",
"UVAG": "ifelse( (CVIN_PRQ_X-CGRPTAB_PRQ)>0 , (CVIN_SV_X+CVIN_FCV_X+CVIN_FUV_X+CVIN_CV_X-CVIN_OV_X - CGRPTAB_SV+CGRPTAB_FCV+CGRPTAB_FUV+CGRPTAB_CV-CGRPTAB_OV)/(CVIN_PRQ_X-CGRPTAB_PRQ) , 0 )",
"UVSA": "NA",
"IRTA": "NA"
}
},
"NURS": {
"columns": {
"LEVL": "CNURS_TA",
"GROF": "CNURS_PRQ_X",
"INTF": "CNURS_FUV",
"EAAP": "CNURS_SV+CNURS_FCV+CNURS_FUV+CNURS_CV-CNURS_OV",
"UVAG": "ifelse( CNURS_PRQ_X>0 , (CNURS_SV+CNURS_FCV+CNURS_FUV+CNURS_CV-CNURS_OV)/(CNURS_PRQ_X) , 0 ) ",
"UVSA": "NA",
"IRTA": "NA"
}
},
"FLOW": {
"columns": {
"LEVL": "ifelse( (CFLWOUT_TA+CFLWUG_TA)>0,CFLWOUT_TA+CFLWUG_TA,CFLWB_TA+CFLWCUT_TA+CFLW_TA)",
"GROF": "ifelse( (CFLWOUT_PRQ_X+CFLWUG_PRQ_X)>0,CFLWOUT_PRQ_X+CFLWUG_PRQ_X,CFLWB_PRQ_X+CFLWCUT_PRQ_X+CFLW_PRQ_X)",
"INTF": "ifelse( (CFLWOUT_FUV+CFLWUG_FUV)>0,CFLWOUT_FUV+CFLWUG_FUV,CFLWB_FUV+CFLWCUT_FUV+CFLW_FUV)",
"EAAP": "ifelse( (CFLWOUT_TO + CFLWUG_TO)>0 ,CFLWOUT_TO + CFLWUG_TO, CFLWB_TO+ CFLWCUT_TO+CFLW_TO)",
"UVAG": "ifelse( (CFLWOUT_TO + CFLWUG_TO)>0 , ifelse( (CFLWOUT_PRQ_X+CFLWUG_PRQ_X)>0 , (CFLWOUT_TO + CFLWUG_TO)/(CFLWOUT_PRQ_X+CFLWUG_PRQ_X) , 0) , ifelse( (CFLWB_PRQ_X+CFLWCUT_PRQ_X+CFLW_PRQ_X)>0 , (CFLWB_TO+ CFLWCUT_TO+CFLW_TO)/(CFLWB_PRQ_X+CFLWCUT_PRQ_X+CFLW_PRQ_X) , 0) )",
"IRTA": "NA"
}
},
"MAIF": {
"columns": {
"LEVL": "CFODMZ_A",
"UVSA": "NA",
"IRTA": "NA"
}
},
"ROOF": {
"columns": {
"LEVL": "CFODRTBR_A",
"UVSA": "NA",
"IRTA": "NA"
}
},
"PGRA": {
"columns": {
"LEVL": "CGRSXRG_A",
"UVSA": "NA",
"IRTA": "NA"
}
},
"RGRA": {
"columns": {
"LEVL": "CRG_A+CGRSNOUSESUB_A"
}
},
"OFAR": {
"columns": {
"LEVL": "CGRSTMP_A+CSILAGECEROTH_A_X+CFODOTH_A_X",
"GROF": "CGRSTMP_PRQ+CSILAGECEROTH_PRQ_X+CFODOTH_PRQ_X",
"INTF": "CGRSTMP_FUV+CSILAGECEROTH_FUV_X+CFODOTH_FUV_X",
"EAAP": "CGRSTMP_TO+CSILAGECEROTH_TO_X+CFODOTH_TO_X",
"UVAG": "ifelse( (CGRSTMP_PRQ+CSILAGECEROTH_PRQ_X+CFODOTH_PRQ_X)>0, (CGRSTMP_TO+CSILAGECEROTH_TO_X+CFODOTH_TO_X)/(CGRSTMP_PRQ+CSILAGECEROTH_PRQ_X+CFODOTH_PRQ_X), 0 )",
"UVSA": "NA",
"SHARE": "ifelse( (CGRSTMP_SV+CSILAGECEROTH_SV_X+CFODOTH_SV_X)>0, CGRSTMP_FUV+CSILAGECEROTH_FUV_X+(CFODOTH_FUV_X/CGRSTMP_SV)+CSILAGECEROTH_SV_X+CFODOTH_SV, 0)",
"IRTA": "NA"
}
},
"SETA": {
"columns": {
"LEVL": "CFLNDNOSUB_A + CFLNDSUB_A",
"UVSA": "NA",
"IRTA": "NA"
}
},
"FORE": {
"description": "Forest land",
"columns": {
"LEVL": "CWDED_A",
"GROF": "CWDED_PRQ_X",
"INTF": "CWDED_FUV",
"EAAP": "CWDED_TO",
"UVAG": "ifelse( CWDED_PRQ_X>0 , CWDED_TO/CWDED_PRQ_X , 0)",
"IRTA": "NA"
}
},
"CCER": {
"description": "Catch crops cereals (?)",
"columns": {
"LEVL": "CWHTC_TA-CWHTC_A + CWHTD_TA-CWHTD_A + CRYE_TA-CRYE_A + CBRL_TA-CBRL_A + COAT_TA-CBRL_A + COAT_TA-COAT_A + COAT_TA-CCEROTHS_A_X + CMZ_TA-CMZ_A + CRICE_TA-CRICE_A + CCEROTHNS_TA_X-CCEROTHNS_A_X"
}
},
"CPUL": {
"description": "Catch crops pulses (?) ",
"columns": {
"LEVL": "CCRPPROT_TA_X-CCRPPROT_A_X"
}
},
"COCR": {
"description": "Catch crops other crops (?)",
"columns": {
"LEVL": "CPOT_TA-CPOT_A + CSUGBT_TA-CSUGBT_A + CCRPOIL_TA_X-CCRPOIL_A_X + CHOP_TA-CHOP_A + CTOBAC_TA-CTOBAC_A"
}
}
}
}
{
"id": {
"ID": {
"source": "factor(id)",
"description": "Unique FADN Identifier. Anonymous code allowing constant sample."
},
"WEIGHT": {
"source": "SYS02",
"description": "Number of farm represented in the population"
},
"COUNTRY": {
"source": "COUNTRY",
"description": "Country (3 digits FADN acronym)"
},
"YEAR": {
"source": "YEAR",
"description": "Accounting year"
},
"TF8": {
"source": "factor( paste0('tf8-',TF8) ) ",
"description": "Type of Farming (8)"
},
"TF14": {
"source": "factor( paste0('tf14-',TF14) ) ",
"description": "Type of Farming (14)"
},
"SIZ6": {
"source": "factor( paste0('siz6-',SIZ6) )",
"description": "Economic size class (6 classes)"
},
"REGION": {
"source": "factor( REGION )",
"description": "FADN region"
},
"NUTS1": {
"source": "factor( NUTS1 )",
"description": ""
},
"NUTS2": {
"source": "NUTS2",
"description": ""
},
"NUTS3": {
"source": "NUTS3",
"description": "The code of the NUTS level 3 territorial unit where the holding is located."
},
"ALTITUDE": {
"source": "factor( paste0('alt-',ALTITUDE) )",
"description": "Altitude Code (1=<300m, 2=300-600m, 3=>600m)"
},
"ORGANIC": {
"source": "factor( paste0('org-',ORGANIC ) )",
"description": "Organic farming Code (1=No Organic, 2=Only organic, 3=Both, 4=In conversion)"
}
},
"info": {
"SIZEUR": {
"source": "SIZEUR",
"description": "Total economic size in EUR, Calculated by DG AGRI (cf Typology Regulation)"
},
"UAAOWNED": {
"source": "UAAOWNED",
"description": "UAA for owner farming Area, in ha"
},
"UAARENTED": {
"source": "UAARENTED",
"description": "Rented UAA Area, in ha"
},
"UAASHARED": {
"source": "UAASHARED",
"description": "Sharecropped UAA Area, in ha"
},
"UAA": {
"source": "UAAOWNED+UAARENTED+UAASHARED" ,
"description": "Total Utilised Agricultural Area. Area in ha"
},
"NAT2000": {
"source": "factor( paste0( 'nat-', ENVREST_X ) )",
"description": "Environmental constraints Area (EC no 1257/1999) - does not coincide exactly with Natura2000 on 2013- / TODO[NAT2000 for 2014+]"
},
"WAWU": {
"source":"WURHOAM_W1_1+WURHOAM_W1_2+WURHOAM_W1_3+WURHOAM_W1_4+WURHOAM_W1_5+WURSH_W1+WUROTH_W1+WUCCA_W1+ifelse(WUCCA_P>0,WUCCA_Y1/WUCCA_P,0)+WPRM_W1_TOT+WPROTH_W1+ifelse(WPCCA_P>0,WPCCA_W1/WPCCA_P,0)",
"description": "Total Annual working units in farm (manager+spouse+"
},
"WHOURS": {
"source":"WURHOAM_Y1_1+WURHOAM_Y1_2+WURHOAM_Y1_3+WURHOAM_Y1_4+WURHOAM_Y1_5+WURSH_Y1+WUROTH_Y1+WUCCA_Y1+WPRM_Y1_TOT",
"description": "Total hours working in farm (manager+spouse+"
},
"DPSFPS.share": {
"source": "ifelse(SSPSTOT_V_X>0, SSPSS_V/SSPSTOT_V_X, 0)",
"description": ""
},
"ENTL.share": {
"source": "ifelse(SSPSTOT_N_X>0,SSPSPERMGRS_N_X/SSPSTOT_N_X,0)",
"description": ""
},
"ENTL.LEVL": {
"source": "SSAPS_N_X+SSPSTOT_N_X",
"description": ""
},
"LFA": {
"source": "factor( paste0( 'lfa-',LFA ) )",
"description": "Less-favoured area Code (1=not LFA, 2=not mountain LFA, 3=mountain LFA, 4=no significant areas)"
},
"OGA": {
"source": "OGASHARE",
"description": ""
},
"TSGM": {
"source": "SIZEUR",
"description": ""
},
"SAMP": {
"source": "SYS03",
"description": ""
},
"TOTINVBEFSUBS": {
"source": "ATOTASST_IP_X",
"description": ""
},
"INCOME.VATBALANCE": {
"source": "VSAL_X-VPUR_X+VREF_X",
"description": ""
},
"INCOME.TAXES": {
"source": "ITAX_V+ILNDTAX_V-STAX_X-STAXBUILD_X",
"description": ""
}
},
"costs": {
"SEED": {
"source": "SE290+ISEDPUR_V",
"description": ""
},
"NITF": {
"source": "SE295",
"description": ""
},
"PLAP": {
"source": "SE300",
"description": ""
},
"CSPE": {
"source": "SE305",
"description": ""
},
"F59": {
"source":"IWGSS_V",
"description": "Wages and social security costs for paid labour Value"
},
"F60": {
"source":"ICNTR_V",
"description": "Contract work and machinery hire Value"
},
"F61": {
"source":"IUPKP_V",
"description": "Current upkeep of machinery and equipment Value"
},
"F62": {
"source":"IFULS_V",
"description": "Motor fuels and lubricants Value"
},
"F63": {
"source":"ICAR_V",
"description": "Car expenses Value"
},
"F64": {
"source":"IGRFEDCNCTRPUR_V",
"description": "Purchased concentrated feedstuffs for grazing stock (equines, ruminants) Value"
},
"F65": {
"source":"IGRFEDCRSPUR_V",
"description": "Purchased coarse fodder for grazing stock (equines, ruminants) Value"
},
"F66": {
"source":"IPIGFEDPUR_V",
"description": "Purchased feedstuffs for pigs Value"
},
"F67": {
"source":"IPLTRFEDPUR_V",
"description": "Purchased feedstuffs for poultry and other small animals Value"
},
"F68": {
"source":"ILVFEDFPR_V",
"description": "Farm-produced feedstuffs for grazing stock (equines, ruminants) Valu"
},
"F69": {
"source":"IPIGFEDFPR_V",
"description": "Farm-produced feedstuffs for pigs Value"
},
"F70": {
"source":"IPLTRFEDFPR_V",
"description": "Farm-produced feedstuffs for poultry and other small animals Value"
},
"F71": {
"source":"ILOTH_VET_V",
"description": "Other veterinary expenses"
},
"F72": {
"source":"ISEDPUR_V",
"description": "Seeds and seedlings purchased Value"
},
"F73": {
"source":"ISEDFPR_V",
"description": "Seeds and seedlings produced and used on the farm Value"
},
"F74": {
"source":"IFERT_V",
"description": "Fertilisers and soil improvers Value"
},
"F75": {
"source":"IPROT_V",
"description": "Crop protection products Value"
},
"F76": {
"source":"ICRPOTH_V",
"description": "Other specific crop costs Value"
},
"F77": {
"source":"IFRST_V",
"description": "Specific costs for forestry and wood processing Value"
},
"F78": {
"source":"IUPKPLND_V",
"description": "Current upkeep of land improvements and buildings Value"
},
"F79": {
"source":"IELE_V",
"description": "Farming overheads. Electricity. Value"
},
"F80": {
"source":"IHFULS_V",
"description": "Heating fuels Value"
},
"F81": {
"source":"IWATR_V",
"description": "Water Value"
},
"F82": {
"source":"IOTHINS_AGR_V",
"description": "insurance"
},
"F83": {
"source":"ITAX_V",
"description": "Taxes and other dues Value"
},
"F85": {
"source":"IRNT_V",
"description": "Rent paid, total Value"
},
"F86": {
"source":"ILNDRNT_V",
"description": "Rent paid for land Value"
},
"F88": {
"source":"ILNDTAX_V",
"description": "Taxes on land and buildings Val"
}
},
"livestock": {
"animals": {
"DCOW": {
"description": "Dairy cows",
"columns": {
"LEVL": "LCOWDAIR_AN+LBUFDAIRPRS_AN",
"OV": "LCOWDAIR_OV+LBUFDAIRPRS_OV",
"CV": "LCOWDAIR_CV+LBUFDAIRPRS_CV",
"PV": "LCOWDAIR_PV+LBUFDAIRPRS_PV",
"PN": "LCOWDAIR_PN+LBUFDAIRPRS_PN",
"SV": "LCOWDAIR_SV+LBUFDAIRPRS_SV",
"SN": "LCOWDAIR_SN+LBUFDAIRPRS_SN",
"FCV": "LCOWDAIR_FCV+LBUFDAIRPRS_FCV",
"FCN": "LCOWDAIR_FCN+LBUFDAIRPRS_FCN",
"FUV": "LCOWDAIR_FUV+LBUFDAIRPRS_FUV",
"FUN": "LCOWDAIR_FUN+LBUFDAIRPRS_FUN"
}
},
"SCOW": {
"description": "Other cows. Average number",
"columns": {
"LEVL": "LCOWOTH_AN",
"OV": "LCOWOTH_OV",
"CV": "LCOWOTH_CV",
"PV": "LCOWOTH_PV",
"PN": "LCOWOTH_PN",
"SV": "LCOWOTH_SV",
"SN": "LCOWOTH_SN",
"FCV": "LCOWOTH_FCV",
"FCN": "LCOWOTH_FUN",
"FUV": "LCOWOTH_FUV",
"FUN": "LCOWOTH_FUN"
}
},
"BULF": {
"description": "Bovine animals, >= 1 < 2 y.o., male + Male bovine animals, >= 2 y.o.",
"columns": {
"LEVL": "LBOV1_2M_AN + LBOV2_AN",
"OV": "LBOV1_2M_OV + LBOV2_OV",
"CV": "LBOV1_2M_CV + LBOV2_CV",
"PV": "LBOV1_2M_PV + LBOV2_PV",
"PN": "LBOV1_2M_PN + LBOV2_PN",
"SV": "LBOV1_2M_SV + LBOV2_SV",
"SN": "LBOV1_2M_SN + LBOV2_SN",
"FCV": "LBOV1_2M_FCV + LBOV2_FCV",
"FCN": "LBOV1_2M_FCN + LBOV2_FCN",
"FUV": "LBOV1_2M_FUV + LBOV2_FUV",
"FUN": "LBOV1_2M_FUN + LBOV2_FUN"
}
}
},
"production": {}
},
"subsidies": {
"SA1OTHSUB_2_V": {
"source": "SA1OTHSUB_2_V",
"description": ""
},
"SA1OTHSUB_V": {
"source": "SA1OTHSUB_V",
"description": ""
},
"SA2OTHSUB_2_V": {
"source": "SA2OTHSUB_2_V",
"description": ""
},
"SA2OTHSUB_V": {
"source": "SA2OTHSUB_V",
"description": ""
},
"SA68ANIMOTHSUB_1_V": {
"source": "SA68ANIMOTHSUB_1_V",
"description": ""
},
"SA68ANIMOTHSUB_V": {
"source": "SA68ANIMOTHSUB_V",
"description": ""
},
"SA68BEFSECSUB_1_V": {
"source": "SA68BEFSECSUB_1_V",
"description": ""
},
"SA68BEFSECSUB_2_V": {
"source": "SA68BEFSECSUB_2_V",
"description": ""
},
"SA68BEFSECSUB_V": {
"source": "SA68BEFSECSUB_V",
"description": ""
},
"SA68COSTSUB_1_V": {
"source": "SA68COSTSUB_1_V",
"description": ""
},
"SA68COSTSUB_3_V": {
"source": "SA68COSTSUB_3_V",
"description": ""
},
"SA68COSTSUB_V": {
"source": "SA68COSTSUB_V",
"description": ""
},
"SA68CRPOTHSUB_1_V": {
"source": "SA68CRPOTHSUB_1_V",
"description": ""
},
"SA68CRPOTHSUB_V": {
"source": "SA68CRPOTHSUB_V",
"description": ""
},
"SA68DAIRSECSUB_1_V": {
"source": "SA68DAIRSECSUB_1_V",
"description": ""
},
"SA68DAIRSECSUB_2_V": {
"source": "SA68DAIRSECSUB_2_V",
"description": ""
},
"SA68DAIRSECSUB_V": {
"source": "SA68DAIRSECSUB_V",
"description": ""
},
"SA68OTHXCOSTSUB_1_V": {
"source": "SA68OTHXCOSTSUB_1_V",
"description": ""
},
"SA68OTHXCOSTSUB_V": {
"source": "SA68OTHXCOSTSUB_V",
"description": ""
},
"SA68RICESECSUB_1_V": {
"source": "SA68RICESECSUB_1_V",
"description": ""
},
"SA68RICESECSUB_V": {
"source": "SA68RICESECSUB_V",
"description": ""
},
"SA68SHEPGTSECSUB_1_V": {
"source": "SA68SHEPGTSECSUB_1_V",
"description": ""
},
"SA68SHEPGTSECSUB_2_V": {
"source": "SA68SHEPGTSECSUB_2_V",
"description": ""
},
"SA68SHEPGTSECSUB_V": {
"source": "SA68SHEPGTSECSUB_V",
"description": ""
},
"SAEAWSUB_2_V": {
"source": "SAEAWSUB_2_V",
"description": ""
},
"SAEAWSUB_3_V": {
"source": "SAEAWSUB_3_V",
"description": ""
},
"SAEAWSUB_V": {
"source": "SAEAWSUB_V",
"description": ""
},
"SAFR_N": {
"source": "SAFR_N",
"description": ""
},
"SAGRFR_N": {
"source": "SAGRFR_N",
"description": ""
},
"SAGRPRCTCLIMENVSUBGR_T": {
"source": "SAGRPRCTCLIMENVSUBGR_T",
"description": ""
},
"SANC_1_V": {
"source": "SANC_1_V",
"description": ""
},
"SANC_2_V": {
"source": "SANC_2_V",
"description": ""
},
"SANC_V": {
"source": "SANC_V",
"description": ""
},
"SANIMNODEFSUB_1_V": {
"source": "SANIMNODEFSUB_1_V",
"description": ""
},
"SANIMNODEFSUB_2_V": {
"source": "SANIMNODEFSUB_2_V",
"description": ""
},
"SANIMNODEFSUB_3_V": {
"source": "SANIMNODEFSUB_3_V",
"description": ""
},
"SANIMNODEFSUB_V": {
"source": "SANIMNODEFSUB_V",
"description": ""
},
"SANIMOTHPURSUB_2_V": {
"source": "SANIMOTHPURSUB_2_V",
"description": ""
},
"SANIMOTHPURSUB_3_V": {
"source": "SANIMOTHPURSUB_3_V",
"description": ""
},
"SANIMOTHPURSUB_V": {
"source": "SANIMOTHPURSUB_V",
"description": ""
},
"SANIMSUBDPOTH_1_V": {
"source": "SANIMSUBDPOTH_1_V",
"description": ""
},
"SANIMSUBDPOTH_2_V": {
"source": "SANIMSUBDPOTH_2_V",
"description": ""
},
"SANIMSUBDPOTH_3_V": {
"source": "SANIMSUBDPOTH_3_V",
"description": ""
},
"SANIMSUBDPOTH_V": {
"source": "SANIMSUBDPOTH_V",
"description": ""
},
"SANIMSUBSHROT_1_2_N": {
"source": "SANIMSUBSHROT_1_2_N",
"description": ""
},
"SANIMSUBSHROT_1_V": {
"source": "SANIMSUBSHROT_1_V",
"description": ""
},
"SANIMSUBSHROT_3_2_N": {
"source": "SANIMSUBSHROT_3_2_N",
"description": ""
},
"SANIMSUBSHROT_3_V": {
"source": "SANIMSUBSHROT_3_V",
"description": ""
},
"SANIMSUBSHROT_V": {
"source": "SANIMSUBSHROT_V",
"description": ""
},
"SANIMSUBSILK_1_V": {
"source": "SANIMSUBSILK_1_V",
"description": ""
},
"SANIMSUBSILK_3_V": {
"source": "SANIMSUBSILK_3_V",
"description": ""
},
"SANIMSUBSILK_V": {
"source": "SANIMSUBSILK_V",
"description": ""
},
"SARACRPNODEFSUB_1_V": {
"source": "SARACRPNODEFSUB_1_V",
"description": ""
},
"SARACRPNODEFSUB_3_V": {
"source": "SARACRPNODEFSUB_3_V",
"description": ""
},
"SARACRPNODEFSUB_V": {
"source": "SARACRPNODEFSUB_V",
"description": ""
},
"SBEFPURSUB_2_V": {
"source": "SBEFPURSUB_2_V",
"description": ""
},
"SBEFPURSUB_3_V": {
"source": "SBEFPURSUB_3_V",
"description": ""
},
"SBEFPURSUB_V": {
"source": "SBEFPURSUB_V",
"description": ""
},
"SBEFSUB_1_1_N": {
"source": "SBEFSUB_1_1_N",
"description": ""
},
"SBEFSUB_1_V": {
"source": "SBEFSUB_1_V",
"description": ""
},
"SBEFSUB_2_1_N": {
"source": "SBEFSUB_2_1_N",
"description": ""
},
"SBEFSUB_2_V": {
"source": "SBEFSUB_2_V",
"description": ""
},
"SBEFSUB_3_1_N": {
"source": "SBEFSUB_3_1_N",
"description": ""
},
"SBEFSUB_3_V": {
"source": "SBEFSUB_3_V",
"description": ""
},
"SBEFSUB_V": {
"source": "SBEFSUB_V",
"description": ""
},
"SBERNUTSUB_1_V": {
"source": "SBERNUTSUB_1_V",
"description": ""
},
"SBERNUTSUB_3_V": {
"source": "SBERNUTSUB_3_V",
"description": ""
},
"SBERNUTSUB_V": {
"source": "SBERNUTSUB_V",
"description": ""
},
"SBFR_N": {
"source": "SBFR_N",
"description": ""
},
"SBPS_1_1_N": {
"source": "SBPS_1_1_N",
"description": ""
},
"SBPS_1_2_N": {
"source": "SBPS_1_2_N",
"description": ""
},
"SBPS_1_3_N": {
"source": "SBPS_1_3_N",
"description": ""
},
"SBPS_1_V": {
"source": "SBPS_1_V",
"description": ""
},
"SBPS_2_1_N": {
"source": "SBPS_2_1_N",
"description": ""
},
"SBPS_2_2_N": {
"source": "SBPS_2_2_N",
"description": ""
},
"SBPS_2_3_N": {
"source": "SBPS_2_3_N",
"description": ""
},
"SBPS_2_V": {
"source": "SBPS_2_V",
"description": ""
},
"SBPS_3_1_N": {
"source": "SBPS_3_1_N",
"description": ""
},
"SBPS_3_2_N": {
"source": "SBPS_3_2_N",
"description": ""
},
"SBPS_3_3_N": {
"source": "SBPS_3_3_N",
"description": ""
},
"SBPS_3_V": {
"source": "SBPS_3_V",
"description": ""
},
"SBPS_V": {
"source": "SBPS_V",
"description": ""
},
"SCATLSUB_1_V": {
"source": "SCATLSUB_1_V",
"description": ""
},
"SCATLSUB_3_V": {
"source": "SCATLSUB_3_V",
"description": ""
},
"SCATLSUB_V": {
"source": "SCATLSUB_V",
"description": ""
},
"SCITRPLTSSUB_1_V": {
"source": "SCITRPLTSSUB_1_V",
"description": ""
},
"SCITRPLTSSUB_3_V": {
"source": "SCITRPLTSSUB_3_V",
"description": ""
},
"SCITRPLTSSUB_V": {
"source": "SCITRPLTSSUB_V",
"description": ""
},
"SCOPSUB_1_V": {
"source": "SCOPSUB_1_V",
"description": ""
},
"SCOPSUB_3_V": {
"source": "SCOPSUB_3_V",
"description": ""
},
"SCOPSUB_V": {
"source": "SCOPSUB_V",
"description": ""
},
"SCOPSUBCER_1_2_N": {
"source": "SCOPSUBCER_1_2_N",
"description": ""
},
"SCOPSUBCER_1_3_N": {
"source": "SCOPSUBCER_1_3_N",
"description": ""
},
"SCOPSUBCER_1_V": {
"source": "SCOPSUBCER_1_V",
"description": ""
},
"SCOPSUBCER_2_2_N": {
"source": "SCOPSUBCER_2_2_N",
"description": ""
},
"SCOPSUBCER_2_3_N": {
"source": "SCOPSUBCER_2_3_N",
"description": ""
},
"SCOPSUBCER_2_V": {
"source": "SCOPSUBCER_2_V",
"description": ""
},
"SCOPSUBCER_3_2_N": {
"source": "SCOPSUBCER_3_2_N",
"description": ""
},
"SCOPSUBCER_3_3_N": {
"source": "SCOPSUBCER_3_3_N",
"description": ""
},
"SCOPSUBCER_3_V": {
"source": "SCOPSUBCER_3_V",
"description": ""
},
"SCOPSUBCER_V": {
"source": "SCOPSUBCER_V",
"description": ""
},
"SCOPSUBOIL_1_V": {
"source": "SCOPSUBOIL_1_V",
"description": ""
},
"SCOPSUBOIL_2_V": {
"source": "SCOPSUBOIL_2_V",
"description": ""
},
"SCOPSUBOIL_3_V": {
"source": "SCOPSUBOIL_3_V",
"description": ""
},
"SCOPSUBOIL_V": {
"source": "SCOPSUBOIL_V",
"description": ""
},
"SCOPSUBPROT_1_V": {
"source": "SCOPSUBPROT_1_V",
"description": ""
},
"SCOPSUBPROT_2_V": {
"source": "SCOPSUBPROT_2_V",
"description": ""
},
"SCOPSUBPROT_3_V": {
"source": "SCOPSUBPROT_3_V",
"description": ""
},
"SCOPSUBPROT_V": {
"source": "SCOPSUBPROT_V",
"description": ""
},
"SCOSTOTHSUB_1_V": {
"source": "SCOSTOTHSUB_1_V",
"description": ""
},
"SCOSTOTHSUB_2_V": {
"source": "SCOSTOTHSUB_2_V",
"description": ""
},
"SCOSTOTHSUB_3_V": {
"source": "SCOSTOTHSUB_3_V",
"description": ""
},
"SCOSTOTHSUB_V": {
"source": "SCOSTOTHSUB_V",
"description": ""
},
"SCOTNSUB_1_V": {
"source": "SCOTNSUB_1_V",
"description": ""
},
"SCOTNSUB_3_V": {
"source": "SCOTNSUB_3_V",
"description": ""
},
"SCOTNSUB_V": {
"source": "SCOTNSUB_V",
"description": ""
},
"SCRPCATCH_N": {
"source": "SCRPCATCH_N",
"description": ""
},
"SCRPCOSTSUB_1_V": {
"source": "SCRPCOSTSUB_1_V",
"description": ""
},
"SCRPCOSTSUB_2_V": {
"source": "SCRPCOSTSUB_2_V",
"description": ""
},
"SCRPCOSTSUB_3_V": {
"source": "SCRPCOSTSUB_3_V",
"description": ""
},
"SCRPCOSTSUB_V": {
"source": "SCRPCOSTSUB_V",
"description": ""
},
"SCRPDVRSUBGR_N": {
"source": "SCRPDVRSUBGR_N",
"description": ""
},
"SCRPDVRSUBGR_T": {
"source": "SCRPDVRSUBGR_T",
"description": ""
},
"SCRPINDOTHSUB_1_V": {
"source": "SCRPINDOTHSUB_1_V",
"description": ""
},
"SCRPINDOTHSUB_2_V": {
"source": "SCRPINDOTHSUB_2_V",
"description": ""
},
"SCRPINDOTHSUB_3_V": {
"source": "SCRPINDOTHSUB_3_V",
"description": ""
},
"SCRPINDOTHSUB_V": {
"source": "SCRPINDOTHSUB_V",
"description": ""
},
"SCRPINDSUB_1_V": {
"source": "SCRPINDSUB_1_V",
"description": ""
},
"SCRPINDSUB_3_V": {
"source": "SCRPINDSUB_3_V",
"description": ""
},
"SCRPINDSUB_V": {
"source": "SCRPINDSUB_V",
"description": ""
},
"SCRPINDSUBCHIC_1_V": {
"source": "SCRPINDSUBCHIC_1_V",
"description": ""
},
"SCRPINDSUBCHIC_2_V": {
"source": "SCRPINDSUBCHIC_2_V",
"description": ""
},
"SCRPINDSUBCHIC_3_V": {
"source": "SCRPINDSUBCHIC_3_V",
"description": ""
},
"SCRPINDSUBCHIC_V": {
"source": "SCRPINDSUBCHIC_V",
"description": ""
},
"SCRPINDSUBFLAX_1_V": {
"source": "SCRPINDSUBFLAX_1_V",
"description": ""
},
"SCRPINDSUBFLAX_2_V": {
"source": "SCRPINDSUBFLAX_2_V",
"description": ""
},
"SCRPINDSUBFLAX_3_V": {
"source": "SCRPINDSUBFLAX_3_V",
"description": ""
},
"SCRPINDSUBFLAX_V": {
"source": "SCRPINDSUBFLAX_V",
"description": ""
},
"SCRPINDSUBHEMP_1_V": {
"source": "SCRPINDSUBHEMP_1_V",
"description": ""
},
"SCRPINDSUBHEMP_2_V": {
"source": "SCRPINDSUBHEMP_2_V",
"description": ""
},
"SCRPINDSUBHEMP_3_V": {
"source": "SCRPINDSUBHEMP_3_V",
"description": ""
},
"SCRPINDSUBHEMP_V": {
"source": "SCRPINDSUBHEMP_V",
"description": ""
},
"SCRPINDSUBHOP_1_V": {
"source": "SCRPINDSUBHOP_1_V",
"description": ""
},
"SCRPINDSUBHOP_2_V": {
"source": "SCRPINDSUBHOP_2_V",
"description": ""
},
"SCRPINDSUBHOP_3_V": {
"source": "SCRPINDSUBHOP_3_V",
"description": ""
},
"SCRPINDSUBHOP_V": {
"source": "SCRPINDSUBHOP_V",
"description": ""
},
"SCRPINDSUBLEG_1_V": {
"source": "SCRPINDSUBLEG_1_V",
"description": ""
},
"SCRPINDSUBLEG_3_V": {
"source": "SCRPINDSUBLEG_3_V",
"description": ""
},
"SCRPINDSUBLEG_V": {
"source": "SCRPINDSUBLEG_V",
"description": ""
},
"SCRPINDSUBRICE_1_V": {
"source": "SCRPINDSUBRICE_1_V",
"description": ""
},
"SCRPINDSUBRICE_3_V": {
"source": "SCRPINDSUBRICE_3_V",
"description": ""
},
"SCRPINDSUBRICE_V": {
"source": "SCRPINDSUBRICE_V",
"description": ""
},
"SCRPINDSUBSUGCN_1_V": {
"source": "SCRPINDSUBSUGCN_1_V",
"description": ""
},
"SCRPINDSUBSUGCN_2_V": {
"source": "SCRPINDSUBSUGCN_2_V",
"description": ""
},
"SCRPINDSUBSUGCN_3_V": {
"source": "SCRPINDSUBSUGCN_3_V",
"description": ""
},
"SCRPINDSUBSUGCN_V": {
"source": "SCRPINDSUBSUGCN_V",
"description": ""
},
"SCRPPERMNDEFSUB_1_2_N": {
"source": "SCRPPERMNDEFSUB_1_2_N",
"description": ""
},
"SCRPPERMNDEFSUB_1_3_N": {
"source": "SCRPPERMNDEFSUB_1_3_N",
"description": ""
},
"SCRPPERMNDEFSUB_1_V": {
"source": "SCRPPERMNDEFSUB_1_V",
"description": ""
},
"SCRPPERMNDEFSUB_2_2_N": {
"source": "SCRPPERMNDEFSUB_2_2_N",
"description": ""
},
"SCRPPERMNDEFSUB_2_3_N": {
"source": "SCRPPERMNDEFSUB_2_3_N",
"description": ""
},
"SCRPPERMNDEFSUB_2_V": {
"source": "SCRPPERMNDEFSUB_2_V",
"description": ""
},
"SCRPPERMNDEFSUB_3_2_N": {
"source": "SCRPPERMNDEFSUB_3_2_N",
"description": ""
},
"SCRPPERMNDEFSUB_3_3_N": {
"source": "SCRPPERMNDEFSUB_3_3_N",
"description": ""
},
"SCRPPERMNDEFSUB_3_V": {
"source": "SCRPPERMNDEFSUB_3_V",
"description": ""
},
"SCRPPERMNDEFSUB_V": {
"source": "SCRPPERMNDEFSUB_V",
"description": ""
},
"SCRPPERMSUBBERRY_1_V": {
"source": "SCRPPERMSUBBERRY_1_V",
"description": ""
},
"SCRPPERMSUBBERRY_2_V": {
"source": "SCRPPERMSUBBERRY_2_V",
"description": ""
},
"SCRPPERMSUBBERRY_3_V": {
"source": "SCRPPERMSUBBERRY_3_V",
"description": ""
},
"SCRPPERMSUBBERRY_V": {
"source": "SCRPPERMSUBBERRY_V",
"description": ""
},
"SCRPPERMSUBNUT_1_V": {
"source": "SCRPPERMSUBNUT_1_V",
"description": ""
},
"SCRPPERMSUBNUT_2_V": {
"source": "SCRPPERMSUBNUT_2_V",
"description": ""
},
"SCRPPERMSUBNUT_3_V": {
"source": "SCRPPERMSUBNUT_3_V",
"description": ""
},
"SCRPPERMSUBNUT_V": {
"source": "SCRPPERMSUBNUT_V",
"description": ""
},
"SDAIRSUB_1_1_N": {
"source": "SDAIRSUB_1_1_N",
"description": ""
},
"SDAIRSUB_1_3_N": {
"source": "SDAIRSUB_1_3_N",
"description": ""
},
"SDAIRSUB_1_V": {
"source": "SDAIRSUB_1_V",
"description": ""
},
"SDAIRSUB_2_1_N": {
"source": "SDAIRSUB_2_1_N",
"description": ""
},
"SDAIRSUB_2_3_N": {
"source": "SDAIRSUB_2_3_N",
"description": ""
},
"SDAIRSUB_2_V": {
"source": "SDAIRSUB_2_V",
"description": ""
},
"SDAIRSUB_3_1_N": {
"source": "SDAIRSUB_3_1_N",
"description": ""
},
"SDAIRSUB_3_3_N": {
"source": "SDAIRSUB_3_3_N",
"description": ""
},
"SDAIRSUB_3_V": {
"source": "SDAIRSUB_3_V",
"description": ""
},
"SDAIRSUB_V": {
"source": "SDAIRSUB_V",
"description": ""
},
"SDIFPRVSACCYRS_1_V": {
"source": "SDIFPRVSACCYRS_1_V",
"description": ""
},
"SDIFPRVSACCYRS_2_V": {
"source": "SDIFPRVSACCYRS_2_V",
"description": ""
},
"SDIFPRVSACCYRS_3_V": {
"source": "SDIFPRVSACCYRS_3_V",
"description": ""
},
"SDIFPRVSACCYRS_V": {
"source": "SDIFPRVSACCYRS_V",
"description": ""
},
"SDRYFODSUB_1_V": {
"source": "SDRYFODSUB_1_V",
"description": ""
},
"SDRYFODSUB_3_V": {
"source": "SDRYFODSUB_3_V",
"description": ""
},
"SDRYFODSUB_V": {
"source": "SDRYFODSUB_V",
"description": ""
},
"SDSTRSUB_1_V": {
"source": "SDSTRSUB_1_V",
"description": ""
},
"SDSTRSUB_2_V": {
"source": "SDSTRSUB_2_V",
"description": ""
},
"SDSTRSUB_3_V": {
"source": "SDSTRSUB_3_V",
"description": ""
},
"SDSTRSUB_V": {
"source": "SDSTRSUB_V",
"description": ""
},
"SEFASUBGR_N": {
"source": "SEFASUBGR_N",
"description": ""
},
"SEFASUBGR_T": {
"source": "SEFASUBGR_T",
"description": ""
},
"SELSUB_1_V": {
"source": "SELSUB_1_V",
"description": ""
},
"SELSUB_2_V": {
"source": "SELSUB_2_V",
"description": ""
},
"SELSUB_3_V": {
"source": "SELSUB_3_V",
"description": ""
},
"SELSUB_V": {
"source": "SELSUB_V",
"description": ""
},
"SFEDGRZLVSUB_1_V": {
"source": "SFEDGRZLVSUB_1_V",
"description": ""
},
"SFEDGRZLVSUB_2_V": {
"source": "SFEDGRZLVSUB_2_V",
"description": ""
},
"SFEDGRZLVSUB_3_V": {
"source": "SFEDGRZLVSUB_3_V",
"description": ""
},
"SFEDGRZLVSUB_V": {
"source": "SFEDGRZLVSUB_V",
"description": ""
},
"SFEDPIGSUB_1_V": {
"source": "SFEDPIGSUB_1_V",
"description": ""
},
"SFEDPIGSUB_2_V": {
"source": "SFEDPIGSUB_2_V",
"description": ""
},
"SFEDPIGSUB_3_V": {
"source": "SFEDPIGSUB_3_V",
"description": ""
},
"SFEDPIGSUB_V": {
"source": "SFEDPIGSUB_V",
"description": ""
},
"SFLNDSUBGR_N": {
"source": "SFLNDSUBGR_N",
"description": ""
},
"SFLSHTGSUB_1_V": {
"source": "SFLSHTGSUB_1_V",
"description": ""
},
"SFLSHTGSUB_2_V": {
"source": "SFLSHTGSUB_2_V",
"description": ""
},
"SFLSHTGSUB_3_V": {
"source": "SFLSHTGSUB_3_V",
"description": ""
},
"SFLSHTGSUB_V": {
"source": "SFLSHTGSUB_V",
"description": ""
},
"SFLSMTRSUB_1_V": {
"source": "SFLSMTRSUB_1_V",
"description": ""
},
"SFLSMTRSUB_2_V": {
"source": "SFLSMTRSUB_2_V",
"description": ""
},
"SFLSMTRSUB_3_V": {
"source": "SFLSMTRSUB_3_V",
"description": ""
},
"SFLSMTRSUB_V": {
"source": "SFLSMTRSUB_V",
"description": ""
},
"SFLWLNDSUB_1_V": {
"source": "SFLWLNDSUB_1_V",
"description": ""
},
"SFLWLNDSUB_3_V": {
"source": "SFLWLNDSUB_3_V",
"description": ""
},
"SFLWLNDSUB_V": {
"source": "SFLWLNDSUB_V",
"description": ""
},
"SFRSUB_2_V": {
"source": "SFRSUB_2_V",
"description": ""
},
"SFRSUB_V": {
"source": "SFRSUB_V",
"description": ""
},
"SFRSUBIMP_2_V": {
"source": "SFRSUBIMP_2_V",
"description": ""
},
"SFRSUBIMP_V": {
"source": "SFRSUBIMP_V",
"description": ""
},
"SFRSUBN2000_2_V": {
"source": "SFRSUBN2000_2_V",
"description": ""
},
"SFRSUBN2000_V": {
"source": "SFRSUBN2000_V",
"description": ""
},
"SFRTSUB_1_V": {
"source": "SFRTSUB_1_V",
"description": ""
},
"SFRTSUB_2_V": {
"source": "SFRTSUB_2_V",
"description": ""
},
"SFRTSUB_3_V": {
"source": "SFRTSUB_3_V",
"description": ""
},
"SFRTSUB_V": {
"source": "SFRTSUB_V",
"description": ""
},
"SFRUTVEGSUB_1_V": {
"source": "SFRUTVEGSUB_1_V",
"description": ""
},
"SFRUTVEGSUB_V": {
"source": "SFRUTVEGSUB_V",
"description": ""
},
"SINSSUB_1_V": {
"source": "SINSSUB_1_V",
"description": ""
},
"SINSSUB_2_V": {
"source": "SINSSUB_2_V",
"description": ""
},
"SINSSUB_3_V": {
"source": "SINSSUB_3_V",
"description": ""
},
"SINSSUB_V": {
"source": "SINSSUB_V",
"description": ""
},
"SINTSUB_1_V": {
"source": "SINTSUB_1_V",
"description": ""
},
"SINTSUB_2_V": {
"source": "SINTSUB_2_V",
"description": ""
},
"SINTSUB_3_V": {
"source": "SINTSUB_3_V",
"description": ""
},
"SINTSUB_V": {
"source": "SINTSUB_V",
"description": ""
},
"SINVSUB_2_V": {
"source": "SINVSUB_2_V",
"description": ""
},
"SINVSUB_3_V": {
"source": "SINVSUB_3_V",
"description": ""
},
"SINVSUB_V": {
"source": "SINVSUB_V",
"description": ""
},
"SLNDS_N": {
"source": "SLNDS_N",
"description": ""
},
"SLNTL_N": {
"source": "SLNTL_N",
"description": ""
},
"SLVDAIRPURSUB_2_V": {
"source": "SLVDAIRPURSUB_2_V",
"description": ""
},
"SLVDAIRPURSUB_3_V": {
"source": "SLVDAIRPURSUB_3_V",
"description": ""
},
"SLVDAIRPURSUB_V": {
"source": "SLVDAIRPURSUB_V",
"description": ""
},
"SLVOTHCOSTSUB_1_V": {
"source": "SLVOTHCOSTSUB_1_V",
"description": ""
},
"SLVOTHCOSTSUB_2_V": {
"source": "SLVOTHCOSTSUB_2_V",
"description": ""
},
"SLVOTHCOSTSUB_3_V": {
"source": "SLVOTHCOSTSUB_3_V",
"description": ""
},
"SLVOTHCOSTSUB_V": {
"source": "SLVOTHCOSTSUB_V",
"description": ""
},
"SN2000SUB_2_V": {
"source": "SN2000SUB_2_V",
"description": ""
},
"SN2000SUB_V": {
"source": "SN2000SUB_V",
"description": ""
},
"SNFC_N": {
"source": "SNFC_N",
"description": ""
},
"SNHNDMNTSUB_2_V": {
"source": "SNHNDMNTSUB_2_V",
"description": ""
},
"SNHNDMNTSUB_V": {
"source": "SNHNDMNTSUB_V",
"description": ""
},
"SNO1K2KSUB_1_V": {
"source": "SNO1K2KSUB_1_V",
"description": ""
},
"SNO1K2KSUB_2_V": {
"source": "SNO1K2KSUB_2_V",
"description": ""
},
"SNO1K2KSUB_3_V": {
"source": "SNO1K2KSUB_3_V",
"description": ""
},
"SNO1K2KSUB_V": {
"source": "SNO1K2KSUB_V",
"description": ""
},
"SNRPCOTNSUB_1_V": {
"source": "SNRPCOTNSUB_1_V",
"description": ""
},
"SNRPCOTNSUB_3_V": {
"source": "SNRPCOTNSUB_3_V",
"description": ""
},
"SNRPCOTNSUB_V": {
"source": "SNRPCOTNSUB_V",
"description": ""
},
"SOGACOSTSUB_1_V": {
"source": "SOGACOSTSUB_1_V",
"description": ""
},
"SOGACOSTSUB_2_V": {
"source": "SOGACOSTSUB_2_V",
"description": ""
},
"SOGACOSTSUB_3_V": {
"source": "SOGACOSTSUB_3_V",
"description": ""
},
"SOGACOSTSUB_V": {
"source": "SOGACOSTSUB_V",
"description": ""
},
"SORGSUB_2_V": {
"source": "SORGSUB_2_V",
"description": ""
},
"SORGSUB_3_V": {
"source": "SORGSUB_3_V",
"description": ""
},
"SORGSUB_V": {
"source": "SORGSUB_V",
"description": ""
},
"SOTHEXCPSUB_1_V": {
"source": "SOTHEXCPSUB_1_V",
"description": ""
},
"SOTHEXCPSUB_2_V": {
"source": "SOTHEXCPSUB_2_V",
"description": ""
},
"SOTHEXCPSUB_3_V": {
"source": "SOTHEXCPSUB_3_V",
"description": ""
},
"SOTHEXCPSUB_V": {
"source": "SOTHEXCPSUB_V",
"description": ""
},
"SPEA_N": {
"source": "SPEA_N",
"description": ""
},
"SPERMGRSN2000_T": {
"source": "SPERMGRSN2000_T",
"description": ""
},
"SPERMGRSNON2000_T": {
"source": "SPERMGRSNON2000_T",
"description": ""
},
"SPERMGRSSUB_1_V": {
"source": "SPERMGRSSUB_1_V",
"description": ""
},
"SPERMGRSSUB_3_V": {
"source": "SPERMGRSSUB_3_V",
"description": ""
},
"SPERMGRSSUB_V": {
"source": "SPERMGRSSUB_V",
"description": ""
},
"SPERMGRSSUBGR_N": {
"source": "SPERMGRSSUBGR_N",
"description": ""
},
"SPERMGRSSUBGR_T": {
"source": "SPERMGRSSUBGR_T",
"description": ""
},
"SPIGPLTRPURSUB_2_V": {
"source": "SPIGPLTRPURSUB_2_V",
"description": ""
},
"SPIGPLTRPURSUB_3_V": {
"source": "SPIGPLTRPURSUB_3_V",
"description": ""
},
"SPIGPLTRPURSUB_V": {
"source": "SPIGPLTRPURSUB_V",
"description": ""
},
"SPIGPLTRSUB_1_1_N": {
"source": "SPIGPLTRSUB_1_1_N",
"description": ""
},
"SPIGPLTRSUB_1_3_N": {
"source": "SPIGPLTRSUB_1_3_N",
"description": ""
},
"SPIGPLTRSUB_1_V": {
"source": "SPIGPLTRSUB_1_V",
"description": ""
},
"SPIGPLTRSUB_2_1_N": {
"source": "SPIGPLTRSUB_2_1_N",
"description": ""
},
"SPIGPLTRSUB_2_3_N": {
"source": "SPIGPLTRSUB_2_3_N",
"description": ""
},
"SPIGPLTRSUB_2_V": {
"source": "SPIGPLTRSUB_2_V",
"description": ""
},
"SPIGPLTRSUB_3_1_N": {
"source": "SPIGPLTRSUB_3_1_N",
"description": ""
},
"SPIGPLTRSUB_3_3_N": {
"source": "SPIGPLTRSUB_3_3_N",
"description": ""
},
"SPIGPLTRSUB_3_V": {
"source": "SPIGPLTRSUB_3_V",
"description": ""
},
"SPIGPLTRSUB_V": {
"source": "SPIGPLTRSUB_V",
"description": ""
},
"SPLTSOILSUB_1_V": {
"source": "SPLTSOILSUB_1_V",
"description": ""
},
"SPLTSOILSUB_3_V": {
"source": "SPLTSOILSUB_3_V",
"description": ""
},
"SPLTSOILSUB_V": {
"source": "SPLTSOILSUB_V",
"description": ""
},
"SPLTVINSUB_1_V": {
"source": "SPLTVINSUB_1_V",
"description": ""
},
"SPLTVINSUB_3_V": {
"source": "SPLTVINSUB_3_V",
"description": ""
},
"SPLTVINSUB_V": {
"source": "SPLTVINSUB_V",
"description": ""
},
"SPMSFSUB_1_V": {
"source": "SPMSFSUB_1_V",
"description": ""
},
"SPMSFSUB_3_V": {
"source": "SPMSFSUB_3_V",
"description": ""
},
"SPMSFSUB_V": {
"source": "SPMSFSUB_V",
"description": ""
},
"SPOTSUB_1_V": {
"source": "SPOTSUB_1_V",
"description": ""
},
"SPOTSUB_3_V": {
"source": "SPOTSUB_3_V",
"description": ""
},
"SPOTSUB_V": {
"source": "SPOTSUB_V",
"description": ""
},
"SPOTSUBOWST_1_V": {
"source": "SPOTSUBOWST_1_V",
"description": ""
},
"SPOTSUBOWST_2_V": {
"source": "SPOTSUBOWST_2_V",
"description": ""
},
"SPOTSUBOWST_3_V": {
"source": "SPOTSUBOWST_3_V",
"description": ""
},
"SPOTSUBOWST_V": {
"source": "SPOTSUBOWST_V",
"description": ""
},
"SPRCTCLIMENV_1_V": {
"source": "SPRCTCLIMENV_1_V",
"description": ""
},
"SPRCTCLIMENV_2_V": {
"source": "SPRCTCLIMENV_2_V",
"description": ""
},
"SPRCTCLIMENV_V": {
"source": "SPRCTCLIMENV_V",
"description": ""
},
"SPRTCRPSUB_1_V": {
"source": "SPRTCRPSUB_1_V",
"description": ""
},
"SPRTCRPSUB_2_V": {
"source": "SPRTCRPSUB_2_V",
"description": ""
},
"SPRTCRPSUB_3_V": {
"source": "SPRTCRPSUB_3_V",
"description": ""
},
"SPRTCRPSUB_V": {
"source": "SPRTCRPSUB_V",
"description": ""
},
"SPS1300_V": {
"source": "SPS1300_V",
"description": ""
},
"SPS1300_1_V": {
"source": "SPS1300_1_V",
"description": ""
},
"SRDOTHSUB_2_V": {
"source": "SRDOTHSUB_2_V",
"description": ""
},
"SRDOTHSUB_V": {
"source": "SRDOTHSUB_V",
"description": ""
},
"SSAPS_1_2_N": {
"source": "SSAPS_1_2_N",
"description": ""
},
"SSAPS_1_V": {
"source": "SSAPS_1_V",
"description": ""
},
"SSAPS_2_2_N": {
"source": "SSAPS_2_2_N",
"description": ""
},
"SSAPS_2_V": {
"source": "SSAPS_2_V",
"description": ""
},
"SSAPS_3_2_N": {
"source": "SSAPS_3_2_N",
"description": ""
},
"SSAPS_3_V": {
"source": "SSAPS_3_V",
"description": ""
},
"SSAPS_V": {
"source": "SSAPS_V",
"description": ""
},
"SSCOTNSUB_1_V": {
"source": "SSCOTNSUB_1_V",
"description": ""
},
"SSCOTNSUB_3_V": {
"source": "SSCOTNSUB_3_V",
"description": ""
},
"SSCOTNSUB_V": {
"source": "SSCOTNSUB_V",
"description": ""
},
"SSCOWPRM_1_V": {
"source": "SSCOWPRM_1_V",
"description": ""
},
"SSCOWPRM_2_V": {
"source": "SSCOWPRM_2_V",
"description": ""
},
"SSCOWPRM_V": {
"source": "SSCOWPRM_V",
"description": ""
},
"SSCOWPRMADD_1_V": {
"source": "SSCOWPRMADD_1_V",
"description": ""
},
"SSCOWPRMADD_2_V": {
"source": "SSCOWPRMADD_2_V",
"description": ""
},
"SSCOWPRMADD_3_V": {
"source": "SSCOWPRMADD_3_V",
"description": ""
},
"SSCOWPRMADD_V": {
"source": "SSCOWPRMADD_V",
"description": ""
},
"SSDSTRSUB_2_V": {
"source": "SSDSTRSUB_2_V",
"description": ""
},
"SSDSTRSUB_V": {
"source": "SSDSTRSUB_V",
"description": ""
},
"SSEDSUB_1_V": {
"source": "SSEDSUB_1_V",
"description": ""
},
"SSEDSUB_2_V": {
"source": "SSEDSUB_2_V",
"description": ""
},
"SSEDSUB_3_V": {
"source": "SSEDSUB_3_V",
"description": ""
},
"SSEDSUB_V": {
"source": "SSEDSUB_V",
"description": ""
},
"SSFS_1_V": {
"source": "SSFS_1_V",
"description": ""
},
"SSFS_2_V": {
"source": "SSFS_2_V",
"description": ""
},
"SSFS_V": {
"source": "SSFS_V",
"description": ""
},
"SSHEPGTPRM_1_V": {
"source": "SSHEPGTPRM_1_V",
"description": ""
},
"SSHEPGTPRM_2_V": {
"source": "SSHEPGTPRM_2_V",
"description": ""
},
"SSHEPGTPRM_V": {
"source": "SSHEPGTPRM_V",
"description": ""
},
"SSHEPGTPRMSUP_1_V": {
"source": "SSHEPGTPRMSUP_1_V",
"description": ""
},
"SSHEPGTPRMSUP_2_V": {
"source": "SSHEPGTPRMSUP_2_V",
"description": ""
},
"SSHEPGTPRMSUP_V": {
"source": "SSHEPGTPRMSUP_V",
"description": ""
},
"SSHEPGTPURSUB_2_V": {
"source": "SSHEPGTPURSUB_2_V",
"description": ""
},
"SSHEPGTPURSUB_3_V": {
"source": "SSHEPGTPURSUB_3_V",
"description": ""
},
"SSHEPGTPURSUB_V": {
"source": "SSHEPGTPURSUB_V",
"description": ""
},
"SSHEPGTSUB_1_1_N": {
"source": "SSHEPGTSUB_1_1_N",
"description": ""
},
"SSHEPGTSUB_1_3_N": {
"source": "SSHEPGTSUB_1_3_N",
"description": ""
},
"SSHEPGTSUB_1_V": {
"source": "SSHEPGTSUB_1_V",
"description": ""
},
"SSHEPGTSUB_2_1_N": {
"source": "SSHEPGTSUB_2_1_N",
"description": ""
},
"SSHEPGTSUB_2_3_N": {
"source": "SSHEPGTSUB_2_3_N",
"description": ""
},
"SSHEPGTSUB_2_V": {
"source": "SSHEPGTSUB_2_V",
"description": ""
},
"SSHEPGTSUB_3_1_N": {
"source": "SSHEPGTSUB_3_1_N",
"description": ""
},
"SSHEPGTSUB_3_3_N": {
"source": "SSHEPGTSUB_3_3_N",
"description": ""
},
"SSHEPGTSUB_3_V": {
"source": "SSHEPGTSUB_3_V",
"description": ""
},
"SSHEPGTSUB_V": {
"source": "SSHEPGTSUB_V",
"description": ""
},
"SSHROT_N": {
"source": "SSHROT_N",
"description": ""
},
"SSPSN_1_V": {
"source": "SSPSN_1_V",
"description": ""
},
"SSPSN_2_V": {
"source": "SSPSN_2_V",
"description": ""
},
"SSPSN_V": {
"source": "SSPSN_V",
"description": ""
},
"SSPSPERMGRS_1_V": {
"source": "SSPSPERMGRS_1_V",
"description": ""
},
"SSPSPERMGRS_V": {
"source": "SSPSPERMGRS_V",
"description": ""
},
"SSPSS_1_V": {
"source": "SSPSS_1_V",
"description": ""
},
"SSPSS_V": {
"source": "SSPSS_V",
"description": ""
},
"SSSEDSUB_1_V": {
"source": "SSSEDSUB_1_V",
"description": ""
},
"SSSEDSUB_2_V": {
"source": "SSSEDSUB_2_V",
"description": ""
},
"SSSEDSUB_3_V": {
"source": "SSSEDSUB_3_V",
"description": ""
},
"SSSEDSUB_V": {
"source": "SSSEDSUB_V",
"description": ""
},
"SSTRFR_N": {
"source": "SSTRFR_N",
"description": ""
},
"SSUGBTSUB_1_V": {
"source": "SSUGBTSUB_1_V",
"description": ""
},
"SSUGBTSUB_3_V": {
"source": "SSUGBTSUB_3_V",
"description": ""
},
"SSUGBTSUB_V": {
"source": "SSUGBTSUB_V",
"description": ""
},
"STRC_N": {
"source": "STRC_N",
"description": ""
},
"SVEGSUB_1_V": {
"source": "SVEGSUB_1_V",
"description": ""
},
"SVEGSUB_3_V": {
"source": "SVEGSUB_3_V",
"description": ""
},
"SVEGSUB_V": {
"source": "SVEGSUB_V",
"description": ""
},
"SWATRSUB_1_V": {
"source": "SWATRSUB_1_V",
"description": ""
},
"SWATRSUB_2_V": {
"source": "SWATRSUB_2_V",
"description": ""
},
"SWATRSUB_3_V": {
"source": "SWATRSUB_3_V",
"description": ""
},
"SWATRSUB_V": {
"source": "SWATRSUB_V",
"description": ""
},
"SWGSSUB_1_V": {
"source": "SWGSSUB_1_V",
"description": ""
},
"SWGSSUB_2_V": {
"source": "SWGSSUB_2_V",
"description": ""
},
"SWGSSUB_3_V": {
"source": "SWGSSUB_3_V",
"description": ""
},
"SWGSSUB_V": {
"source": "SWGSSUB_V",
"description": ""
},
"SYF_1_V": {
"source": "SYF_1_V",
"description": ""
},
"SYF_2_V": {
"source": "SYF_2_V",
"description": ""
},
"SYF_V": {
"source": "SYF_V",
"description": ""
}
},
"crops": {
"SWHE": {
"description": "Soft wheat",
"columns": {
"LEVL": "CWHTC_TA",
"GROF": "CWHTC_PRQ",
"INTF": "CWHTC_FUV",
"EAAP": "CWHTC_TO",
"UVAG": "ifelse( CWHTC_PRQ>0, CWHTC_TO/CWHTC_PRQ, 0)",
"UVSA": "ifelse( CWHTC_SQ>0, CWHTC_SV/CWHTC_SQ, 0 )",
"IRTA": "CWHTC_IRTA"
}
},
"DWHE": {
"description": "Durum wheat",
"columns": {
"LEVL": "CWHTD_TA",
"GROF": "CWHTD_PRQ",
"INTF": "CWHTD_FUV",
"EAAP": "CWHTD_TO",
"UVAG": "ifelse( CWHTD_PRQ>0, CWHTD_TO/CWHTD_PRQ, 0 )",
"UVSA": "ifelse( CWHTD_SQ>0, CWHTD_SV/CWHTD_SQ, 0 )",
"IRTA": "CWHTD_IRTA"
}
},
"RYEM": {
"description": "Rye and meslin",
"columns": {
"LEVL": "CRYE_TA",
"GROF": "CRYE_PRQ",
"INTF": "CRYE_FUV",
"EAAP": "CRYE_TO",
"UVAG": "ifelse( CRYE_PRQ>0, CRYE_TO/CRYE_PRQ, 0 )",
"UVSA": "ifelse( CRYE_SQ>0, CRYE_SV/CRYE_SQ, 0 )",
"IRTA": "CRYE_IRA"
}
},
"BARL": {
"description": "Barley",
"columns": {
"LEVL": "CBRL_TA",
"GROF": "CBRL_PRQ",
"INTF": "CBRL_FUV",
"EAAP": "CBRL_TO",
"UVAG": "ifelse( CBRL_PRQ>0, CBRL_TO/CBRL_PRQ, 0)",
"UVSA": "ifelse( CBRL_SQ>0, CBRL_SV/CBRL_SQ, 0 )",
"IRTA": "CBRL_IRTA"
}
},
"OATS": {
"description": "Oats",
"columns": {
"LEVL": "COAT_TA",
"GROF": "COAT_PRQ",
"INTF": "COAT_FUV",
"EAAP": "COAT_TO",
"UVAG": "ifelse( COAT_PRQ>0, COAT_TO/COAT_PRQ, 0 )",
"UVSA": "ifelse( COAT_SQ>0, COAT_SV/COAT_SQ, 0 )",
"IRTA": "COAT_IRA"
}
},
"MAIZ": {
"description": "Grain maize",
"columns": {
"LEVL": "CMZ_TA",
"GROF": "CMZ_PRQ",
"INTF": "CMZ_FUV",
"EAAP": "CMZ_TO",
"UVAG": "ifelse(CMZ_PRQ>0, CMZ_TO/CMZ_PRQ, 0 )",
"UVSA": "ifelse(CMZ_SQ>0, CMZ_SV/CMZ_SQ, 0 )",
"IRTA": "CMZ_IRTA"
}
},
"PARI": {
"description": "Rice",
"columns": {
"LEVL": "CRICE_TA",
"GROF": "CRICE_PRQ",
"INTF": "CRICE_FUV",
"EAAP": "CRICE_TO",
"UVAG": "ifelse(CRICE_PRQ>0, CRICE_TO/CRICE_PRQ, 0 )",
"UVSA": "ifelse(CRICE_SQ>0, CRICE_SV/CRICE_SQ, 0 )",
"IRTA": "CRICE_IRTA"
}
},
"OCER": {
"description": "Oth.cereals",
"columns": {
"LEVL": "CCEROTH_TA",
"GROF": "CCEROTH_PRQ",
"INTF": "CCEROTH_FUV",
"EAAP": "CCEROTH_TO",
"UVAG": "ifelse( CCEROTH_PRQ>0, CCEROTH_TO/CCEROTH_PRQ, 0 )",
"UVSA": "ifelse( CCEROTH_SQ>0, CCEROTH_SV/CCEROTH_SQ, 0 )",
"IRTA": "CCEROTH_IRA"
}
},
"RAPE": {
"description": "Rape seed",
"columns": {
"LEVL": "CRAPE_TA",
"GROF": "CRAPE_PRQ",
"INTF": "CRAPE_FUV",
"EAAP": "CRAPE_TO",
"UVAG": "ifelse( CRAPE_PRQ>0, CRAPE_TO/CRAPE_PRQ, 0 )",
"UVSA": "ifelse( CRAPE_SQ>0, CRAPE_SV/CRAPE_SQ, 0 )",
"IRTA": "CRAPE_IRA"
}
},
"SUNF": {
"description": "Sunflower",
"columns": {
"LEVL": "CSNFL_TA",
"GROF": "CSNFL_PRQ",
"INTF": "CSNFL_FUV",
"EAAP": "CSNFL_TO",
"UVAG": "ifelse( CSNFL_PRQ>0, CSNFL_TO/CSNFL_PRQ, 0 )",
"UVSA": "ifelse( CSNFL_SQ>0, CSNFL_SV/CSNFL_SQ, 0 )",
"IRTA": "CSNFL_IRA"
}
},
"SOYA": {
"description": "Soya",
"columns": {
"LEVL": "CSOYA_TA",
"GROF": "CSOYA_PRQ",
"INTF": "CSOYA_FUV",
"EAAP": "CSOYA_TO",
"UVAG": "ifelse( CSOYA_PRQ>0, CSOYA_TO/CSOYA_PRQ, 0 )",
"UVSA": "ifelse( CSOYA_SQ>0, CSOYA_SV/CSOYA_SQ, 0 )",
"IRTA": "CSOYA_IRA"
}
},
"OOIL": {
"description": "Other Oil seeds",
"columns": {
"LEVL": "CCRPOILOTH_TA+CLINSED_TA",
"GROF": "CCRPOILOTH_PRQ+CLINSED_PRQ",
"INTF": "CCRPOILOTH_FUV+CLINSED_FUV",
"EAAP": "CCRPOILOTH_TO + CLINSED_TO",
"UVAG": "ifelse( (CCRPOILOTH_PRQ+CLINSED_PRQ)>0, (CCRPOILOTH_TO + CLINSED_TO)/(CCRPOILOTH_PRQ+CLINSED_PRQ), 0 )",
"UVSA": "ifelse( (CCRPOILOTH_SQ+CLINSED_SQ)>0, (CCRPOILOTH_SV+CLINSED_SV)/(CCRPOILOTH_SQ+CLINSED_SQ), 0 )",
"IRTA": "CCRPOILOTH_IRA+CLINSED_IRA"
}
},
"PULS_pea": {
"description": "Peas, field beans and sweet lupines",
"columns": {
"LEVL": "CPEA_TA",
"GROF": "CPEA_PRQ",
"INTF": "CPEA_FUV",
"EAAP": "CPEA_TO",
"UVAG": "ifelse( (CPEA_TO)>0, (CPEA_TO)/(CPEA_PRQ), 0 )",
"UVSA": "ifelse( (CPEA_SQ)>0, (CPEA_SV)/(CPEA_SQ), 0 )",
"IRTA": "CPEA_IRA"
}
},
"PULS_lntls": {
"description": "Lentils, chickpeas and vetches",
"columns": {
"LEVL": "CLNTL_TA",
"GROF": "CLNTL_PRQ",
"INTF": "CLNTL_FUV",
"EAAP": "CLNTL_TO",
"UVAG": "ifelse( (CLNTL_TO)>0, (CLNTL_TO)/(CLNTL_PRQ), 0 )",
"UVSA": "ifelse( (CLNTL_SQ)>0, (CLNTL_SV)/(CLNTL_SQ), 0 )",
"IRTA": "CLNTL_IRA"
}
},
"PULS_oth": {
"description": "Other protein crops ",
"columns": {
"LEVL": "CCRPPROTOTH_TA",
"GROF": "CCRPPROTOTH_PRQ",
"INTF": "CCRPPROTOTH_FUV",
"EAAP": "CCRPPROTOTH_TO",
"UVAG": "ifelse( (CCRPPROTOTH_TO)>0, (CCRPPROTOTH_TO)/(CCRPPROTOTH_PRQ), 0 )",
"UVSA": "ifelse( (CCRPPROTOTH_SQ)>0, (CCRPPROTOTH_SV)/(CCRPPROTOTH_SQ), 0 )",
"IRTA": "CCRPPROTOTH_IRA"
}
},
"POTA": {
"description": "Potatoes for starch and other potatoes (incl early and seed)",
"columns": {
"LEVL": "CPOT_TA",
"GROF": "CPOT_PRQ",
"INTF": "CPOT_FUV",
"EAAP": "CPOT_TO",
"UVAG": "ifelse( CPOT_PRQ>0, CPOT_TO/CPOT_PRQ, 0 )",
"UVSA": "ifelse( CPOT_SQ>0, CPOT_SV/CPOT_SQ, 0 )",
"IRTA": "CPOT_IRTA"
}
},
"SUGB": {
"description": "Sugar beet",
"columns": {
"LEVL": "CSUGBT_TA",
"GROF": "CSUGBT_PRQ",
"INTF": "CSUGBT_FUV",
"EAAP": "CSUGBT_TO",
"UVAG": "ifelse( CSUGBT_PRQ>0, CSUGBT_TO / CSUGBT_PRQ, 0 )",
"UVSA": "ifelse( CSUGBT_SQ>0, CSUGBT_SV/CSUGBT_SQ, 0 )",
"IRTA": "CSUGBT_IRTA"
}
},
"TEXT": {
"description": "cotton",
"columns": {
"LEVL": "CCOTN_TA",
"GROF": "CCOTN_PRQ",
"INTF": "CCOTN_FUV",
"EAAP": "CCOTN_TO",
"UVAG": "ifelse( CCOTN_PRQ>0, CCOTN_TO/CCOTN_PRQ, 0 )",
"UVSA": "ifelse( CCOTN_SQ>0, CCOTN_SV/CCOTN_SQ, 0 )",
"IRTA": "CCOTN_IRA"
}
},
"TOBA": {
"description": "Tobacco",
"columns": {
"LEVL": "CTOBAC_TA",
"GROF": "CTOBAC_PRQ",
"INTF": "CTOBAC_FUV",
"EAAP": "CTOBAC_TO",
"UVAG": "ifelse( CTOBAC_PRQ>0, CTOBAC_TO / CTOBAC_PRQ, 0 )",
"UVSA": "ifelse( CTOBAC_SQ>0, CTOBAC_SV/CTOBAC_SQ, 0 )",
"IRTA": "CTOBAC_IRTA"
}
},
"OIND": {
"description": "Hops + Other industrials - Cotton ",
"columns": {
"LEVL": "CHOP_TA+CMEDIC_TA+CSUGCN_TA+CFLAX_TA+CHEMP_TA+CFIBOTH_TA+CCRPINDOTH_TA",
"GROF": "CHOP_PRQ+CMEDIC_PRQ+CSUGCN_PRQ+CFLAX_PRQ+CHEMP_PRQ+CFIBOTH_PRQ+CCRPINDOTH_PRQ",
"INTF": "CHOP_FUV+CMEDIC_FUV+CSUGCN_FUV+CFLAX_FUV+CHEMP_FUV+CFIBOTH_FUV+CCRPINDOTH_FUV",
"EAAP": "CHOP_TO+CMEDIC_TO+CSUGCN_TO+CFLAX_TO+CHEMP_TO+CFIBOTH_TO+CCRPINDOTH_TO",
"UVAG": " ifelse( (CHOP_PRQ+CMEDIC_PRQ+CSUGCN_PRQ+CFLAX_PRQ+CHEMP_PRQ+CFIBOTH_PRQ+CCRPINDOTH_PRQ)>0, (CHOP_TO+CMEDIC_TO+CSUGCN_TO+CFLAX_TO+CHEMP_TO+CFIBOTH_TO+CCRPINDOTH_TO) / (CHOP_PRQ+CMEDIC_PRQ+CSUGCN_PRQ+CFLAX_PRQ+CHEMP_PRQ+CFIBOTH_PRQ+CCRPINDOTH_PRQ), 0 )",
"UVSA": "ifelse( (CHOP_SQ+CMEDIC_SQ+CSUGCN_SQ+CFLAX_SQ+CHEMP_SQ+CFIBOTH_SQ+CCRPINDOTH_SQ)>0, (CHOP_SV+CMEDIC_SV+CSUGCN_SV+CFLAX_SV+CHEMP_SV+CFIBOTH_SV+CCRPINDOTH_SV)/(CHOP_SQ+CMEDIC_SQ+CSUGCN_SQ+CFLAX_SQ+CHEMP_SQ+CFIBOTH_SQ+CCRPINDOTH_SQ), 0 )",
"IRTA": "CHOP_IRTA+CMEDIC_IRA+CSUGCN_IRA+CFLAX_IRA+CHEMP_IRA+CFIBOTH_IRA+CCRPINDOTH_IRA"
}
},
"OCRO": {
"description": "Other Crops",
"columns": {
"LEVL": "CARALNDSED_TA+CARAOTH_TA+CPERMUG_TA+CCRPPERMOTH_TA",
"GROF": "CARALNDSED_PRQ+CARAOTH_PRQ+CYNG_PRQ",
"INTF": "CARALNDSED_FUV+CARAOTH_FUV+CPERMUG_FUV+CCRPPERMOTH_FUV+CYNG_FUV",
"EAAP": "CARALNDSED_TO+CARAOTH_TO+CPERMUG_TO+CCRPPERMOTH_TO+(CYNG_SV+CYNG_FCV+CYNG_FUV+CYNG_CV-CYNG_OV)",
"UVAG": "ifelse( (CARALNDSED_PRQ+CARAOTH_PRQ+CYNG_PRQ)>0 , (CARALNDSED_TO+CARAOTH_TO+CPERMUG_TO+CCRPPERMOTH_TO+(CYNG_SV+CYNG_FCV+CYNG_FUV+CYNG_CV-CYNG_OV))/(CARALNDSED_PRQ+CARAOTH_PRQ+CYNG_PRQ) , 0 ) ",
"UVSA": "ifelse( (CARALNDSED_PRQ+CARAOTH_PRQ+CYNG_PRQ)>0 , (CARALNDSED_TO+CARAOTH_TO+CPERMUG_TO+CCRPPERMOTH_TO+(CYNG_SV+CYNG_FCV+CYNG_FUV+CYNG_CV-CYNG_OV))/(CARALNDSED_PRQ+CARAOTH_PRQ+CYNG_PRQ) , 0 )",
"IRTA": "CARALNDSED_IRA+CARAOTH_IRA+CPERMUG_IRA+CCRPPERMOTH_IRA"
}
},
"TOMA": {
"description": "Tomatoes",
"columns": {
"LEVL": "CTOMAT_TA",
"GROF": "CTOMAT_PRQ",
"INTF": "CTOMAT_FUV",
"EAAP": "CTOMAT_TO",
"UVAG": "ifelse( CTOMAT_PRQ>0, CTOMAT_TO/CTOMAT_PRQ, 0 )",
"UVSA": "ifelse( CTOMAT_SQ>0, CTOMAT_SV/CTOMAT_SQ, 0 )",
"IRTA": "CTOMAT_IRA"
}
},
"OVEG": {
"description": "Other Vegetables",
"columns": {
"LEVL": "CVEGOF_TA+CVEGMG_TA+CVEGUG_TA-CTOMAT_TA-CVEGOTH_TA",
"GROF": "CVEGOF_PRQ+CVEGMG_PRQ+CVEGUG_PRQ-CTOMAT_PRQ-CVEGOTH_PRQ",
"INTF": "CVEGOF_FUV+CVEGMG_FUV+CVEGUG_FUV-CTOMAT_FUV-CVEGOTH_FUV",
"EAAP": "CVEGOF_TO+CVEGMG_TO+CVEGUG_TO-CTOMAT_TO-CVEGOTH_TO",
"UVAG": "ifelse( (CVEGOF_PRQ+CVEGMG_PRQ+CVEGUG_PRQ-CTOMAT_PRQ-CVEGOTH_PRQ)>0, (CVEGOF_TO+CVEGMG_TO+CVEGUG_TO-CTOMAT_TO-CVEGOTH_TO)/(CVEGOF_PRQ+CVEGMG_PRQ+CVEGUG_PRQ-CTOMAT_PRQ-CVEGOTH_PRQ), 0 )",
"UVSA": "ifelse( (CVEGOF_SQ+CVEGMG_SQ+CVEGUG_SQ-CTOMAT_SQ-CVEGOTH_SQ)>0, (CVEGOF_SV+CVEGMG_SV+CVEGUG_SV-CTOMAT_SV-CVEGOTH_SV)/(CVEGOF_SQ+CVEGMG_SQ+CVEGUG_SQ-CTOMAT_SQ-CVEGOTH_SQ), 0 )",
"IRTA": "CVEGOF_IRA+CVEGMG_IRA+CVEGUG_IRA-CTOMAT_IRA-CVEGOTH_IRA"
}
},
"APPL": {
"description": "Apples / pears",
"columns": {
"LEVL": "CAPL_TA+CPEAR_TA",
"GROF": "CAPL_PRQ+CPEAR_PRQ",
"INTF": "CAPL_FUV+CPEAR_FUV",
"EAAP": "CAPL_TO+CPEAR_TO",
"UVGA": "ifelse( (CAPL_PRQ+CPEAR_PRQ)>0, (CAPL_TO+CPEAR_TO)/(CAPL_PRQ+CPEAR_PRQ), 0 )",
"UVSA": "ifelse( (CAPL_SQ+CPEAR_SQ)>0, (CAPL_SV+CPEAR_SV)/(CAPL_SQ+CPEAR_SQ), 0 )",
"IRTA": "CAPL_IRA+CPEAR_IRA"
}
},
"OFRU": {
"description": "Other fruits",
"columns": {
"LEVL": "CPEACH_TA+CFRUTTMP_TA+CFRUTTRPL_TA+CNUT_TA+CBERRY_TA+CMELON_TA+CVEGOTH_TA",
"GROF": "CPEACH_PRQ+CFRUTTMP_PRQ+CFRUTTRPL_PRQ+CNUT_PRQ+CBERRY_PRQ+CMELON_PRQ+CVEGOTH_PRQ",
"INTF": "CPEACH_FUV+CFRUTTMP_FUV+CFRUTTRPL_FUV+CNUT_FUV+CBERRY_FUV+CMELON_FUV+CVEGOTH_FUV",
"EAAP": "CPEACH_TO+CFRUTTMP_TO+CFRUTTRPL_TO+CNUT_TO+CBERRY_TO+CMELON_TO+CVEGOTH_TO",
"UVAG": "ifelse( (CPEACH_PRQ+CFRUTTMP_PRQ+CFRUTTRPL_PRQ+CNUT_PRQ+CBERRY_PRQ+CMELON_PRQ+CVEGOTH_PRQ)>0 , (CPEACH_TO+CFRUTTMP_TO+CFRUTTRPL_TO+CNUT_TO+CBERRY_TO+CMELON_TO+CVEGOTH_TO)/(CPEACH_PRQ+CFRUTTMP_PRQ+CFRUTTRPL_PRQ+CNUT_PRQ+CBERRY_PRQ+CMELON_PRQ+CVEGOTH_PRQ), 0 )",
"UVSA": "ifelse( (CPEACH_SQ+CFRUTTMP_SQ+CFRUTTRPL_SQ+CNUT_SQ+CBERRY_SQ+CMELON_SQ+CVEGOTH_SQ)>0 , (CPEACH_SV+CFRUTTMP_SV+CFRUTTRPL_SV+CNUT_SV+CBERRY_SV+CMELON_SV+CVEGOTH_SV)/(CPEACH_SQ+CFRUTTMP_SQ+CFRUTTRPL_SQ+CNUT_SQ+CBERRY_SQ+CMELON_SQ+CVEGOTH_SQ) , 0 )",
"IRTA": "CPEACH_IRA+CFRUTTMP_IRA+CFRUTTRPL_IRA+CNUT_IRA+CBERRY_IRA+CMELON_IRA+CVEGOTH_IRA"
}
},
"CITR": {
"description": "citrus fruits",
"columns": {
"LEVL": "CORANG_TA+CCITRSML_TA+CLMON_TA+CCITROTH_TA",
"GROF": "CORANG_PRQ+CCITRSML_PRQ+CLMON_PRQ+CCITROTH_PRQ",
"INTF": "CORANG_FUV+CCITRSML_FUV+CLMON_FUV+CCITROTH_FUV",
"EAAP": "CORANG_TO+CCITRSML_TO+CLMON_TO+CCITROTH_TO",
"UVAG": "ifelse( (CORANG_PRQ+CCITRSML_PRQ+CLMON_PRQ+CCITROTH_PRQ)>0 , (CORANG_TO+CCITRSML_TO+CLMON_TO+CCITROTH_TO)/(CORANG_PRQ+CCITRSML_PRQ+CLMON_PRQ+CCITROTH_PRQ) , 0 )",
"UVSA": "ifelse( (CORANG_SQ+CCITRSML_SQ+CLMON_SQ+CCITROTH_SQ)>0, (CORANG_SV+CCITRSML_SV+CLMON_SV+CCITROTH_SV)/(CORANG_SQ+CCITRSML_SQ+CLMON_SQ+CCITROTH_SQ) , 0 )",
"IRTA": "CORANG_IRA+CCITRSML_IRA+CLMON_IRA+CCITROTH_IRA"
}
},
"TAGR": {
"description": "Table grapes",
"columns": {
"LEVL": "CGRPTAB_TA",
"GROF": "CGRPTAB_PRQ",
"INTF": "CGRPTAB_FUV",
"EAAP": "CGRPTAB_TO",
"UVAG": "ifelse( CGRPTAB_PRQ>0 , CGRPTAB_TO/CGRPTAB_PRQ, 0 )",
"UVSA": "ifelse( CGRPTAB_SQ>0, CGRPTAB_SV/CGRPTAB_SQ, 0 )",
"IRTA": "CGRPTAB_IRA"
}
},
"OLIV": {
"description": "Olives for oil",
"columns": {
"LEVL": "COLVFR_TA+COLVOIL_TA",
"GROF": "COLVFR_PRQ+(COLVOIL_PRQ/0.2)",
"INTF": "COLVFR_FUV+COLVOIL_FUV",
"EAAP": "COLVFR_TO+COLVOIL_TO",
"UVAG": "ifelse( (COLVFR_PRQ+(COLVOIL_PRQ/.2))>0 , (COLVFR_TO+COLVOIL_TO)/(COLVFR_PRQ+(COLVOIL_PRQ/.02) ) , 0 )",
"UVSA": "ifelse( (COLVFR_SQ+COLVOIL_SQ)>0, (COLVFR_SV+COLVOIL_SV)/(COLVFR_SQ+(COLVOIL_SQ/.2) ), 0 )",
"IRTA": "COLVFR_IRA+COLVOIL_IRA"
}
},
"TABO": {
"description": "Table olives",
"columns": {
"LEVL": "COLV_TA",
"GROF": "COLV_PRQ",
"INTF": "COLV_FUV",
"EAAP": "COLV_TO",
"UVAG": "ifelse( COLV_PRQ>0, COLV_TO/COLV_PRQ , 0 )",
"UVSA": "ifelse( COLV_SQ>0, COLV_SV/COLV_SQ, 0 )",
"IRTA": "COLV_IRA"
}
},
"TWIN": {
"description": "Table wine",
"columns": {
"LEVL": "CWINEPDO_TA+CWINEPGI_TA+CWINEOTH_TA+CRAISIN_TA+CGRPWINPDO_TA+CGRPWINPGI_TA+CGRPWINOTH_TA",
"GROF": "CWINEPDO_PRQ+CWINEPGI_PRQ+CWINEOTH_PRQ+CRAISIN_PRQ+CGRPWINPDO_PRQ+CGRPWINPGI_PRQ+CGRPWINOTH_PRQ+CVINMISC_PRQ+CVINBY_PRQ",
"INTF": "CWINEPDO_FUV+CWINEPGI_FUV+CWINEOTH_FUV+CRAISIN_FUV+CGRPWINPDO_FUV+CGRPWINPGI_FUV+CGRPWINOTH_FUV+CVINMISC_FUV+CVINBY_FUV",
"EAAP": "CWINEPDO_TO+CWINEPGI_TO+CWINEOTH_TO+CRAISIN_TO+CGRPWINPDO_TO+CGRPWINPGI_TO+CGRPWINOTH_TO+CVINMISC_TO+CVINBY_TO",
"UVAG": "ifelse( (CWINEPDO_PRQ+CWINEPGI_PRQ+CWINEOTH_PRQ+CRAISIN_PRQ+CGRPWINPDO_PRQ+CGRPWINPGI_PRQ+CGRPWINOTH_PRQ+CVINMISC_PRQ+CVINBY_PRQ)>0 , (CWINEPDO_TO+CWINEPGI_TO+CWINEOTH_TO+CRAISIN_TO+CGRPWINPDO_TO+CGRPWINPGI_TO+CGRPWINOTH_TO+CVINMISC_TO+CVINBY_TO)/(CWINEPDO_PRQ+CWINEPGI_PRQ+CWINEOTH_PRQ+CRAISIN_PRQ+CGRPWINPDO_PRQ+CGRPWINPGI_PRQ+CGRPWINOTH_PRQ+CVINMISC_PRQ+CVINBY_PRQ), 0 )",
"UVSA": "ifelse( (CWINEPDO_SQ+CWINEPGI_SQ+CWINEOTH_SQ+CRAISIN_SQ+CGRPWINPDO_SQ+CGRPWINPGI_SQ+CGRPWINOTH_SQ+CVINMISC_SQ+CVINBY_SQ)>0 , (CWINEPDO_SV+CWINEPGI_SV+CWINEOTH_SV+CRAISIN_SV+CGRPWINPDO_SV+CGRPWINPGI_SV+CGRPWINOTH_SV+CVINMISC_SV+CVINBY_SV)/(CWINEPDO_SQ+CWINEPGI_SQ+CWINEOTH_SQ+CRAISIN_SQ+CGRPWINPDO_SQ+CGRPWINPGI_SQ+CGRPWINOTH_SQ+CVINMISC_SQ+CVINBY_SQ), 0 )",
"IRTA": "CWINEPDO_IRA+CWINEPGI_IRA+CWINEOTH_IRA+CRAISIN_IRA+CGRPWINPDO_IRA+CGRPWINPGI_IRA+CGRPWINOTH_IRA"
}
},
"NURS": {
"description": "Nurseries",
"columns": {
"LEVL": "CNURS_TA",
"GROF": "NA",
"INTF": "CNURS_FUV",
"EAAP": "CNURS_TO",
"UVAG": "NA",
"UVSA": "CNURS_SV/CNURS_SQ",
"IRTA": "CNURS_IRA"
}
},
"FLOW": {
"description": "Flowers",
"columns": {
"LEVL": "ifelse( (CFLWOUT_TA+CFLWUG_TA)>0, CFLWOUT_TA+CFLWUG_TA, CFLWB_TA+CFLWCUT_TA+CFLW_TA)",
"GROF": "NA",
"INTF": "ifelse( (CFLWOUT_FUV+CFLWUG_FUV)>0, CFLWOUT_FUV+CFLWUG_FUV, CFLWB_FUV+CFLWCUT_FUV+CFLW_FUV)",
"EAAP": "ifelse( (CFLWOUT_TO+CFLWUG_TO)>0 , CFLWOUT_TO+CFLWUG_TO, CFLWB_TO+CFLWCUT_TO+CFLW_TO)",
"UVAG": "NA",
"UVSA": "NA",
"IRTA": "ifelse( (CFLWOUT_IRA+CFLWUG_IRA)>0, CFLWOUT_IRA+CFLWUG_IRA, CFLWB_IRA+CFLWCUT_IRA+CFLW_IRA)"
}
},
"MAIF": {
"description": "Fodder maize (Green Maize)",
"columns": {
"LEVL": "CFODMZ_TA",
"GROF": "CFODMZ_PRQ",
"INTF": "CFODMZ_FUV",
"EAAP": "CFODMZ_TO",
"UVAG": "ifelse( CFODMZ_PRQ>0, CFODMZ_TO/CFODMZ_PRQ , 0 )",
"UVSA": "ifelse( CFODMZ_SQ>0, CFODMZ_SV/CFODMZ_SQ, 0)",
"SHARE": "ifelse( CFODMZ_SV>0, CFODMZ_FUV/CFODMZ_SV,0)",
"IRTA": "CFODMZ_IRA"
}
},
"ROOF": {
"description": "Fodder root crops",
"columns": {
"LEVL": "CFODRTBR_TA",
"GROF": "CFODRTBR_PRQ",
"INTF": "CFODRTBR_FUV",
"EAAP": "CFODRTBR_TO",
"UVAG": "ifelse( CFODRTBR_PRQ>0, CFODRTBR_TO/CFODRTBR_PRQ, 0)",
"UVSA": "ifelse( CFODRTBR_SQ>0,CFODRTBR_SV/CFODRTBR_SQ,0)",
"SHARE": "ifelse( CFODRTBR_SV>0, CFODRTBR_FUV/CFODRTBR_SV,0)",
"IRTA": "CFODRTBR_IRA"
}
},
"PGRA": {
"description": "Pasture",
"columns": {
"LEVL": "CGRSXRG_TA",
"GROF": "CGRSXRG_PRQ",
"INTF": "CGRSXRG_FUV",
"EAAP": "CGRSXRG_TO",
"UVAG": "ifelse( CGRSXRG_PRQ>0, CGRSXRG_TO/CGRSXRG_PRQ, 0)",
"UVSA": "ifelse( CGRSXRG_SQ>0, CGRSXRG_SV/CGRSXRG_SQ, 0 )",
"SHARE": "ifelse(CGRSXRG_SV>0,CGRSXRG_FUV/CGRSXRG_SV,0)",
"IRTA": "CGRSXRG_IRA"
}
},
"RGRA": {
"description": "Roughing",
"columns": {
"LEVL": "CRG_TA+CGRSNOUSESUB_TA",
"GROF": "CRG_PRQ",
"INTF": "CRG_FUV",
"EAAP": "CRG_TO",
"NOPR": "ifelse((CRG_TA+CGRSNOUSESUB_TA)>0,CGRSNOUSESUB_TA/(CRG_TA+CGRSNOUSESUB_TA),0)",
"SHARE": "ifelse( CGRSXRG_SV>0, CGRSXRG_FUV/CGRSXRG_SV, 0)"
}
},
"OFAR": {
"description": "Fodder other on arable land",
"columns": {
"LEVL": "CGRSTMP_TA+CLEG_TA+CFODOTH_TA",
"GROF": "CGRSTMP_PRQ+CLEG_PRQ+CFODOTH_PRQ",
"INTF": "CGRSTMP_FUV+CLEG_FUV+CFODOTH_FUV",
"EAAP": "CGRSTMP_TO+CLEG_TO+CFODOTH_TO",
"UVAG": "ifelse( (CGRSTMP_PRQ+CLEG_PRQ+CFODOTH_PRQ)>0, (CGRSTMP_TO+CLEG_TO+CFODOTH_TO)/(CGRSTMP_PRQ+CLEG_PRQ+CFODOTH_PRQ) , 0 )",
"UVSA": "(CGRSTMP_SV+CLEG_SV+CFODOTH_SV)/(CGRSTMP_SQ+CLEG_SQ+CFODOTH_SQ)",
"SHARE": "ifelse( (CGRSTMP_SV+CLEG_SV+CFODOTH_SV)>0, CGRSTMP_FUV+CLEG_FUV+(CFODOTH_FUV/CGRSTMP_SV)+CLEG_FUV+CFODOTH_SV, 0)",
"IRTA": "CGRSTMP_IRA+CLEG_IRA+CFODOTH_IRA"
}
},
"SETA": {
"description": "Set-aside/fallow",
"columns": {
"LEVL": "CFLNDNOSUB_TA+CFLNDSUB_TA",
"GROF": "CFLNDNOSUB_PRQ",
"INTF": "CFLNDNOSUB_FUV",
"EAAP": "CFLNDNOSUB_TO",
"UVAG": "ifelse( CFLNDNOSUB_PRQ>0 , CFLNDNOSUB_TO/CFLNDNOSUB_PRQ , 0)",
"UVSA": "ifelse( CFLNDNOSUB_SQ>0, CFLNDNOSUB_SV/CFLNDNOSUB_SQ, 0 )",
"IRTA": "CFLNDNOSUB_IRA"
}
},
"FORE": {
"description": "Forest land",
"columns": {
"LEVL": "CWDED_TA+COWSHROT_TA",
"GROF": "NA",
"INTF": "CWDED_FUV+COWSHROT_FUV",
"EAAP": "CWDED_TO+COWSHROT_TO",
"UVAG": "NA",
"UVSA": "NA",
"IRTA": "CWDED_IRA+COWSHROT_IRA"
}
},
"CCER": {
"description": "Catch crops cereals (?)",
"columns": {
"LEVL": "CWHTC_TA-CWHTC_A + CWHTD_TA-CWHTD_A + CRYE_TA-CRYE_A + CBRL_TA-CBRL_A + COAT_TA-CBRL_A + COAT_TA-COAT_A + COAT_TA-CCEROTHS_A_X + CMZ_TA-CMZ_A + CRICE_TA-CRICE_A + CCEROTHNS_TA_X-CCEROTHNS_A_X"
}
},
"CPUL": {
"description": "Catch crops pulses (?) ",
"columns": {
"LEVL": "CCRPPROT_TA_X-CCRPPROT_A_X"
}
},
"COCR": {
"description": "Catch crops other crops (?)",
"columns": {
"LEVL": "CPOT_TA-CPOT_A + CSUGBT_TA-CSUGBT_A + CCRPOIL_TA_X-CCRPOIL_A_X + CHOP_TA-CHOP_A + CTOBAC_TA-CTOBAC_A"
}
}
}
}
#.................................................................................................#
#
# Load all csv files from DG-AGRI
#
#.................................................................................................#
#import also other files, fadn.raw.rds to fadn.str.rds
import.fadn.csv(paste0(dg.agri.dir,"ELL2009.csv"),
fadn.year = 2009,
fadn.country = "ELL")
import.fadn.csv(paste0(dg.agri.dir,"ELL2010.csv"),
fadn.year = 2010,
fadn.country = "ELL")
import.fadn.csv(paste0(dg.agri.dir,"ELL2011.csv"),
fadn.year = 2011,
fadn.country = "ELL")
import.fadn.csv(paste0(dg.agri.dir,"ELL2012.csv"),
fadn.year = 2012,
fadn.country = "ELL")
# ESP
import.fadn.csv(paste0(dg.agri.dir,"ESP2007.csv"),
fadn.year = 2007,
fadn.country = "ESP")
import.fadn.csv(paste0(dg.agri.dir,"ESP2008.csv"),
fadn.year = 2008,
fadn.country = "ESP")
import.fadn.csv(paste0(dg.agri.dir,"ESP2009.csv"),
fadn.year = 2009,
fadn.country = "ESP")
import.fadn.csv(paste0(dg.agri.dir,"ESP2010.csv"),
fadn.year = 2010,
fadn.country = "ESP")
import.fadn.csv(paste0(dg.agri.dir,"ESP2011.csv"),
fadn.year = 2011,
fadn.country = "ESP")
import.fadn.csv(paste0(dg.agri.dir,"ESP2012.csv"),
fadn.year = 2012,
fadn.country = "ESP")
#check what is loaded
show.data.dir.contents()
# This script provides some sample commands of fadnUtils
#
# The functions of the package are deliberately written as "fadnUtils::<FUNCTION>", in order to be
# easily identified as such. However one can write them skipping the "fadnUtils::" part
#
# For any of the functions of the package, you can see its documentation
# by either writing ?<function name> or by hovering the mouse on its name and pressing F1 (in rstudio)
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
#
# LOAD THE PACKAGE -----------------------------------------------------------------------------------------------------
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
library(data.table) #required
library(fadnUtils)
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
#
# IMPORT FADN CSV FILES INTO raw.rds -----------------------------------------------------------------------------------
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
# Step 1, Create a data.dir
fadnUtils::create.data.dir("E:/test_data_dir") #replace the path with the one you want your data.dir to reside to
# after running the command, go to this directory to see its structure
# Step 2, Set the data.dir
fadnUtils::set.data.dir("E:/test_data_dir") # The package needs to know the location of the data.dir it works with
# if you do not define, any following fadnUtil command will fail with an error
# Step 2, Import the csv files
countries = c("ELL","ITA","ESP") # select the countries to import data for
years = c(2013,2014,2015) # select the years to import data for
path.to.csv.files = "<PUT THE FOLDER WHERE CSV FILE RESIDE>" # We assume that the CSV files are are located in an external directory
path.to.csv.files ="U:/SCIENTIFIC/IFM CAP/70-Data/FADN/10_Requests/IFM-CAP/2019/Baseyear/Data/SO"
for(c in countries) { #Loop countries and years and import, one by one
for (y in years) { # after the loop, check the data.dir/rds directory to see the rds files there
file.path.cur = paste0(path.to.csv.files,'/',c,y,".csv")
if(file.exists(file.path.cur)) {
print(paste0("doing year:",y," and country:",c))
fadnUtils::convert.to.fadn.raw.rds(file.path = file.path.cur, fadn.year = y, fadn.country = c)
}
else {
print(paste0("DOES NOT EXIST for year:",y," and country:",c, "/ ", file.path.cur))
}
}
}
fadnUtils::show.data.dir.contents() #It will show the country-year pairs available
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
#
# WORK WITH raw.rds ----------------------------------------------------------------------------------------------------
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
# Step 1, set data.dir (in this case, this step is not necessary, since data.dir is already set with a previous command)
fadnUtils::set.data.dir("E:/test_data_dir")
# Step 2, load data
#To load raw r-data, only for Spain (ESP) for 2015
my.data = load.fadn.raw.rds(
countries = "ESP",
years = 2015
)
# my.data is a single large data.table, with the original csv columns and rows
nrow(my.data) #Number of rows
names(my.data) #Column names
length(names(my.data)) #Number of columns
str(my.data) #Overall structure
# You can also load for combinations of COUNTRY-YEAR
my.data = load.fadn.raw.rds(
countries = c("ELL", "ESP"),
years = c(2014,2015)
)
#If you do not define country, year, all data of the data.dir is loaded
my.data = load.fadn.raw.rds()
# You can also load a subset of the columns
my.data = load.fadn.raw.rds(
col.filter = c("ID","NUTS0","NUTS2", "SYS02","TF8","IELE_V") #Load only id, nuts2, weight, tf8 and the electricity expenses for all data.dir
)
# You can also load a subset of the rows
# Here, load only farms that belong to TF8-16, for
# all years and countries
my.data = load.fadn.raw.rds(
row.filter = "TF8==16"
)
str(my.data) #gave a look at the structure of the data. It contains only a few columns
# see that always there are two columns: load.YEAR and load.COUNTRY. They denote the loading point of the row
#Step 3, work with the data.table structure as you like.
# See example below that calculate the expenditure of electricity per country per year
my.data[,list(ELECTRICITY.th=sum(IELE_V* SYS02*0.001)),by=list(load.COUNTRY,load.YEAR)] #See comment above for load.COUNTRY,load.YEAR
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
#
# AGGREGATE raw.rds into str.rds------------------------------------------------------------------------------------------
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
# Step 1, set data.dir (in this case, this step is not necessary, since data.dir is already set with a previous command)
fadnUtils::set.data.dir("E:/test_data_dir")
# Step 2, create the raw_rds_map file
# You have to create it inside the "<data.dir>/raw_str_maps" folder. Name it as you like
# Let's suppose that there exist two such files: "2014_after.json" and "2013_before.json"
# The first (2014_after.json) is a full representation of the calculations for FADN data from 2014 and after
# The second (2013_before.json) has only the fields that must be calculated differently for the period of 2013 and before
# Step 3, aggregate the data
countries = c("ELL","ITA","ESP") # select the countries to import data for
for(c in countries) {
for (y in c(2014:2015)) {
print(paste0("doing year:",y," and country:",c))
convert.to.fadn.str.rds(fadn.year = y,
fadn.country = c,
raw.f = "2014_after.json") # we use one json for 2014 and after
}
}
# we need to merge the 2013 and 2014 and then copy it to a new json (2013 is differentnail to 2014)
merge_raw_f.path = fadnUtils::raw_str_map.merge(
source.raw_str_map.file = "2014_after.json",
new.raw_str_map.file = "2013_before.json",
return.file = T
)
file.copy(merge_raw_f.path,paste0(fadnUtils::get.data.dir(),"/raw_str_maps/merged.json"))
for(c in countries) {
for (y in c(2013)) {
print(paste0("doing year:",y," and country:",c))
convert.to.fadn.str.rds(fadn.year = y,
fadn.country = c,
raw.f = "merged.json") # we use another one json for 2013 (projection of 2013 on 2014)
}
}
fadnUtils::show.data.dir.contents() #It will show the country-year pairs available
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
#
# WORK WITH str.rds ----------------------------------------------------------------------------------------------------
#
#nununununununununununununununununununununununununununununununnunununununununununununununununununununununununununununununun#
# Step 1, set data.dir (in this case, this step is not necessary, since data.dir is already set with a previous command)
fadnUtils::set.data.dir("E:/test_data_dir")
# Step 2, Load str.rds data
my.data = fadnUtils::load.fadn.str.rds(countries = "ELL", years = c(2013:2015)) #The calculated variables are consistend for 2013 and 2014/15
str(my.data) # the loaded data is a list that contains data.tables
str(my.data$crops) #crops are in long format
# Step 3, Work with this data as regularly with r-scripting
dcast(
my.data$crops[VARIABLE=="GROF",list(GROF.mil=sum(0.001*VALUE*WEIGHT)),by=list(YEAR,COUNTRY,CROP)],
COUNTRY+CROP~YEAR, value.var="GROF.mil"
)
#+eval=FALSE
#...................................................................................#
#
# USE CASE 1 example
#
# Import csv FADN data
#
#...................................................................................#
# In order to use fadnUtils, we must load fadnUtils and data.table
library(fadnUtils)
library(data.table)
# .............. CREATE data.dir ...................................................#
# fadnUtils always work with a user defined data.dir
# Let's assume that the user has not created one yet.
# The following line creates a data.dir folder somewhere in our computer
# We must also have created the raw_str_map.file and pass it as an argument
# to the function. This file is copied to the data.dir folder. Thus, we can
# see the structure of the data contained in a data.dir folder by inspecting
# the raw_str_map.file residing in it.
create.data.dir(
folder.path = "H:/IFM-CAP/sample.fadnutils.dir",
raw_str_map.file = "H:/IFM-CAP/version2/data/raw_str_map.after2013_var_names.json"
)
#Once the data.dir is created, we must declare that we are working with it
set.data.dir(
"H:/IFM-CAP/sample.fadnutils.dir"
)
# .............. IMPORT DATA IN A SINGLE STEP ......................................#
# In order to import the FADN csv files, the simplest way is
# to use import.fadn.csv.
# We provide the full path of the csv file and explicitly state
# the country and the year this file is refering to.
# Using this function, both the csv data is saved in r-data format and the
# structured r-data are created using the data.dir raw_str_map.file
import.fadn.csv(
file.path = "H:/IFM-CAP/dg_agri_csv/ELL2007.csv", #full path of the cvs file
fadn.country = "ELL",
fadn.year = 2007
)
# We can import many files (countries, years) in a single data.dir
import.fadn.csv(
file.path = "H:/IFM-CAP/dg_agri_csv/ESP2007.csv", #full path of the cvs file
fadn.country = "ESP",
fadn.year = 2007
)
#At any time, we can check for the current data dir, what csv files (countries, year)
# are loaded.
show.data.dir.contents()
# .............. IMPORT DATA IN TWO STEPS ..........................................#
# However you can import the file in two steps, one for converting
# the csv to fadn.raw.str (csv-data to raw r-data) and
# one for converting the fadn.raw.rds to fadn.str.rds (raw r-data
# to structured r-data).
#step 1, convert csv to fadn.raw.rds
convert.to.fadn.raw.rds(
file.path = "H:/IFM-CAP/dg_agri_csv/ELL2015.csv",
fadn.country = "ELL",
fadn.year = 2015
)
# If you check what exists in the data.dir, you will see that
# only the fadn.raw.rds of ELL-2008 exist
show.data.dir.contents()
#Step 2, convert fadn.raw.rds to fadn.str.rds
convert.to.fadn.str.rds(
fadn.country = "ELL",
fadn.year = 2015
)
#check what is loaded
show.data.dir.contents()
# .............. RECALCULATE STRUCTURED DATA ......................................#
# Let's say that
overwrite.raw_str_map.file(
data.dir = "H:/IFM-CAP/sample.fadnutils.dir",
new.raw_str_map.file = "H:/IFM-CAP/version2/data/raw_str_map.after2013_var_names.json"
)
#+eval=FALSE
#...................................................................................#
#
# USE CASE 2 example
#
# Load r-data from a data.dir
#
#...................................................................................#
# Always load fadnUtils and data.table
library(fadnUtils)
library(data.table)
# The first step is to set the current data.dir
set.data.dir("H:/IFM-CAP/sample.fadnutils.dir")
# Let's see what countries and years have been imported in the current data.dir
show.data.dir.contents()
# .............. LOAD RAW R-DATA ..................................................#
# We can either load raw r-data files (the original FADN csv in r-friendly format),
# or structured r-data files (the original data transformed into meaningful
# information)
#To load raw r-data, only for Spain (ESP) for 2015
my.data = load.fadn.raw.rds(
countries = "ESP",
years = 2015
)
# my.data is a single large data.table, with the original csv columns and rows
nrow(my.data) #Number of rows
names(my.data) #Column names
length(names(my.data)) #Number of columns
str(my.data) #Overall structure
# .............. LOAD STRUCTURED R-DATA ...........................................#
#To load structured data, for Spain (ESP) for 2015
my.data = load.fadn.str.rds(
countries = "ESP",
years = 2015
)
# You can see that my.data is a list, with three elements: info, costs, crops
str(my.data)
# You can access each individual element like this
str(my.data$info)
str(my.data$costs)
str(my.data$crops)
# The first columns of each of the above elements (info, costs, crops)
# are created according to the ID section of the raw_str_map
names(my.data$info)
names(my.data$costs)
names(my.data$crops)
# info and costs data.tables are in wide-format (each observation in a single row,
# all attributes of a single observation in different columns).
# crops element is in long format (one observation is in many rows,
#
#
# See https://seananderson.ca/2013/10/19/reshape/ for
# discussion of the two types of data formats
head(my.data$info)
head(my.data$costs)
head(my.data$crops)
# Also on the attributes section of each of the above elements, we can access
# the column formulas and descriptions, as defined in the raw_str_map file.
View(
attr(my.data$info,"column.descriptions")
)
View(
attr(my.data$costs,"column.descriptions")
)
View(
attr(my.data$crops,"column.descriptions")
)
# Especially for the crops element, we can also see the description
# CROP column
View(
attr(my.data$crops,"crops.descriptions")
)
# .............. HOW TO LOAD COUNTRIES-YEARS COMBINATIONS .........................#
# In the previous examples, we showed how to load data for one country and one year
# In the following examples we show more combinations
#To load for Spain (ESP) and Greece (ELL) for year 2015
my.data = load.fadn.str.rds(countries = c("ESP","ELL"), years = 2015)
#To load for Spain (ESP) and Greece (ELL) for all years
my.data = load.fadn.str.rds(countries = c("ESP","ELL"))
#To load all available countries for year 2015
my.data = load.fadn.str.rds(years = 2015)
#To load all availabel data
my.data = load.fadn.str.rds()
# .............. HOW TO STORE THE LOAD .........................#
# Since loading data sometimes takes time and create big datasets
# fadUtils offers a way to save the dataset created from the load call
#The first step is to store the loaded data
# Provide the object to save, a name and a description
store.rds.data(my.data,"everything","all countries and years are here")
#You can then close R. The next time you set.data.dir, the stored objects are loaded.
#you can see them in the contents of the data.dir you can see which stored files are there
show.data.dir.contents()
# In order to load back the file
my.data.restored = restore.rds.stored.data("everything")
#+eval=FALSE
#...................................................................................#
#
# USE CASE 3 example
#
# Perform analysis
#
#...................................................................................#
# Always load fadnUtils and data.table
library(fadnUtils)
library(data.table)
# The fist step is to set the current data.dir
set.data.dir("H:/IFM-CAP/sample.fadnutils.dir")
# Let's see what countries and years are available for loading
show.data.dir.contents()
#We load structured data for all available countries and years
my.data = load.fadn.str.rds()
# .............. HOW MANY FARMS FOR EACH COUNTY AND EACH YEAR .....................#
# we use the info DT, and group by YEAR-COUNTRY
my.data$info[,.N,by=list(YEAR,COUNTRY)]
#We can also use dcast, to show a more tabular format
dcast(
my.data$info,
YEAR~COUNTRY,
fun.aggregate = length,
value.var =
)
# We can also export to clipboard, using the write.excel utility function
# After running the following command, open excel and paste. The result will appear.
write.excel(
dcast(
my.data$info,
YEAR~COUNTRY,
fun.aggregate = length,
value.var =
)
)
# .............. ALL CROP AREAS PER COUNTRY-YEAR ...................................#
# First, calculate the weighted area
my.data$crops[
VARIABLE=="LEVL",
VALUE.w:=WEIGHT*VALUE/1000
]
# Then dcast that variable
dcast(
my.data$crops[VARIABLE=="LEVL"],
COUNTRY+CROP~YEAR,
value.var = "VALUE.w",
fun.aggregate = sum,
na.rm = T
)
# .............. ALL CROP PRODUCTION PER COUNTRY-YEAR..............................#
dcast(
my.data$crops[VARIABLE=="GROF",VALUE.w:=WEIGHT*VALUE/1000],
COUNTRY+CROP~YEAR,
value.var = "VALUE.w",
fun.aggregate = sum,
na.rm = T
)
# .............. BARLEY PRODUCTION PER COUNTRY-YEAR................................#
dcast(
my.data$crops[
VARIABLE=="GROF" & CROP=="BARL",
VALUE.w:=WEIGHT*VALUE/1000
],
COUNTRY~YEAR,
value.var = "VALUE.w",
fun.aggregate = sum,
na.rm = T
)
# .............. DISTRIBUTION OF NUMBER OF CROPS PER COUNTRY-YEAR ..................#
crops.data = my.data$crops #catering for easier access at next steps
#this contains the number of crops for each farm-country-year/
# Be carefule, we hav to filter to count only the LEVL variable
crops.data.Ncrops = crops.data[VARIABLE=="LEVL",.N,by=list(COUNTRY,YEAR,ID)]
# This displays the quantiles of the number of crops
crops.data.Ncrops[,as.list(quantile(N)),by=list(YEAR,COUNTRY)][order(COUNTRY)]
# R excels on graphic representation of results
library(ggplot2)
ggplot(crops.data.Ncrops,aes(y=N,x=1)) +
geom_boxplot() +
facet_grid(YEAR~COUNTRY) +
theme(axis.title.x=element_blank(),
axis.text.x=element_blank(),
axis.ticks.x=element_blank()
)+
ylab("Number of Crops")
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/standardResults.R
\name{analyzeFormula}
\alias{analyzeFormula}
\title{Dissagregates a string formula to a list(add=c("SE610","J830(2)","#289","#267..270"),substract=c("SE626","M632..634(2)"))}
\usage{
analyzeFormula(formula)
}
\arguments{
\item{formula}{a formula string, see examples}
}
\value{
list(add=c(),substract=())
}
\description{
Dissagregates a string formula to a list(add=c("SE610","J830(2)","#289","#267..270"),substract=c("SE626","M632..634(2)"))
}
\examples{
formula="K120..148(7)+K120..148(8)+K120..148(9)+K120..148(10)-K120..148(6)"
formula="#48+#49+#50"
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_column_names.R
\name{check.column}
\alias{check.column}
\title{Check the variables/column names for calculating the aggregate variables}
\usage{
check.column(importfilepath, jsonfile, rewrite_json = TRUE, extraction_dir)
}
\arguments{
\item{importfilepath}{A fadn.raw.rds or fadn.raw.csv file address.}
\item{jsonfile}{A json file address.}
\item{rewrite_json}{Logical, if TRUE (default), a new json file without unmatched variables will be saved. The string "rewrite" will be added in front of the original file name, and they are separated through "_". For example, the name of original json file is A.json, the new json file will be saved as rewrite_A.json.
Otherwise, do not rewrite json file.}
\item{extraction_dir}{Extraction_dir is the folder for extracting the data.}
}
\value{
A list of multiple objects. The objects are in the json-file, which have the unmatched variables.
}
\description{
The check.column function checks the variables if they exist in a json-file matching the variables
in the fadn.raw.rds or fadn.raw.csv (csv-file from FADN-AGRI),
returning a list of variables which are not in the raw data file. Then a new json file without unmatched variables can be saved in the extraction_dir.
A txt-file (my_logfile.txt) is created in a specific directory (spool.dir) where stores the output messages.
}
\details{
If variables exist in a json-file and not in the fadn.raw.rds file or fadn csv file, then returning all unmatched variables.
Json file has 6 objects/categries: "id", "info", "costs", "crops", "subsides", "livstock".
}
\examples{
check.column("./fadn.raw.2009.BEL.rds", "./2014_after.json", TRUE, "./OV")
check.column("BEL2009.csv", "2013_before.json", TRUE, "./OV")
}
\author{
Xinxin Yang <xinxin.yang@thuenen.de>
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manage_data_dir.R
\name{check.data.dir.structure}
\alias{check.data.dir.structure}
\title{Checks if the structure of the fadnUtils.data.dir is ok}
\usage{
check.data.dir.structure(data.dir = NULL, silent = T)
}
\arguments{
\item{data.dir}{a specific directory to show contents, otherwise it will read the fadnUtils.data.dir}
\item{silent}{if TRUE, do not print any message}
}
\value{
TRUe if everything is ok; FALSE otherwise
}
\description{
Checks if the structure of the fadnUtils.data.dir is ok
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/raw_str_map.R
\name{check.raw_str_map}
\alias{check.raw_str_map}
\title{Checks if the definitions of a raw_str_map are compatible with a fadn.raw.rds for a certain year and country}
\usage{
check.raw_str_map(raw_str_map.file, fadn.country = NA, fadn.year = NA)
}
\arguments{
\item{raw_str_map.file}{The full filepath of the raw_str_map}
}
\value{
}
\description{
Checks if all values are actual columns of the fadn.raw.rds file
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_column_names.R
\name{check_file_type}
\alias{check_file_type}
\title{Check the type of load file}
\usage{
check_file_type(filepath)
}
\arguments{
\item{filepath}{A rds or csv file address.}
}
\value{
A data frame with cases corresponding to lines and variables to fields in the file.
}
\description{
This function checks the type of the load file and read this file.
If the file is not a csv or rds file,
the execution of the currently running R code will be stopped.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common_id.R
\name{collect.common.id}
\alias{collect.common.id}
\title{Collect Common id}
\usage{
collect.common.id(my.r.data)
}
\arguments{
\item{my.r.data}{A data object(either a data.table or a list).}
}
\value{
A data.table, it includes just one column that named "common_id".
}
\description{
Load the Fadn.raw.rds data (Data Table) or Fadn.str.rds data (List),
then collection the common id from different years on this data.
}
\examples{
collect.common.id(fadn.raw.rds)
## collection the common "id" from the raw rds data
## for 2009-2012 years and country "BEL".
## Return a DT with one column named "common_id".
}
\author{
Xinxin Yang
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_data.R
\name{convert.to.fadn.raw.rds}
\alias{convert.to.fadn.raw.rds}
\title{Gets a fadn.raw.csv (csv file from DG-AGRI) and transforms it accordingly to fadn.raw.rds}
\usage{
convert.to.fadn.raw.rds(
file.path = "",
sepS = ",",
fadn.year = NA,
fadn.country = NA,
keep.csv = F,
col.id = "ID"
)
}
\arguments{
\item{file.path}{the full path of the csv file (the filename must be included)}
\item{sepS}{the separator of the csv files (by default ",")}
\item{fadn.year}{the year the csv files refers to (e.g. 2001)}
\item{fadn.country}{the three letter country code the csv files refers to (e.g. "ELL")}
\item{keep.csv}{if TRUE, copy the csv files to the CSV directory; else do not copy}
}
\value{
Saves the fadn.raw.rds file and returns TRUE if everything goes well
}
\description{
It saves two files:
- One that contain a wide format of the data, i.e. in tabular format that is identical to the csv data. This is uncompressed data.
- One that holds the same information in compressed data. It is a list that contains $data.char and $data.num data.tables in long format. 0 values are removed and only the col.id is the index on both data.tables
}