Skip to content

Commit

Permalink
Merge pull request #31 from ahagen-pik/updateCompScenTransport
Browse files Browse the repository at this point in the history
Formatting comp scen transport - ES and Emissions
  • Loading branch information
ahagen-pik authored Nov 12, 2024
2 parents 46c534a + 6a1c871 commit 0cb343e
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '1262142'
ValidationKey: '1282240'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
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: 'reporttransport: Reporting package for edgeTransport'
version: 0.6.3
date-released: '2024-11-07'
version: 0.6.4
date-released: '2024-11-08'
abstract: This package contains edgeTransport-specific routines to report model results.
The main functionality is to generate transport reporting variables in MIF format
from a given edgeTransport model run folder or REMIND input data.
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: reporttransport
Title: Reporting package for edgeTransport
Version: 0.6.3
Date: 2024-11-07
Version: 0.6.4
Date: 2024-11-08
Authors@R:
person("Johanna", "Hoppe", , "[email protected]", role = c("aut", "cre"))
Description: This package contains edgeTransport-specific routines to
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reporting package for edgeTransport

R package **reporttransport**, version **0.6.3**
R package **reporttransport**, version **0.6.4**

[![CRAN status](https://www.r-pkg.org/badges/version/reporttransport)](https://cran.r-project.org/package=reporttransport) [![R build status](https://github.com/pik-piam/reporttransport/workflows/check/badge.svg)](https://github.com/pik-piam/reporttransport/actions) [![codecov](https://codecov.io/gh/pik-piam/reporttransport/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/reporttransport) [![r-universe](https://pik-piam.r-universe.dev/badges/reporttransport)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -41,7 +41,7 @@ In case of questions / problems please contact Johanna Hoppe <johanna.hoppe@pik-

To cite package **reporttransport** in publications use:

Hoppe J (2024). _reporttransport: Reporting package for edgeTransport_. R package version 0.6.3, <https://github.com/pik-piam/reporttransport>.
Hoppe J (2024). _reporttransport: Reporting package for edgeTransport_. R package version 0.6.4, <https://github.com/pik-piam/reporttransport>.

A BibTeX entry for LaTeX users is

Expand All @@ -50,7 +50,7 @@ A BibTeX entry for LaTeX users is
title = {reporttransport: Reporting package for edgeTransport},
author = {Johanna Hoppe},
year = {2024},
note = {R package version 0.6.3},
note = {R package version 0.6.4},
url = {https://github.com/pik-piam/reporttransport},
}
```
105 changes: 60 additions & 45 deletions inst/compareScenarios/cs_02_energy_services.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Energy Services
## Passenger without bunkers

## Passenger
### Energy Services by mode
#### Without bunkers
```{r}
totWoBunk <- "ES|Transport edge|Pass"
items <- c(
Expand All @@ -16,7 +19,7 @@ showAreaAndBarPlots(data, items, totWoBunk, orderVars = "user")
showAreaAndBarPlots(data, items, totWoBunk, fill = TRUE, orderVars = "user")
```

## Passenger with bunkers
#### With bunkers
```{r}
totBunk <- "ES|Transport|Pass with bunkers"
items <- c(
Expand All @@ -37,7 +40,20 @@ walk(c("ES|Transport|Pass|Aviation", totWoBunk, items[1:5], "ES|Transport|Pass|R
showLinePlots, data = data)
```

## Passenger per Capita
#### Four Wheelers
```{r}
tot <- "ES|Transport|Pass|Road|LDV|Four Wheelers"
items <- c(
"ES|Transport|Pass|Road|LDV|Four Wheelers|Large",
"ES|Transport|Pass|Road|LDV|Four Wheelers|Medium",
"ES|Transport|Pass|Road|LDV|Four Wheelers|Small"
)
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

### Per Capita - Energy Service by mode - with bunkers
```{r}
items <- c(
"ES|Transport edge|Pass pCap",
Expand All @@ -53,29 +69,27 @@ items <- c(
"ES|Transport|Pass|Non-motorized|Walk pCap",
"ES|Transport|Pass|Non-motorized|Cycle pCap"
)
showMultiLinePlots(data, items[1:6], nrowNum = 2)
showMultiLinePlots(data, items[7:12], nrowNum = 2)
#showMultiLinePlots(data, items[1:6], nrowNum = 2)
#showMultiLinePlots(data, items[7:12], nrowNum = 2)
showMultiLinePlots(data, items[1])
showMultiLinePlots(data, items[2])
showMultiLinePlots(data, items[3])
showMultiLinePlots(data, items[4])
showMultiLinePlots(data, items[5])
showMultiLinePlots(data, items[6])
showMultiLinePlots(data, items[7])
showMultiLinePlots(data, items[8])
showMultiLinePlots(data, items[9])
showMultiLinePlots(data, items[10])
showMultiLinePlots(data, items[11])
showMultiLinePlots(data, items[12])
showMultiLinePlotsByVariable(data, items[1:6], "GDP|PPP pCap", nrowNum = 2)
showMultiLinePlotsByVariable(data, items[7:12], "GDP|PPP pCap", nrowNum = 2)
walk(items, showLinePlotsByVariable, data = data, xVar = "GDP|PPP pCap")
```

## LDV Four Wheelers

### By vehicle size
```{r}
tot <- "ES|Transport|Pass|Road|LDV|Four Wheelers"
items <- c(
"ES|Transport|Pass|Road|LDV|Four Wheelers|Large",
"ES|Transport|Pass|Road|LDV|Four Wheelers|Medium",
"ES|Transport|Pass|Road|LDV|Four Wheelers|Small"
)
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

### By technology
### Energy Service by technology
#### Four Wheelers
```{r}
tot <- "ES|Transport|Pass|Road|LDV|Four Wheelers"
items <- c(
Expand All @@ -90,7 +104,7 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

## LDV 2-Wheelers by technology
#### LDV 2-Wheelers
```{r}
tot <- "ES|Transport|Pass|Road|LDV|Two Wheelers"
items <- c(
Expand All @@ -102,7 +116,7 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

## Busses by technology
#### Busses
```{r}
tot <- "ES|Transport|Pass|Road|Bus"
items <- c(
Expand All @@ -116,7 +130,9 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

## Freight without bunkers
## Freight
### Energy Services by mode
#### Without bunkers
```{r}
totWoBunk <- "ES|Transport edge|Freight"
items <- c(
Expand All @@ -128,7 +144,7 @@ showAreaAndBarPlots(data, items, totWoBunk, orderVars = "user")
showAreaAndBarPlots(data, items, totWoBbunk, fill = TRUE, orderVars = "user")
```

## Freight with bunkers
#### With bunkers
```{r}
totBunk <- "ES|Transport|Freight with bunkers"
items <- c(
Expand All @@ -143,25 +159,7 @@ showLinePlots(data, totBunk)
walk(items, showLinePlots, data = data)
```


## Freight per Capita
```{r}
items <- c(
"ES|Transport edge|Freight pCap",
"ES|Transport|Bunkers|Freight|International Shipping pCap",
"ES|Transport|Freight|Domestic Shipping pCap",
"ES|Transport|Freight|Rail pCap",
"ES|Transport|Freight|Road pCap"
)
showMultiLinePlots(data, items)
showMultiLinePlotsByVariable(data, items, "GDP|PPP pCap")
walk(items, showLinePlotsByVariable, data = data, xVar = "GDP|PPP pCap")
```

## Trucks

### By vehicle size
#### Trucks
```{r}
tot <- "ES|Transport|Freight|Road"
items <- c(
Expand All @@ -176,7 +174,24 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, fill = TRUE, orderVars = "user")
```

### By technology

### Per Capita - Energy Service by mode - Freight with bunkers
```{r}
items <- c(
"ES|Transport edge|Freight pCap",
"ES|Transport|Bunkers|Freight|International Shipping pCap",
"ES|Transport|Freight|Domestic Shipping pCap",
"ES|Transport|Freight|Rail pCap",
"ES|Transport|Freight|Road pCap"
)
showMultiLinePlots(data, items, nrowNum = 2)
showMultiLinePlotsByVariable(data, items, "GDP|PPP pCap", nrowNum = 2)
walk(items, showLinePlotsByVariable, data = data, xVar = "GDP|PPP pCap")
```


### Energy Service by technology - Trucks
```{r}
tot <- "ES|Transport|Freight|Road"
items <- c(
Expand Down
16 changes: 8 additions & 8 deletions inst/compareScenarios/cs_05_emissions.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Emissions

## Tailpipe Emissions Passenger
## Tailpipe Emissions Passenger - with bunkers
```{r}
tot <- "Emi|CO2|Energy|Tailpipe|Transport|Pass"
items <- c(
Expand All @@ -11,7 +11,7 @@ items <- c(
"Emi|CO2|Energy|Tailpipe|Transport|Pass|Road|LDV|Four Wheelers",
"Emi|CO2|Energy|Tailpipe|Transport|Pass|Road|LDV|Two Wheelers")
showAreaAndBarPlots(data, items[2:6], tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items[2:6], tot, fill = TRUE, orderVars = "user")
showLinePlots(data, tot)
walk(c(items,"Emi|CO2|Energy|Tailpipe|Transport|Pass|Road|LDV"
Expand All @@ -33,7 +33,7 @@ showLinePlots(data, tot)
walk(items, showLinePlots, data = data)
```

## Tailpipe Emissions Freight
## Tailpipe Emissions Freight - with bunkers
```{r}
tot <- "Emi|CO2|Energy|Tailpipe|Transport|Freight"
items <- c(
Expand All @@ -42,7 +42,7 @@ items <- c(
"Emi|CO2|Energy|Tailpipe|Transport|Freight|Rail",
"Emi|CO2|Energy|Tailpipe|Transport|Freight|Road"
)
showAreaAndBarPlots(data, items[2:4], tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items[2:4], tot, fill = TRUE, orderVars = "user")
showLinePlots(data, tot)
walk(items, showLinePlots, data = data)
Expand All @@ -64,7 +64,7 @@ showLinePlots(data, tot)
walk(items, showLinePlots, data = data)
```
## Demand (netto) Emissions Passenger
## Demand (netto) Emissions Passenger - with bunkers
```{r}
tot <- "Emi|CO2|Energy|Demand|Transport|Pass"
items <- c(
Expand All @@ -75,7 +75,7 @@ items <- c(
"Emi|CO2|Energy|Demand|Transport|Pass|Road|LDV|Four Wheelers",
"Emi|CO2|Energy|Demand|Transport|Pass|Road|LDV|Two Wheelers")
showAreaAndBarPlots(data, items[2:6], tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items[2:6], tot, fill = TRUE, orderVars = "user")
showLinePlots(data, tot)
walk(c(items,"Emi|CO2|Energy|Demand|Transport|Pass|Road|LDV"
Expand All @@ -97,7 +97,7 @@ showLinePlots(data, tot)
walk(items, showLinePlots, data = data)
```

## Demand (netto) Emissions Freight
## Demand (netto) Emissions Freight - with bunkers
```{r}
tot <- "Emi|CO2|Energy|Demand|Transport|Freight"
items <- c(
Expand All @@ -106,7 +106,7 @@ items <- c(
"Emi|CO2|Energy|Demand|Transport|Freight|Rail",
"Emi|CO2|Energy|Demand|Transport|Freight|Road"
)
showAreaAndBarPlots(data, items[2:4], tot, orderVars = "user")
showAreaAndBarPlots(data, items, tot, orderVars = "user")
showAreaAndBarPlots(data, items[2:4], tot, fill = TRUE, orderVars = "user")
showLinePlots(data, tot)
walk(items, showLinePlots, data = data)
Expand Down

0 comments on commit 0cb343e

Please sign in to comment.