Skip to content

Commit

Permalink
Rename variables of renovation by heating system, adapt plots
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardarosemann committed Aug 23, 2024
1 parent e3dc985 commit d9bcf71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
8 changes: 4 additions & 4 deletions R/reportRenovation.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,31 @@ reportRenovation <- function(gdx, brickSets = NULL, silent = TRUE) {

## by initial heating system ====
reportAgg(v_renovation,
"Renovation|Residential|{hs} (bn m2/yr)", brickSets,
"Renovation|Residential|Initial|{hs} (bn m2/yr)", brickSets,
agg = c(bs = "all", bsr = "all0", hsr = "all", vin = "all", loc = "all", typ = "res", inc = "all"),
rprt = c(hs = "all"),
silent = silent),


## by building type + initial heating system ====
reportAgg(v_renovation,
"Renovation|Residential|{typ}|{hs} (bn m2/yr)", brickSets,
"Renovation|Residential|{typ}|Initial|{hs} (bn m2/yr)", brickSets,
agg = c(bs = "all", bsr = "all0", hsr = "all", vin = "all", loc = "all", inc = "all"),
rprt = c(hs = "all", typ = "res"),
silent = silent),


## by final heating system ====
reportAgg(v_renovation,
"Renovation|Residential|all|{hsr} (bn m2/yr)", brickSets,
"Renovation|Residential|Final|{hsr} (bn m2/yr)", brickSets,
agg = c(bs = "all", hs = "all", bsr = "all0", vin = "all", loc = "all", typ = "res", inc = "all"),
rprt = c(hsr = "all"),
silent = silent),


## by final heating system, without zero state ====
reportAgg(v_renovation,
"Renovation|Residential|all|With zero|{hsr} (bn m2/yr)", brickSets,
"Renovation|Residential|Final with zero|{hsr} (bn m2/yr)", brickSets,
agg = c(bs = "all", hs = "all", bsr = "all0", vin = "all", loc = "all", typ = "res", inc = "all"),
rprt = c(hsr = "all0"),
silent = silent),
Expand Down
23 changes: 9 additions & 14 deletions inst/compareScenarios/cs_01_stockFlows.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ showAreaAndBarPlots(data, vars = locationRes, tot = tot, orderVars = "user", sca
walk(locationRes, showLinePlots, data = data)
```

#### by Renovation cohort
#### by Construction cohort
```{r Stock-Residential-(vintage)}
showAreaAndBarPlots(data, vars = rev(vintageRes), tot = tot, orderVars = "user", scales = "fixed")
```
Expand Down Expand Up @@ -107,11 +107,12 @@ showAreaAndBarPlots(data, vars = subsec, tot = tot, orderVars = "user", scales =
### Residential
```{r residential Renovation vars}
tot <- "Renovation|Residential"
totAfter <- "Renovation|Residential|all" # for proper plotting
totAfterZero <- paste(totAfter, "With zero", sep = "|")
heatingResBefore <- paste(tot, heating, sep = "|")
heatingResAfter <- paste(tot, "all", heating0, sep = "|")
heatingResAfterZero <- paste(tot, "all", "With zero", heating0, sep = "|")
totBefore <- paste(tot, "Initial", sep = "|")
totAfter <- paste(tot, "Final", sep = "|") # for proper plotting
totAfterZero <- paste(tot, "Final with zero", sep = "|")
heatingResBefore <- paste(tot, "Initial", heating, sep = "|")
heatingResAfter <- paste(tot, "Final", heating0, sep = "|")
heatingResAfterZero <- paste(tot, "Final with zero", heating0, sep = "|")
typeRes <- paste(tot, type, sep = "|")
locationRes <- paste(tot, location, sep = "|")
```
Expand All @@ -130,14 +131,8 @@ walk(locationRes, showLinePlots, data = data)

#### by Space heating (initial state)
```{r Renovation-Residential-(heatingBefore)}
showAreaAndBarPlots(data, vars = heatingResBefore, tot = tot, orderVars = "user", scales = "fixed")
walk(heatingRes, showLinePlots, data = data)
```

#### by Space heating (initial state)
```{r Renovation-Residential-(heatingBefore)}
showAreaAndBarPlots(data, vars = heatingResBefore, tot = tot, orderVars = "user", scales = "fixed")
walk(heatingRes, showLinePlots, data = data)
showAreaAndBarPlots(data, vars = heatingResBefore, tot = totBefore, orderVars = "user", scales = "fixed")
walk(heatingResBefore, showLinePlots, data = data)
```

#### by Space heating (final state)
Expand Down

0 comments on commit d9bcf71

Please sign in to comment.