Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete non-ldv entries (extensive) #587

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export(reportClimate)
export(reportCosts)
export(reportCrossVariables)
export(reportDIETER)
export(reportEDGETransport)
export(reportEmi)
export(reportEmiAirPol)
export(reportEmployment)
Expand Down Expand Up @@ -86,16 +85,10 @@ importFrom(abind,abind)
importFrom(assertr,assert)
importFrom(assertr,not_na)
importFrom(data.table,":=")
importFrom(data.table,CJ)
importFrom(data.table,as.data.table)
importFrom(data.table,copy)
importFrom(data.table,data.table)
importFrom(data.table,fread)
importFrom(data.table,frollmean)
importFrom(data.table,fwrite)
importFrom(data.table,rbindlist)
importFrom(data.table,setDT)
importFrom(data.table,setnames)
importFrom(dplyr,"%>%")
importFrom(dplyr,across)
importFrom(dplyr,arrange)
Expand Down Expand Up @@ -125,7 +118,6 @@ importFrom(dplyr,tibble)
importFrom(dplyr,tribble)
importFrom(dplyr,ungroup)
importFrom(gdx,readGDX)
importFrom(gdxdt,readgdx)
importFrom(gdxrrw,gdxInfo)
importFrom(ggplot2,aes)
importFrom(ggplot2,aes_)
Expand Down Expand Up @@ -244,9 +236,6 @@ importFrom(rlang,is_empty)
importFrom(rlang,sym)
importFrom(rlang,syms)
importFrom(rmarkdown,render)
importFrom(rmndt,approx_dt)
importFrom(rmndt,readMIF)
importFrom(rmndt,writeMIF)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(tibble,tribble)
Expand Down
11 changes: 0 additions & 11 deletions R/reportCapitalStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ reportCapitalStock <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),se
tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,"apCarH2T"] * pm_conv_cap_2_MioLDV,dim=c(3.1,3.2)),"Est H2 LDV Sales (million vehicles)"))
tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,"apCarPeT"] * pm_conv_cap_2_MioLDV,dim=c(3.1,3.2)),"Est ICE LDV Sales (million vehicles)"))

