Skip to content

Commit

Permalink
Merge branch 'master' into reorderSE
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Gong committed Dec 15, 2023
2 parents 3dce04b + 5cfaeab commit 1d20b51
Show file tree
Hide file tree
Showing 21 changed files with 638 additions and 4,480 deletions.
3 changes: 2 additions & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '222064080'
ValidationKey: '222126032'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand All @@ -9,5 +9,6 @@ AcceptedNotes:
- Imports includes .* non-default packages.
- unable to verify current time
- checking installed package size
- Namespace in Imports field not imported from: ‘htmltools’
AutocreateReadme: yes
allowLinterWarnings: yes
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'remind2: The REMIND R package (2nd generation)'
version: 1.127.0
date-released: '2023-12-13'
version: 1.127.2
date-released: '2023-12-15'
abstract: Contains the REMIND-specific routines for data and model output manipulation.
authors:
- family-names: Rodrigues
Expand Down
9 changes: 3 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: remind2
Title: The REMIND R package (2nd generation)
Version: 1.127.0
Date: 2023-12-13
Version: 1.127.2
Date: 2023-12-15
Authors@R: c(
person("Renato", "Rodrigues", , "[email protected]", role = c("aut", "cre")),
person("Lavinia", "Baumstark", role = "aut"),
Expand Down Expand Up @@ -42,7 +42,6 @@ URL: https://github.com/pik-piam/remind2
Depends:
magclass (>= 3.37)
Imports:
RColorBrewer,
abind,
assertr,
data.table,
Expand All @@ -52,10 +51,9 @@ Imports:
gdxrrw,
ggplot2,
gms,
highcharter,
htmltools,
iamc,
knitr,
lubridate,
lucode2 (>= 0.43.0),
luplot,
luscale,
Expand All @@ -72,7 +70,6 @@ Imports:
rlang,
rmarkdown,
rmndt,
scales,
tibble,
tidyr,
tidyselect,
Expand Down
37 changes: 1 addition & 36 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export(convGDX2MIF_LCOE)
export(convGDX2MIF_REMIND2MAgPIE)
export(convergenceCheck)
export(createVarListHtml)
export(dashboard)
export(deletePlus)
export(gdx.copy)
export(getCfgDefaultPath)
Expand All @@ -30,6 +29,7 @@ export(getRunsMIFGDX)
export(get_total_efficiencies)
export(loadCs2Data)
export(loadModeltest)
export(nashAnalysis)
export(plotCDR)
export(plotLCOE)
export(plotNashConvergence)
Expand All @@ -55,11 +55,9 @@ export(readTimeStepWeight)
export(readTrade)
export(reportCapacity)
export(reportCapitalStock)
export(reportCharts)
export(reportCosts)
export(reportCrossVariables)
export(reportDIETER)
export(reportDiagnosis)
export(reportEDGETransport)
export(reportEmi)
export(reportEmiAirPol)
Expand All @@ -86,7 +84,6 @@ export(toolRegionSubsets)
export(validationREMIND)
export(variablesAsList)
import(magclass)
importFrom(RColorBrewer,brewer.pal)
importFrom(abind,abind)
importFrom(assertr,assert)
importFrom(assertr,not_na)
Expand All @@ -110,7 +107,6 @@ importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,coalesce)
importFrom(dplyr,distinct)
importFrom(dplyr,do)
importFrom(dplyr,filter)
importFrom(dplyr,full_join)
importFrom(dplyr,group_by)
Expand All @@ -136,28 +132,19 @@ importFrom(gdxrrw,gdxInfo)
importFrom(ggplot2,aes)
importFrom(ggplot2,aes_)
importFrom(ggplot2,coord_cartesian)
importFrom(ggplot2,coord_flip)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_text)
importFrom(ggplot2,expand_limits)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_area)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,geom_boxplot)
importFrom(ggplot2,geom_col)
importFrom(ggplot2,geom_errorbar)
importFrom(ggplot2,geom_hline)
importFrom(ggplot2,geom_line)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_rect)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,geom_vline)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,labeller)
importFrom(ggplot2,labs)
importFrom(ggplot2,position_stack)
importFrom(ggplot2,scale_color_manual)
importFrom(ggplot2,scale_fill_brewer)
importFrom(ggplot2,scale_fill_discrete)
Expand All @@ -173,24 +160,11 @@ importFrom(ggplot2,theme_bw)
importFrom(ggplot2,theme_minimal)
importFrom(ggplot2,unit)
importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab)
importFrom(gms,getLine)
importFrom(gms,readDefaultConfig)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,rgb)
importFrom(highcharter,hc_add_series_list)
importFrom(highcharter,hc_mapNavigation)
importFrom(highcharter,hc_plotOptions)
importFrom(highcharter,hc_tooltip)
importFrom(highcharter,highchart)
importFrom(highcharter,list_parse)
importFrom(iamc,iamCheck)
importFrom(knitr,knit)
importFrom(lubridate,day)
importFrom(lubridate,hour)
importFrom(lubridate,minute)
importFrom(lubridate,second)
importFrom(lubridate,seconds_to_period)
importFrom(lucode2,getScenNames)
importFrom(luplot,magpie2ggplot2)
importFrom(luplot,plotcountrymap)
Expand Down Expand Up @@ -237,11 +211,9 @@ importFrom(magclass,setItems)
importFrom(magclass,setNames)
importFrom(magclass,setYears)
importFrom(magclass,write.report)
importFrom(mip,mipArea)
importFrom(mip,mipBarYearData)
importFrom(mip,mipLineHistorical)
importFrom(mip,plotstyle)
importFrom(mip,shorten_legend)
importFrom(openxlsx,addStyle)
importFrom(openxlsx,addWorksheet)
importFrom(openxlsx,createStyle)
Expand All @@ -253,7 +225,6 @@ importFrom(plotly,config)
importFrom(plotly,ggplotly)
importFrom(plotly,hide_legend)
importFrom(plotly,layout)
importFrom(plotly,style)
importFrom(plotly,subplot)
importFrom(quitte,as.quitte)
importFrom(quitte,calcCumulatedDiscount)
Expand Down Expand Up @@ -283,15 +254,9 @@ importFrom(rmarkdown,render)
importFrom(rmndt,approx_dt)
importFrom(rmndt,readMIF)
importFrom(rmndt,writeMIF)
importFrom(scales,pretty_breaks)
importFrom(stats,IQR)
importFrom(stats,as.formula)
importFrom(stats,lag)
importFrom(stats,quantile)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(tibble,tribble)
importFrom(tidyr,"%>%")
importFrom(tidyr,complete)
importFrom(tidyr,crossing)
importFrom(tidyr,drop_na)
Expand Down
3 changes: 2 additions & 1 deletion R/checkVsCalibData.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
#' }
#' @export
checkVsCalibData <- function(gdx, outputDir = getwd(), outputFile = "Check_vs_CalibData.pdf") {

yamlParams <- list(gdx = normalizePath(gdx, mustWork = TRUE))

rmarkdown::render(
system.file("markdown/checkVsCalibData/rc_main.Rmd", package = "remind2"),
system.file("markdown", "checkVsCalibrationData.Rmd", package = "remind2"),
output_dir = outputDir,
output_file = outputFile,
output_format = "pdf_document",
Expand Down
2 changes: 1 addition & 1 deletion R/compareCalibrationTargets.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ compareCalibrationTargets <- function(gdxPaths, outputDir = getwd(),
gdxPathNames = names(gdxPaths)
)
rmarkdown::render(
system.file("markdown/compareCalibrationTargets/cct_main.Rmd", package = "remind2"),
system.file("markdown/compareCalibrationTargets.Rmd", package = "remind2"),
output_dir = outputDir,
output_file = outputFile,
output_format = "html_document",
Expand Down
60 changes: 0 additions & 60 deletions R/dashboard.R

This file was deleted.

28 changes: 28 additions & 0 deletions R/nashAnalysis.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' @title Nash Analysis
#' @description Create plots visualizing nash convergence of a given REMIND run
#'
#' @author Falk Benke
#'
#' @param gdx a GDX object as created by readGDX, or the path to a gdx
#' @param outputDir \code{character(1)}. The directory where the output document
#' and intermediary files are created.
#' @param outputFile \code{character(1)}. File name (without extension) of the
#' output document to be created.
#' @return The value returned by \code{\link[rmarkdown:render]{rmarkdown::render()}}.
#'
#' @importFrom rmarkdown render
#'
#' @export
nashAnalysis <- function(gdx = "fulldata.gdx", outputDir = getwd(), outputFile = "Nash Analysis.html") {


yamlParams <- list(gdx = normalizePath(gdx, mustWork = TRUE))

rmarkdown::render(
system.file("markdown", "nashAnalysis.Rmd", package = "remind2"),
output_dir = outputDir,
output_file = outputFile,
output_format = "html_document",
params = yamlParams
)
}
Loading

0 comments on commit 1d20b51

Please sign in to comment.