Skip to content

Commit 2a07365

Browse files
committed
Improve the mapping use for L107
1 parent 94d46ff commit 2a07365

12 files changed

+907
-854
lines changed

R/constants.R

Lines changed: 329 additions & 325 deletions
Large diffs are not rendered by default.

R/xfaostat_L105_DataConnectionToSUA.R

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
1919

2020
MODULE_INPUTS <-
21-
c(FILE = file.path(DIR_RAW_DATA_FAOSTAT, "FAO_items"),
21+
c(FILE = file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_items"),
2222
"L102.QCL_PROD",
2323
"L102.QCL_AN_LIVEANIMAL_MEATEQ",
2424
"TCL_wide",
@@ -39,7 +39,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
3939
year <- value <- Year <- Value <- FAO_country <- iso <- NULL # silence package check.
4040
SCL_wide <- element_code <- element <- area_code <- item_code <- area <-
4141
item <- unit <- FBS_wide <- FBSH_CBH_wide <- TCL_wide <- TM_bilateral_wide <-
42-
L102.QCL_PROD <- FAO_items <- tier <- QCL <- oil <-
42+
L102.QCL_PROD <- Mapping_gcamdata_FAO_items <- tier <- QCL <- oil <-
4343
cake <- SCL_item_oil <- SCL_item_cake <- cake_rate <- cake_rate_world <-
4444
DS_key_coproduct_item <- Production <- Import <- Export <- DS_demand <-
4545
DS_production <- CoproductRate <- L102.QCL_AN_LIVEANIMAL_MEATEQ <- `Closing stocks` <-
@@ -384,14 +384,14 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
384384

385385

386386

387-
# 3. Process items in FAO_items to get Balanced SUA data ----
387+
# 3. Process items in Mapping_gcamdata_FAO_items to get Balanced SUA data ----
388388
## 3.1 Bal_new_tier1 ----
389389
# Tier1 includes 209 = 210-1 items with best sources e.g. bilateral trade (TM) prodstat (QCL) and supply-utilization-account (SCL)
390390
# Note that item 237 Oil soybean was moved from Tier1 to Tier2 to use SCL for production due to Brazil data issue in QCL
391391
# SCL has balanced data processed by FAO but the quality was poor with low consistency
392392

393393

394-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 1) %>% pull(item_code)) %>%
394+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 1) %>% pull(item_code)) %>%
395395
SUA_TEMPLATE_LEFT_JOIN("QCL") %>%
396396
SUA_TEMPLATE_LEFT_JOIN("TM") %>%
397397
SUA_TEMPLATE_LEFT_JOIN("SCL") %>%
@@ -402,7 +402,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
402402
select(-QCL, -TCL, -SCL) %>%
403403
# Adjust for balance across all dimensions
404404
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
405-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
405+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
406406
Bal_new_tier1
407407

408408

@@ -411,15 +411,15 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
411411
## 3.2 Bal_new_tier2 ----
412412
# Tier2 includes 204 items that had no data or low quality data in QCL so used production from SCL
413413

414-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 2) %>% pull(item_code)) %>%
414+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 2) %>% pull(item_code)) %>%
415415
SUA_TEMPLATE_LEFT_JOIN("TM") %>%
416416
SUA_TEMPLATE_LEFT_JOIN("SCL") %>%
417417
mutate(value = case_when(
418418
element %in% c("Export", "Import") ~ TCL,
419419
element %in% SCL_element_new ~ SCL) ) %>%
420420
select(-TCL, -SCL) %>%
421421
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
422-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
422+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
423423
Bal_new_tier2
424424

425425
assert_FBS_balance(Bal_new_tier2)
@@ -429,7 +429,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
429429
# Tier3 includes 21 items that had QCL but no bilateral trade data
430430
# so use gross trade from SCL
431431

432-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 3) %>% pull(item_code)) %>%
432+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 3) %>% pull(item_code)) %>%
433433
SUA_TEMPLATE_LEFT_JOIN("SCL") %>%
434434
# light cleaning here since more missing data were seen for this group
435435
# set NA stock variation to zero to avoid fill NA later
@@ -446,15 +446,15 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
446446
select(-QCL, -SCL) %>%
447447
GROSS_TRADE_ADJUST(.MIN_TRADE_PROD_RATIO = 0.01) %>%
448448
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
449-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
449+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
450450
Bal_new_tier3
451451

