bugfix: include total heavy-duty road freight; do not treat total transport as other but including electricity
This commit is contained in:
parent
d09df8a473
commit
f25c594a07
@ -842,7 +842,7 @@ def rescale_idees_from_eurostat(
|
|||||||
"total": [
|
"total": [
|
||||||
"total agriculture heat",
|
"total agriculture heat",
|
||||||
"total agriculture machinery",
|
"total agriculture machinery",
|
||||||
"total agriculture", # = sum of all other agriculture categories
|
"total agriculture",
|
||||||
],
|
],
|
||||||
"elec": [
|
"elec": [
|
||||||
"total agriculture electricity",
|
"total agriculture electricity",
|
||||||
@ -850,10 +850,11 @@ def rescale_idees_from_eurostat(
|
|||||||
},
|
},
|
||||||
"Road": {
|
"Road": {
|
||||||
"total": [
|
"total": [
|
||||||
"total road", # = sum of all other road categories
|
"total road",
|
||||||
"total passenger cars",
|
"total passenger cars",
|
||||||
"total other road passenger",
|
"total other road passenger",
|
||||||
"total light duty road freight",
|
"total light duty road freight",
|
||||||
|
"total heavy duty road freight",
|
||||||
],
|
],
|
||||||
"elec": [
|
"elec": [
|
||||||
"electricity road",
|
"electricity road",
|
||||||
@ -941,31 +942,21 @@ def rescale_idees_from_eurostat(
|
|||||||
energy.loc[slicer_source, navigation].squeeze(axis=0),
|
energy.loc[slicer_source, navigation].squeeze(axis=0),
|
||||||
).values
|
).values
|
||||||
|
|
||||||
# set the total of agriculture/road to the sum of all agriculture/road categories (corresponding to the IDEES data)
|
# set the total of agriculture/road to the sum of all agriculture/road categories (corresponding to the IDEES data)
|
||||||
energy.loc[country, "total agriculture"] = energy.loc[
|
sel = [
|
||||||
country,
|
|
||||||
[
|
|
||||||
"total agriculture electricity",
|
"total agriculture electricity",
|
||||||
"total agriculture heat",
|
"total agriculture heat",
|
||||||
"total agriculture machinery",
|
"total agriculture machinery",
|
||||||
],
|
|
||||||
].sum(axis=1)
|
|
||||||
|
|
||||||
energy.loc[country, "total road"] = (
|
|
||||||
energy[
|
|
||||||
[
|
|
||||||
"total passenger cars",
|
|
||||||
"total other road passenger",
|
|
||||||
"total light duty road freight",
|
|
||||||
"electricity road",
|
|
||||||
"electricity passenger cars",
|
|
||||||
"electricity other road passenger",
|
|
||||||
"electricity light duty road freight",
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
.loc[country, :]
|
energy.loc[country, "total agriculture"] = energy.loc[country, sel].sum(axis=1)
|
||||||
.sum(axis=1)
|
|
||||||
)
|
sel = [
|
||||||
|
"total passenger cars",
|
||||||
|
"total other road passenger",
|
||||||
|
"total light duty road freight",
|
||||||
|
"total heavy duty road freight",
|
||||||
|
]
|
||||||
|
energy.loc[country, "total road"] = energy.loc[country, sel].sum(axis=1)
|
||||||
|
|
||||||
return energy
|
return energy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user