Skip to content

Commit

Permalink
Updating demeter quereis
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 21, 2023
1 parent b2c429c commit 17f8726
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/readgcam.R
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,7 @@ readgcam <- function(gcamdatabase = NULL,
origX = year,
scenario = scenNewNames,
value = value,
units = "Ag Production (billion m3)",
units = "Forest Production (billion m3)",
vintage = paste("Vint_", year, sep = ""),
x = year,
xLabel = "Year",
Expand All @@ -3260,7 +3260,8 @@ readgcam <- function(gcamdatabase = NULL,
classPalette1 = "pal_all",
class2 = "class2",
classLabel2 = "classLabel2",
classPalette2 = "classPalette2")%>%
classPalette2 = "classPalette2",
subRegion= region)%>%
dplyr::select(origScen,origQuery, origValue, origUnits, origX, region, subRegion, param, scenario,
value, units, vintage, x, xLabel, aggregate, class1, classLabel1, classPalette1,
class2, classLabel2, classPalette2)%>%dplyr::filter(!is.na(value))
Expand Down
Binary file modified data/map_param_query.rda
Binary file not shown.
Binary file modified data/params.rda
Binary file not shown.
Binary file modified data/queries.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion inst/extdata/devTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ params <- gcamextractor::params; params %>% sort()
gcamdatabase_i = "C:/Z/projects/current/00_IM3/pic_checks/database_rcp45cooler_ssp5"
#gcamdata_folder_i = "C:/Z/models/gcamextractor/tests/testthat/im3_test_data/gcamdata"
rgcam::localDBConn("C:/Z/projects/current/00_IM3/pic_checks/","database_rcp45cooler_ssp5")
reReadData_i = T
reReadData_i = F
dataProjFile_i = "dataProj_demeter.proj"
regionsSelect_i = c("Global","USA",gcamextractor::map_state_to_gridregion$state%>%unique(),"PR","Alaska grid","California grid","Central East grid","Central Northeast grid",
"Central Northwest grid", "Central Southwest grid","Florida grid","Hawaii grid",
Expand Down Expand Up @@ -176,6 +176,7 @@ df1$param%>%unique()
df1 %>% dplyr::filter(param=="agProdByCrop")
df1 %>% dplyr::filter(param=="landAllocDetail")
df1 %>% dplyr::filter(param=="fertConsByAgTech")
df1 %>% dplyr::filter(param=="agProdForest")

#----------------------------------------

Expand Down
1 change: 1 addition & 0 deletions inst/extdata/saveDataFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ map_param_query <- tibble::tribble(
"demeter","landAllocDetail","detailed land allocation","pal_green","no",
"demeter","agProdByCrop", "ag production by tech","pal_green","no",
"demeter","fertConsByAgTech", "fertilizer consumption by ag tech","pal_green","no",
"demeter","agProdForest", "ag production by tech","pal_green","no",
# Energy
"energy","energyPrimaryByFuelEJ","primary energy consumption by region (direct equivalent)","pal_hot","no",
"energy","energyPrimaryRefLiqProdEJ", "refined liquids production by subsector","pal_hot","no",
Expand Down

0 comments on commit 17f8726

Please sign in to comment.