452452
assert_FBS_balance(Bal_new_tier3)
453453

454454
## 3.4 Bal_new_tier4 ----
455455
# Tier4 includes 40 items included in SCL but not in Tier1-3
456456

457-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 4) %>% pull(item_code)) %>%
457+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 4) %>% pull(item_code)) %>%
458458
SUA_TEMPLATE_LEFT_JOIN("SCL") %>%
459459
# light cleaning here since more missing data were seen for this group
460460
rename(value = SCL) %>%
@@ -466,7 +466,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
466466
# Gross trade is adjusted since the source was not bilateral trade
467467
GROSS_TRADE_ADJUST(.MIN_TRADE_PROD_RATIO = 0.01) %>%
468468
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
469-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
469+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
470470
Bal_new_tier4
471471

472472
assert_FBS_balance(.DF = Bal_new_tier4)
@@ -475,7 +475,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
475475
## 3.5 Bal_new_tier5 ----
476476
#Tier5 includes 12 fish items from FBS and FBSH. Item code came from FBS as well
477477

478-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 5) %>% pull(item_code)) %>%
478+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 5) %>% pull(item_code)) %>%
479479
SUA_TEMPLATE_LEFT_JOIN("FBS") %>%
480480
mutate(value = if_else(is.na(value) & element == "Stock Variation", 0, value)) %>%
481481
group_by(area_code, item_code, element) %>%
@@ -485,7 +485,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
485485
replace_na(list(value = 0)) %>%
486486
GROSS_TRADE_ADJUST(.MIN_TRADE_PROD_RATIO = 0.01) %>%
487487
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
488-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
488+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
489489
Bal_new_tier5
490490

491491
assert_FBS_balance(.DF = Bal_new_tier5)
@@ -496,7 +496,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
496496
# "Rice, paddy (rice milled equivalent)" removed as not needed and excluded by FAOSTAT in 2023
497497
# 773 (Flax, processed but not spun) is changed to 771 (Flax, raw or retted)
498498