tmp <- mbind(tmp,setNames(dimSums(vm_cap[,,c("apCarDiT","apcarDiEffT","apcarDiEffH2T")],dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Stock|uedit (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_cap[,,"apCarDiT"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Stock|apCarDiT (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_cap[,,"apcarDiEffT"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Stock|apcarDiEffT (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_cap[,,"apcarDiEffH2T"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Stock|apcarDiEffH2T (arbitrary unit)"))

tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,c("apCarDiT","apcarDiEffT","apcarDiEffH2T")],dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Sales|uedit (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,"apCarDiT"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Sales|apCarDiT (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,"apcarDiEffT"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Sales|apcarDiEffT (arbitrary unit)"))
tmp <- mbind(tmp,setNames(dimSums(vm_deltaCap[,,"apcarDiEffH2T"] ,dim=c(3.1,3.2)), "Services and Products|Transport|non-LDV|Sales|apcarDiEffH2T (arbitrary unit)"))


## add global values
tmp <- mbind(tmp,dimSums(tmp,dim=1))
}
Expand Down
1 change: 1 addition & 0 deletions R/reportCrossVariables.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#' @importFrom tibble as_tibble
#' @importFrom tidyselect everything
#' @importFrom madrat toolAggregate
#' @importFrom data.table :=
#'

reportCrossVariables <- function(gdx, output = NULL, regionSubsetList = NULL,
Expand Down
680 changes: 0 additions & 680 deletions R/reportEDGETransport.R

This file was deleted.

12 changes: 4 additions & 8 deletions R/reportFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,6 @@ reportFE <- function(gdx, regionSubsetList = NULL,
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fepet"),all_enty="seliqfos",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|LDV|Liquids|+|Fossil (EJ/yr)"),
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fepet"),all_enty="seliqsyn",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|LDV|Liquids|+|Hydrogen (EJ/yr)"),

setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fedie"),all_enty="seliqbio",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|non-LDV|Liquids|+|Biomass (EJ/yr)"),
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fedie"),all_enty="seliqfos",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|non-LDV|Liquids|+|Fossil (EJ/yr)"),
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fedie"),all_enty="seliqsyn",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|non-LDV|Liquids|+|Hydrogen (EJ/yr)"),

# transport gases
setNames((dimSums(mselect(vm_demFeSector,all_enty1="fegat",emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|+|Gases (EJ/yr)"),
setNames((dimSums(mselect(vm_demFeSector,all_enty1="fegat",all_enty="segabio",emi_sectors="trans"),dim=3,na.rm=T)), "FE|Transport|Gases|+|Biomass (EJ/yr)"),
Expand Down Expand Up @@ -446,8 +442,8 @@ reportFE <- function(gdx, regionSubsetList = NULL,
# quick fix: to avoid duplicates of this variable with the version with a "+" below in case of transport complex: only calculate this in case of edge_esm being used:

out <- mbind(out,
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fepet"),emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|LDV|Liquids (EJ/yr)"),
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fedie"),emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|non-LDV|Liquids (EJ/yr)"))
setNames((dimSums(mselect(vm_demFeSector,all_enty1=c("fepet"),emi_sectors="trans") ,dim=3,na.rm=T)), "FE|Transport|LDV|Liquids (EJ/yr)")
)



Expand Down Expand Up @@ -521,7 +517,7 @@ reportFE <- function(gdx, regionSubsetList = NULL,
getNames(out)[grep("FE\\|Transport\\|ESR", getNames(out))],
function(x) {
setNames(out[, , x], gsub("FE\\|Transport\\|ESR",
"FE\\|Transport\\|w/o Bunkers", x))
"FE\\|Transport", x))
}
)
)
Expand All @@ -538,7 +534,7 @@ reportFE <- function(gdx, regionSubsetList = NULL,
out <- mbind(out, var_without_Bunkers, var_with_Bunkers)
##
out <- mbind(out,
setNames(out[, , "FE|Transport|++|ESR (EJ/yr)"], "FE|Transport|w/o Bunkers (EJ/yr)"),
setNames(out[, , "FE|Transport|++|ESR (EJ/yr)"], "FE|Transport (EJ/yr)"),
setNames(out[, , "FE|Transport|++|Outside ETS and ESR (EJ/yr)"], "FE|Transport|Bunkers (EJ/yr)")
)
out <- mbind(out,
Expand Down
9 changes: 1 addition & 8 deletions R/reportPrices.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ reportPrices <- function(gdx, output=NULL, regionSubsetList=NULL,
fe = c(
fehos = "Liquids",
fepet = "LDV|Liquids",
Copy link
Contributor

@fbenke-pik fbenke-pik Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orichters Due to deletion of 'fedie' , the function addVar throws the warning `In reportPrices, addVar called with a NA value, e.g. "Price|Final Energy|Transport|other|NA|Fossil (US$2005/GJ)".

In consequence, duplicates are produced in the out object, and that is a problem.

What would be the correct way to deal with this? Not delete the fedie entries or somehow address them being removed?

Copy link
Contributor

@fbenke-pik fbenke-pik Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orichters Btw, I think a warning in in addVar is not sufficient when there are NAs. Should crash or return NULL, as the returned magclass object becomes unusable, yet it is not easy to find the source of the problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consult with @Renato-Rodrigues who introduced the addVar function. I don't understand how this can create duplicates, though: this line should avoid it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the duplicates are produced in another part of the code.

We still have to avoid the warning, @jmuessel as it will be thrown 50+ times, i.e. individual warnings are no longer printed and do not appear in the log.

fedie = "non-LDV|Liquids",
fesos = "Solids",
feels = "Electricity",
feelt = "Electricity",
Expand All @@ -360,7 +359,6 @@ reportPrices <- function(gdx, output=NULL, regionSubsetList=NULL,
fegas = "Stationary|Gases",
fehes = "Stationary|Heat",
fepet = "Transport|LDV|Liquids",
fedie = "Transport|non-LDV|Liquids",
feelt = "Transport|Electricity",
feh2t = "Transport|Hydrogen",
fegat = "Transport|Gases"
Expand Down Expand Up @@ -943,12 +941,7 @@ reportPrices <- function(gdx, output=NULL, regionSubsetList=NULL,
"Price|Final Energy|Industry|Solids (US$2005/GJ)" = "FE|Industry|Solids (EJ/yr)"
)

# transport-specific mappings depending on realization
if (module2realisation["transport",2] == "complex") {
int2ext <- c(int2ext,
"Price|Final Energy|Transport|Liquids|HDV (US$2005/GJ)" = "FE|Transport|non-LDV|Liquids (EJ/yr)",
"Price|Final Energy|Transport|Liquids|LDV (US$2005/GJ)" = "FE|Transport|LDV|Liquids (EJ/yr)")
} else if (module2realisation["transport",2] == "edge_esm") {
if (module2realisation["transport",2] == "edge_esm") {
int2ext <- c(int2ext,
"Price|Final Energy|Transport|Liquids|HDV (US$2005/GJ)" = "FE|Transport|Diesel Liquids (EJ/yr)",
"Price|Final Energy|Transport|Liquids|LDV (US$2005/GJ)" = "FE|Transport|Pass|Liquids (EJ/yr)")
Expand Down
11 changes: 4 additions & 7 deletions R/reportTax.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ reportTax <- function(gdx,output=NULL,regionSubsetList=NULL,t=c(seq(2005,2060,5)
Industry = commonFinalEnergyVariables,
Transportation = c(
"Liquids|LDV" = "fepet",
"Liquids|non-LDV" = "fedie",
Gases = "fegat",
Hydrogen = "feh2t",
Electricity = "feelt"
Expand Down Expand Up @@ -151,12 +150,10 @@ reportTax <- function(gdx,output=NULL,regionSubsetList=NULL,t=c(seq(2005,2060,5)
# transportation liquids aggregations
out <- mbind(
out,
setNames(out[,,"Taxes|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Taxes|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"] , "Taxes|Final Energy|Transportation|Liquids (billion US$2005/yr)"),
setNames(out[,,"Subsidies|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Subsidies|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"], "Subsidies|Final Energy|Transportation|Liquids (billion US$2005/yr)"),
setNames((out[,,"Tax rate|Final Energy|Transportation|Liquids|LDV (US$2005/GJ)"]*out[,,"Taxes|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Tax rate|Final Energy|Transportation|Liquids|non-LDV (US$2005/GJ)"]*out[,,"Taxes|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"])/
(out[,,"Taxes|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Taxes|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"]) , "Tax rate|Final Energy|Transportation|Liquids (US$2005/GJ)"),
setNames((out[,,"Subsidy Rate|Final Energy|Transportation|Liquids|LDV (US$2005/GJ)"]*out[,,"Subsidies|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Subsidy Rate|Final Energy|Transportation|Liquids|non-LDV (US$2005/GJ)"]*out[,,"Subsidies|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"])/
(out[,,"Subsidies|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] + out[,,"Subsidies|Final Energy|Transportation|Liquids|non-LDV (billion US$2005/yr)"]) , "Subsidy Rate|Final Energy|Transportation|Liquids (US$2005/GJ)")
setNames(out[,,"Taxes|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] , "Taxes|Final Energy|Transportation|Liquids (billion US$2005/yr)"),
setNames(out[,,"Subsidies|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"] , "Subsidies|Final Energy|Transportation|Liquids (billion US$2005/yr)"),
setNames((out[,,"Tax rate|Final Energy|Transportation|Liquids|LDV (US$2005/GJ)"]*out[,,"Taxes|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"]) , "Tax rate|Final Energy|Transportation|Liquids (US$2005/GJ)"),
setNames((out[,,"Subsidy Rate|Final Energy|Transportation|Liquids|LDV (US$2005/GJ)"]*out[,,"Subsidies|Final Energy|Transportation|Liquids|LDV (billion US$2005/yr)"]) , "Subsidy Rate|Final Energy|Transportation|Liquids (US$2005/GJ)")
)

# total taxes/subsidies final energy
Expand Down
42 changes: 19 additions & 23 deletions inst/compareScenarios/cs_05_energy_demand.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ items_synliq <- c(
"FE|Transport|Pass|Road|Bus|Liquids|Hydrogen",
"FE|Transport|Freight|Rail|Liquids|Hydrogen",
"FE|Transport|Pass|Rail|Liquids|Hydrogen",
"FE|Transport|Pass|Aviation|Domestic|Liquids|Hydrogen",
"FE|Transport|Pass|Aviation|International|Liquids|Hydrogen",
"FE|Transport|Freight|International Shipping|Liquids|Hydrogen",
"FE|Transport|Pass|Domestic Aviation|Liquids|Hydrogen",
"FE|Transport|Bunkers|Pass|International Aviation|Liquids|Hydrogen",
"FE|Transport|Bunkers|Freight|International Shipping|Liquids|Hydrogen",
NULL
)

Expand All @@ -397,9 +397,9 @@ items_bioliq <- c(
"FE|Transport|Pass|Road|Bus|Liquids|Biomass",
"FE|Transport|Freight|Rail|Liquids|Biomass",
"FE|Transport|Pass|Rail|Liquids|Biomass",
"FE|Transport|Pass|Aviation|Domestic|Liquids|Biomass",
"FE|Transport|Pass|Aviation|International|Liquids|Biomass",
"FE|Transport|Freight|International Shipping|Liquids|Biomass",
"FE|Transport|Pass|Domestic Aviation|Liquids|Biomass",
"FE|Transport|Bunkers|Pass|International Aviation|Liquids|Biomass",
"FE|Transport|Bunkers|Freight|International Shipping|Liquids|Biomass",
NULL
)

Expand All @@ -424,21 +424,21 @@ showLinePlots(data, "FE|Transport|Electricity|Share")
### Basics -- w/o Bunkers

```{r Basics -- w/o Bunkers}
tot <- "FE|Transport|w/o Bunkers"
tot <- "FE|Transport"
items <- c(
"FE|Transport|w/o Bunkers|Electricity",
"FE|Transport|w/o Bunkers|Hydrogen",
"FE|Transport|w/o Bunkers|Gases",
"FE|Transport|w/o Bunkers|Liquids",
"FE|Transport|Electricity",
"FE|Transport|Hydrogen",
"FE|Transport|Gases",
"FE|Transport|Liquids",
NULL
)
items2 <- c(
"FE|Transport|w/o Bunkers|Electricity",
"FE|Transport|w/o Bunkers|Hydrogen",
"FE|Transport|w/o Bunkers|Gases",
"FE|Transport|w/o Bunkers|Liquids|Biomass",
"FE|Transport|w/o Bunkers|Liquids|Fossil",
"FE|Transport|w/o Bunkers|Liquids|Hydrogen",
"FE|Transport|Electricity",
"FE|Transport|Hydrogen",
"FE|Transport|Gases",
"FE|Transport|Liquids|Biomass",
"FE|Transport|Liquids|Fossil",
"FE|Transport|Liquids|Hydrogen",
NULL
)
```
Expand Down Expand Up @@ -470,10 +470,6 @@ items <- c(
"FE|Transport|LDV|Hydrogen",
"FE|Transport|LDV|Gases",
"FE|Transport|LDV|Liquids",
"FE|Transport|non-LDV|Electricity",
"FE|Transport|non-LDV|Hydrogen",
"FE|Transport|non-LDV|Gases",
"FE|Transport|non-LDV|Liquids",
NULL
)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
Expand All @@ -482,9 +478,9 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
### Bunkers

```{r FE Transport Bunkers}
tot <- "FE|Transport"
tot <- "FE|Transport with bunkers"
items <- c(
"FE|Transport|Bunkers",
"FE|Transport|w/o Bunkers")
"FE|Transport")
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```
89 changes: 34 additions & 55 deletions inst/compareScenarios/cs_06_energy_services.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ showMultiLinePlotsByVariable(data, items, "GDP|PPP pCap")
```{r ES Transport}
items <- c(
"ES|Transport|Pass pCap",
"ES|Transport|Pass|Road|LDV pCap",
"ES|Transport|Pass|non-LDV pCap")
"ES|Transport|Pass|Road|LDV pCap")
showMultiLinePlots(data, items)
showMultiLinePlotsByVariable(data, items, "GDP|PPP pCap")
```
Expand All @@ -169,7 +168,7 @@ items <- c(
"ES|Transport|Pass|Road|LDV|BEV pCap",
"ES|Transport|Pass|Road|LDV|FCEV pCap",
"ES|Transport|Pass|Road|LDV|Gases pCap",
"ES|Transport|Pass|Road|LDV|Hybrid Electric pCap",
"ES|Transport|Pass|Road|LDV|Hybrid electric pCap",
"ES|Transport|Pass|Road|LDV|Liquids pCap")
showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")
```
Expand All @@ -194,13 +193,13 @@ showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")

### LDV Vehicles Stock - EDGE-T
```{r LDV Vehicles Stock - EDGE-T}
tot <- "Stock|Transport|LDV"
tot <- "Stock|Transport|Pass|Road|LDV"
items <- c(
"Stock|Transport|LDV|BEV",
"Stock|Transport|LDV|Hybrid Electric",
"Stock|Transport|LDV|FCEV",
"Stock|Transport|LDV|NG",
"Stock|Transport|LDV|Liquids",
"Stock|Transport|Pass|Road|LDV|BEV",
"Stock|Transport|Pass|Road|LDV|Hybrid electric",
"Stock|Transport|Pass|Road|LDV|FCEV",
"Stock|Transport|Pass|Road|LDV|Gases",
"Stock|Transport|Pass|Road|LDV|Liquids",
NULL)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```
Expand All @@ -217,13 +216,13 @@ showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")

### LDV Vehicles Sales - EDGE-T
```{r LDV Vehicles Sales - EDGE-T}
tot <- "Sales|Transport|LDV"
tot <- "Sales|Transport|Pass|Road|LDV"
items <- c(
"Sales|Transport|LDV|BEV",
"Sales|Transport|LDV|Hybrid Electric",
"Sales|Transport|LDV|FCEV",
"Sales|Transport|LDV|NG",
"Sales|Transport|LDV|Liquids",
"Sales|Transport|Pass|Road|LDV|BEV",
"Sales|Transport|Pass|Road|LDV|Hybrid electric",
"Sales|Transport|Pass|Road|LDV|FCEV",
"Sales|Transport|Pass|Road|LDV|Gases",
"Sales|Transport|Pass|Road|LDV|Liquids",
NULL
)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
Expand All @@ -241,72 +240,52 @@ showAreaAndBarPlots(data, items, tot, scales = "fixed")

### Truck Stock - EDGE-T
```{r Truck Stock}
tot <- "Stock|Transport|Truck"
tot <- "Stock|Transport|Freight|Road"
items <- c(
"Stock|Transport|Truck|Electric",
"Stock|Transport|Truck|FCEV",
"Stock|Transport|Truck|NG",
"Stock|Transport|Truck|Liquids",
"Stock|Transport|Freight|Road|Electric",
"Stock|Transport|Freight|Road|FCEV",
"Stock|Transport|Freight|Road|Gases",
"Stock|Transport|Freight|Road|Liquids",
NULL)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### Truck Sales - EDGE-T
```{r Truck Sales}
tot <- "Sales|Transport|Truck"
tot <- "Sales|Transport|Freight|Road"
items <- c(
"Sales|Transport|Truck|Electric",
"Sales|Transport|Truck|FCEV",
"Sales|Transport|Truck|NG",
"Sales|Transport|Truck|Liquids",
"Sales|Transport|Freight|Road|Electric",
"Sales|Transport|Freight|Road|FCEV",
"Sales|Transport|Freight|Road|Gases",
"Sales|Transport|Freight|Road|Liquids",
NULL)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### Bus Stock - EDGE-T
```{r Bus Stock}
tot <- "Stock|Transport|Bus"
tot <- "Stock|Transport|Pass|Road|Bus"
items <- c(
"Stock|Transport|Bus|Electric",
"Stock|Transport|Bus|FCEV",
"Stock|Transport|Bus|NG",
"Stock|Transport|Bus|Liquids",
"Stock|Transport|Pass|Road|Bus|Electric",
"Stock|Transport|Pass|Road|Bus|FCEV",
"Stock|Transport|Pass|Road|Bus|Gases",
"Stock|Transport|Pass|Road|Bus|Liquids",
NULL)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### Bus Sales - EDGE-T
```{r Bus Sales}
tot <- "Sales|Transport|Bus"
tot <- "Sales|Transport|Pass|Road|Bus"
items <- c(
"Sales|Transport|Bus|Electric",
"Sales|Transport|Bus|FCEV",
"Sales|Transport|Bus|NG",
"Sales|Transport|Bus|Liquids",
"Sales|Transport|Pass|Road|Bus|Electric",
"Sales|Transport|Pass|Road|Bus|FCEV",
"Sales|Transport|Pass|Road|Bus|Gases",
"Sales|Transport|Pass|Road|Bus|Liquids",
NULL)
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### non-LDV Vehicles Stock - TransportComplex
```{r non-LDV Vehicles Stock}
tot <- "Services and Products|Transport|non-LDV|Stock|uedit"
items <- c(
"Services and Products|Transport|non-LDV|Stock|apCarDiT",
"Services and Products|Transport|non-LDV|Stock|apcarDiEffT",
"Services and Products|Transport|non-LDV|Stock|apcarDiEffH2T")
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

### non-LDV Vehicles Sales - TransportComplex
```{r non-LDV Vehicles Sales}
tot <- "Services and Products|Transport|non-LDV|Sales|uedit"
items <- c(
"Services and Products|Transport|non-LDV|Sales|apCarDiT",
"Services and Products|Transport|non-LDV|Sales|apcarDiEffT",
"Services and Products|Transport|non-LDV|Sales|apcarDiEffH2T")
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

## Industry Production
### Subsector Production
```{r plot industry subsector production}
Expand Down
Loading
Loading