499-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 6) %>% pull(item_code)) %>%
499+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 6) %>% pull(item_code)) %>%
500500
SUA_TEMPLATE_LEFT_JOIN("QCL") %>%
501501
SUA_TEMPLATE_LEFT_JOIN("TM", .DS_TM_Assert_Item = F) %>%
502502
SUA_TEMPLATE_LEFT_JOIN("TCL_gross", .DS_TM_Assert_Item = F) %>%
@@ -509,23 +509,23 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
509509
replace_na(list(value = 0)) %>%
510510
GROSS_TRADE_ADJUST(.MIN_TRADE_PROD_RATIO = 0.01) %>%
511511
spread(element, value) %>%
512-
# Processing to add demand based on DS_demand in FAO_items
512+
# Processing to add demand based on DS_demand in Mapping_gcamdata_FAO_items
513513
# Only an exclusive use is assumed
514-
mutate(Processed = if_else(item_code %in% c(FAO_items %>%
514+
mutate(Processed = if_else(item_code %in% c(Mapping_gcamdata_FAO_items %>%
515515
filter(tier == 6, grepl("Processed", DS_demand)) %>%
516516
pull(item_code) ) & (Production + Import - Export) > 0,
517517
(Production + Import - Export), 0),
518-
Food = if_else(item_code %in% c(FAO_items %>%
518+
Food = if_else(item_code %in% c(Mapping_gcamdata_FAO_items %>%
519519
filter(tier == 6, grepl("Food", DS_demand)) %>%
520520
pull(item_code) ) & (Production + Import - Export) > 0,
521521
(Production + Import - Export), 0),
522-
`Other uses` = if_else(item_code %in% c(FAO_items %>%
522+
`Other uses` = if_else(item_code %in% c(Mapping_gcamdata_FAO_items %>%
523523
filter(tier == 6, grepl("Other", DS_demand)) %>%
524524
pull(item_code) ) & (Production + Import - Export) > 0,
525525
(Production + Import - Export), 0)) %>%
526526
gather(element, value, -area_code, -item_code, -year) %>%
527527
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
528-
left_join(FAO_items %>% select(item_code, item), by = "item_code") ->
528+
left_join(Mapping_gcamdata_FAO_items %>% select(item_code, item), by = "item_code") ->
529529
Bal_new_tier6
530530

531531
assert_FBS_balance(.DF = Bal_new_tier6)
@@ -543,7 +543,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
543543
filter(element == "Production") %>%
544544
mutate(value = value * 1000) %>% # convert units back to tonne!!!
545545
# Join to keep Tier 8 items
546-
right_join(FAO_items %>% filter(tier == 7) %>%
546+
right_join(Mapping_gcamdata_FAO_items %>% filter(tier == 7) %>%
547547
# Get co-production rate from DS_production which is uniform across regions
548548
mutate(CoproductRate = as.numeric(gsub("Coproduction_Rate \\(|)","", DS_production))) %>%
549549
select(item_code, item, coproduct_item = DS_key_coproduct_item, coproduct_item_code = DS_key_coproduct_item_code, CoproductRate),
@@ -553,21 +553,21 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
553553

554554

555555
### 3.7.2 Process to get Bal_new_tier7 ----
556-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 7) %>% pull(item_code)) %>%
556+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 7) %>% pull(item_code)) %>%
557557
SUA_TEMPLATE_LEFT_JOIN("QCL_Coproduct") %>%
558558
replace_na(list(value = 0)) %>%
559559
spread(element, value) %>%
560-
# Processing to add demand based on DS_demand in FAO_items
560+
# Processing to add demand based on DS_demand in Mapping_gcamdata_FAO_items
561561
# Only an exclusive use is assumed
562-
mutate(Feed = if_else(item_code %in% c(FAO_items %>% filter(tier == 7, grepl("Feed", DS_demand)) %>%
562+
mutate(Feed = if_else(item_code %in% c(Mapping_gcamdata_FAO_items %>% filter(tier == 7, grepl("Feed", DS_demand)) %>%
563563
pull(item_code) ) & Production > 0,
564564
Production, 0),
565-
`Other uses` = if_else(item_code %in% c(FAO_items %>% filter(tier == 7, grepl("Other", DS_demand)) %>%
565+
`Other uses` = if_else(item_code %in% c(Mapping_gcamdata_FAO_items %>% filter(tier == 7, grepl("Other", DS_demand)) %>%
566566
pull(item_code) ) & Production > 0,
567567
Production, 0) ) %>%
568568
gather(element, value, -area_code, -item_code, -year) %>%
569569
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
570-
left_join(FAO_items %>% select(item, item_code), by = "item_code") ->
570+
left_join(Mapping_gcamdata_FAO_items %>% select(item, item_code), by = "item_code") ->
571571
Bal_new_tier7
572572

573573
assert_FBS_balance(.DF = Bal_new_tier7)
@@ -609,7 +609,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
609609
APE_live_an_MeatEQ
610610

611611
### 3.8.2 Process to get Bal_new_tier9 ----
612-
Get_SUA_TEMPLATE(.ITEM_CODE = FAO_items %>% filter(tier == 8) %>% pull(item_code)) %>%
612+
Get_SUA_TEMPLATE(.ITEM_CODE = Mapping_gcamdata_FAO_items %>% filter(tier == 8) %>% pull(item_code)) %>%
613613
SUA_TEMPLATE_LEFT_JOIN("APE_live_an_MeatEQ") %>%
614614
spread(element, value) %>%
615615
# only keep net openning stock in the study period
@@ -618,7 +618,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
618618
ungroup() %>%
619619
gather(element, value, -area_code, -item_code, -year) %>%
620620
SUA_bal_adjust %>% # Unit is converted to 1000 tonnes!
621-
left_join(FAO_items %>% select(item, item_code), by = "item_code") ->
621+
left_join(Mapping_gcamdata_FAO_items %>% select(item, item_code), by = "item_code") ->
622622
Bal_new_tier8
623623

624624
assert_FBS_balance(.DF = Bal_new_tier8)
@@ -646,15 +646,15 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
646646

647647
assert_FBS_balance(.DF = L105.Bal_new_all)
648648

649-
rm(TCL_gross, TCL_TM, SCL, FBS, FBSH_CBH, FAO_items)
649+
rm(TCL_gross, TCL_TM, SCL, FBS, FBSH_CBH, Mapping_gcamdata_FAO_items)
650650
rm(list = ls(pattern = "Bal_new_tier*"))
651651

652652

653653
L105.Bal_new_all %>%
654654
add_title("L105.Bal_new_all") %>%
655655
add_units("Ktonne") %>%
656656
add_comments("Preprocessed FAO SUA 2010 - 2021") %>%
657-
add_precursors(file.path(DIR_RAW_DATA_FAOSTAT, "FAO_items"),
657+
add_precursors(file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_items"),
658658
"L102.QCL_PROD",
659659
"L102.QCL_AN_LIVEANIMAL_MEATEQ",
660660
"TCL_wide",
@@ -676,7 +676,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
676676
# Update log
677677
# The old tier 5 was not needed (oil seed cake) as the data is available
678678

679-
# ***Generate/check FAO_items ----
679+
# ***Generate/check Mapping_gcamdata_FAO_items ----
680680

681681
# Curr_Envir <- environment()
682682
#
@@ -737,7 +737,7 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
737737
# filter(item_code != 30) -> Tier6
738738
#
739739
# Tier6 %>% left_join(
740-
# FAO_items %>% filter(tier == 6) %>% select(item_code, DS_trade, DS_production, DS_demand, DS_key_coproduct_item)
740+
# Mapping_gcamdata_FAO_items %>% filter(tier == 6) %>% select(item_code, DS_trade, DS_production, DS_demand, DS_key_coproduct_item)
741741
# ) %>% replace_na(list(DS_demand = "Other use only")) -> Tier6
742742
#
743743
# Tier6 %>% inner_join(
@@ -750,14 +750,14 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
750750
# mutate(DS_production = "QCL") -> Tier6
751751
#
752752
#
753-
# FAO_items %>% filter(tier %in% 8) %>%
753+
# Mapping_gcamdata_FAO_items %>% filter(tier %in% 8) %>%
754754
# select(item_code, item, DS_trade, DS_production, DS_demand, DS_key_coproduct_item) %>% mutate(tier = 8) %>%
755755
# filter(!grepl("rice|maize|hempseed|linseed|kapok|poppy|safflower", item)) %>%
756756
# mutate(coproduct_item_code = c(274, 278, 332, 340))-> Tier7
757757
#
758758
# # "Oil of olive residues|Jojoba oil|Cake of cottonseed|Other oil of vegetable origin, crude n.e.c."
759759
#
760-
# FAO_items %>% filter(tier %in% 9) %>%
760+
# Mapping_gcamdata_FAO_items %>% filter(tier %in% 9) %>%
761761
# select(item_code, item) %>% mutate(tier = 9) -> Tier8
762762
#
763763
# Tier1 %>% mutate(DS_trade = "TM", DS_production = "QCL", DS_demand = "SCL") %>%
@@ -769,9 +769,9 @@ module_xfaostat_L105_DataConnectionToSUA <- function(command, ...) {
769769
# bind_rows(Tier7) %>%
770770
# bind_rows(Tier8) -> Tier_All
771771
#
772-
# FAO_items %>% filter(tier %in% 1:9) %>% anti_join(Tier_All, by = c("item_code"))
773-
# Tier_All %>% anti_join(FAO_items, by = c("item_code"))
772+
# Mapping_gcamdata_FAO_items %>% filter(tier %in% 1:9) %>% anti_join(Tier_All, by = c("item_code"))
773+
# Tier_All %>% anti_join(Mapping_gcamdata_FAO_items, by = c("item_code"))
774774
#
775-
# Tier_All -> FAO_items
775+
# Tier_All -> Mapping_gcamdata_FAO_items
776776
#
777777

R/xfaostat_L106_FoodMacroNutrient.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
2121
c("SCL_wide",
2222
"FBS_wide",
2323
"OA",
24-
FILE = file.path(DIR_RAW_DATA_FAOSTAT, "FAO_an_items_cal_SUA"),
25-
FILE = file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_FAO_FBS_SUA"))
24+
FILE = file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_AnCalorie"),
25+
FILE = file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_FBS_SUA"))
2626

2727
MODULE_OUTPUTS <-
2828
c("L106.SUA_food_macronutrient_rate")
@@ -38,8 +38,8 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
3838
`Proteins/Year` <- `Fats/Year` <- calperg <- proteinperc <- fatperc <-
3939
value_world <- value_reg <- Diff <- p_Diff <- quantile <- `Food supply quantity (kg/capita/yr)` <-
4040
`Protein supply quantity (g/capita/day)` <- `Fat supply quantity (g/capita/day)` <-
41-
FAO_an_items_cal_SUA <- Mcal_t <- fat_Perc <- protein_Perc <- FAO_FBS_code <-
42-
SCL_item_code <- CPC_code <- Mapping_FAO_FBS_SUA <- unit <- element <-
41+
Mapping_gcamdata_FAO_AnCalorie <- Mcal_t <- fat_Perc <- protein_Perc <- FAO_FBS_code <-
42+
SCL_item_code <- CPC_code <- Mapping_gcamdata_FAO_FBS_SUA <- unit <- element <-
4343
area_code <- item_code <- element_code <- OA <- FBS_wide <- SCL_wide <-
4444
`Food supply (kcal/capita/day)` <- NULL
4545

@@ -125,7 +125,7 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
125125
#*******************************************
126126

127127
SCL %>% filter(element_code %in% c(261, 271, 281, 5141)) %>% #All 3 cal protein fats and food in ton
128-
right_join(Mapping_FAO_FBS_SUA %>%
128+
right_join(Mapping_gcamdata_FAO_FBS_SUA %>%
129129
filter(!is.na(CPC_code)) %>%
130130
select(item_code = SCL_item_code, FAO_FBS_code, FBS_label),
131131
by = "item_code") %>%
@@ -197,7 +197,7 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
197197
#*******************************************
198198

199199
# Adding the 12 fish item from FBS
200-
Mapping_FAO_FBS_SUA %>% filter(is.na(CPC_code)) %>%
200+
Mapping_gcamdata_FAO_FBS_SUA %>% filter(is.na(CPC_code)) %>%
201201
select(item = FBS_label, item_code = FAO_FBS_code) -> Fish_item
202202

203203
FBS %>% right_join(Fish_item, by = c("item_code", "item")) -> FBS_fish
@@ -232,7 +232,7 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
232232
bind_rows(
233233
SUA_food_macronutrient_rate_nofish %>% distinct(area_code) %>%
234234
full_join(Fish_item, by = character()) %>%
235-
left_join(FAO_an_items_cal_SUA %>%
235+
left_join(Mapping_gcamdata_FAO_AnCalorie %>%
236236
select(item_code, calperg = Mcal_t,fatperc = fat_Perc,
237237
proteinperc = protein_Perc), by = "item_code" )
238238
) -> L106.SUA_food_macronutrient_rate
@@ -245,8 +245,8 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
245245

246246
rm(SUA_food_macronutrient, SUA_food_yearmean,
247247
SUA_food_yearmean_fill, SUA_food_yearareamean,
248-
OA, POP, SCL, FBS, Mapping_FAO_FBS_SUA,
249-
SUA_food_macronutrient_rate_nofish, FAO_an_items_cal_SUA)
248+
OA, POP, SCL, FBS, Mapping_gcamdata_FAO_FBS_SUA,
249+
SUA_food_macronutrient_rate_nofish, Mapping_gcamdata_FAO_AnCalorie)
250250
rm(Fish_item)
251251
rm(checkarea, checkitem, checkelement)
252252

@@ -259,8 +259,8 @@ module_xfaostat_L106_FoodMacroNutrient <- function(command, ...) {
259259
add_precursors("SCL_wide",
260260
"FBS_wide",
261261
"OA",
262-
file.path(DIR_RAW_DATA_FAOSTAT, "FAO_an_items_cal_SUA"),
263-
file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_FAO_FBS_SUA")) ->
262+
file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_AnCalorie"),
263+
file.path(DIR_RAW_DATA_FAOSTAT, "Mapping_gcamdata_FAO_FBS_SUA")) ->
264264
L106.SUA_food_macronutrient_rate
265265

266266
# P.S. ----

0 commit comments

Comments
 (0)