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

Drop duplicate entries from AL_production.csv data used in build_industry_demand #1143

Merged
merged 10 commits into from
Oct 29, 2024
226 changes: 0 additions & 226 deletions data/AL_production.csv
Original file line number Diff line number Diff line change
Expand Up @@ -30,229 +30,3 @@ SK,212,2019,https://en.wikipedia.org/wiki/List_of_countries_by_aluminium_product
GR,184,2019,https://en.wikipedia.org/wiki/List_of_countries_by_aluminium_production
SE,126,2019,https://en.wikipedia.org/wiki/List_of_countries_by_aluminium_production
VE,108,2019,https://en.wikipedia.org/wiki/List_of_countries_by_aluminium_production
NG,0,2019,no available information online assumed value of 0
BJ,0,2019,no available information online assumed value of 0
AF,0,2019,no available information online assumed value of 0
AL,0,2019,no available information online assumed value of 0
DZ,0,2019,no available information online assumed value of 0
AS,0,2019,no available information online assumed value of 0
AD,0,2019,no available information online assumed value of 0
AO,0,2019,no available information online assumed value of 0
AI,0,2019,no available information online assumed value of 0
AQ,0,2019,no available information online assumed value of 0
AG,0,2019,no available information online assumed value of 0
AM,0,2019,no available information online assumed value of 0
AW,0,2019,no available information online assumed value of 0
AT,0,2019,no available information online assumed value of 0
AZ,0,2019,no available information online assumed value of 0
BS,0,2019,no available information online assumed value of 0
BD,0,2019,no available information online assumed value of 0
BB,0,2019,no available information online assumed value of 0
BY,0,2019,no available information online assumed value of 0
BE,0,2019,no available information online assumed value of 0
BZ,0,2019,no available information online assumed value of 0
BM,0,2019,no available information online assumed value of 0
BT,0,2019,no available information online assumed value of 0
BO,0,2019,no available information online assumed value of 0
BA,0,2019,no available information online assumed value of 0
BW,0,2019,no available information online assumed value of 0
BV,0,2019,no available information online assumed value of 0
IO,0,2019,no available information online assumed value of 0
BN,0,2019,no available information online assumed value of 0
BG,0,2019,no available information online assumed value of 0
BF,0,2019,no available information online assumed value of 0
BI,0,2019,no available information online assumed value of 0
CV,0,2019,no available information online assumed value of 0
KH,0,2019,no available information online assumed value of 0
CM,0,2019,no available information online assumed value of 0
KY,0,2019,no available information online assumed value of 0
CF,0,2019,no available information online assumed value of 0
TD,0,2019,no available information online assumed value of 0
CL,0,2019,no available information online assumed value of 0
CX,0,2019,no available information online assumed value of 0
CC,0,2019,no available information online assumed value of 0
CO,0,2019,no available information online assumed value of 0
KM,0,2019,no available information online assumed value of 0
CG,0,2019,no available information online assumed value of 0
CD,0,2019,no available information online assumed value of 0
CK,0,2019,no available information online assumed value of 0
CR,0,2019,no available information online assumed value of 0
CI,0,2019,no available information online assumed value of 0
HR,0,2019,no available information online assumed value of 0
CU,0,2019,no available information online assumed value of 0
CW,0,2019,no available information online assumed value of 0
CY,0,2019,no available information online assumed value of 0
CZ,0,2019,no available information online assumed value of 0
DK,0,2019,no available information online assumed value of 0
DJ,0,2019,no available information online assumed value of 0
DM,0,2019,no available information online assumed value of 0
DO,0,2019,no available information online assumed value of 0
EC,0,2019,no available information online assumed value of 0
SV,0,2019,no available information online assumed value of 0
GQ,0,2019,no available information online assumed value of 0
ER,0,2019,no available information online assumed value of 0
EE,0,2019,no available information online assumed value of 0
SZ,0,2019,no available information online assumed value of 0
ET,0,2019,no available information online assumed value of 0
FK,0,2019,no available information online assumed value of 0
FO,0,2019,no available information online assumed value of 0
FJ,0,2019,no available information online assumed value of 0
FI,0,2019,no available information online assumed value of 0
GF,0,2019,no available information online assumed value of 0
PF,0,2019,no available information online assumed value of 0
TF,0,2019,no available information online assumed value of 0
GA,0,2019,no available information online assumed value of 0
GM,0,2019,no available information online assumed value of 0
GE,0,2019,no available information online assumed value of 0
GH,0,2019,no available information online assumed value of 0
GI,0,2019,no available information online assumed value of 0
GL,0,2019,no available information online assumed value of 0
GD,0,2019,no available information online assumed value of 0
GP,0,2019,no available information online assumed value of 0
GU,0,2019,no available information online assumed value of 0
GT,0,2019,no available information online assumed value of 0
GG,0,2019,no available information online assumed value of 0
GN,0,2019,no available information online assumed value of 0
GW,0,2019,no available information online assumed value of 0
GY,0,2019,no available information online assumed value of 0
HT,0,2019,no available information online assumed value of 0
HM,0,2019,no available information online assumed value of 0
VA,0,2019,no available information online assumed value of 0
HN,0,2019,no available information online assumed value of 0
HK,0,2019,no available information online assumed value of 0
HU,0,2019,no available information online assumed value of 0
IM,0,2019,no available information online assumed value of 0
IL,0,2019,no available information online assumed value of 0
IT,0,2019,no available information online assumed value of 0
JM,0,2019,no available information online assumed value of 0
JP,0,2019,no available information online assumed value of 0
JE,0,2019,no available information online assumed value of 0
JO,0,2019,no available information online assumed value of 0
KE,0,2019,no available information online assumed value of 0
KI,0,2019,no available information online assumed value of 0
KP,0,2019,no available information online assumed value of 0
KW,0,2019,no available information online assumed value of 0
KG,0,2019,no available information online assumed value of 0
LA,0,2019,no available information online assumed value of 0
LV,0,2019,no available information online assumed value of 0
LB,0,2019,no available information online assumed value of 0
LS,0,2019,no available information online assumed value of 0
LR,0,2019,no available information online assumed value of 0
LY,0,2019,no available information online assumed value of 0
LI,0,2019,no available information online assumed value of 0
LT,0,2019,no available information online assumed value of 0
LU,0,2019,no available information online assumed value of 0
MO,0,2019,no available information online assumed value of 0
MG,0,2019,no available information online assumed value of 0
MW,0,2019,no available information online assumed value of 0
MV,0,2019,no available information online assumed value of 0
ML,0,2019,no available information online assumed value of 0
MT,0,2019,no available information online assumed value of 0
MH,0,2019,no available information online assumed value of 0
MQ,0,2019,no available information online assumed value of 0
MR,0,2019,no available information online assumed value of 0
MU,0,2019,no available information online assumed value of 0
YT,0,2019,no available information online assumed value of 0
MX,0,2019,no available information online assumed value of 0
FM,0,2019,no available information online assumed value of 0
MD,0,2019,no available information online assumed value of 0
MC,0,2019,no available information online assumed value of 0
MN,0,2019,no available information online assumed value of 0
ME,0,2019,no available information online assumed value of 0
MS,0,2019,no available information online assumed value of 0
MA,0,2019,no available information online assumed value of 0
MM,0,2019,no available information online assumed value of 0
PW,0,2019,no available information online assumed value of 0
NA,0,2019,no available information online assumed value of 0
NR,0,2019,no available information online assumed value of 0
NP,0,2019,no available information online assumed value of 0
NL,0,2019,no available information online assumed value of 0
NC,0,2019,no available information online assumed value of 0
NZ,0,2019,no available information online assumed value of 0
NI,0,2019,no available information online assumed value of 0
NE,0,2019,no available information online assumed value of 0
NU,0,2019,no available information online assumed value of 0
NF,0,2019,no available information online assumed value of 0
MP,0,2019,no available information online assumed value of 0
NO,0,2019,no available information online assumed value of 0
OM,0,2019,no available information online assumed value of 0
PK,0,2019,no available information online assumed value of 0
PS,0,2019,no available information online assumed value of 0
PA,0,2019,no available information online assumed value of 0
PG,0,2019,no available information online assumed value of 0
PY,0,2019,no available information online assumed value of 0
PE,0,2019,no available information online assumed value of 0
PH,0,2019,no available information online assumed value of 0
PN,0,2019,no available information online assumed value of 0
PL,0,2019,no available information online assumed value of 0
PT,0,2019,no available information online assumed value of 0
PR,0,2019,no available information online assumed value of 0
QA,0,2019,no available information online assumed value of 0
MK,0,2019,no available information online assumed value of 0
RO,0,2019,no available information online assumed value of 0
RU,0,2019,no available information online assumed value of 0
RW,0,2019,no available information online assumed value of 0
RE,0,2019,no available information online assumed value of 0
BL,0,2019,no available information online assumed value of 0
SH,0,2019,no available information online assumed value of 0
KN,0,2019,no available information online assumed value of 0
LC,0,2019,no available information online assumed value of 0
MF,0,2019,no available information online assumed value of 0
PM,0,2019,no available information online assumed value of 0
VC,0,2019,no available information online assumed value of 0
WS,0,2019,no available information online assumed value of 0
SM,0,2019,no available information online assumed value of 0
ST,0,2019,no available information online assumed value of 0
SA,0,2019,no available information online assumed value of 0
SN,0,2019,no available information online assumed value of 0
RS,0,2019,no available information online assumed value of 0
SC,0,2019,no available information online assumed value of 0
SL,0,2019,no available information online assumed value of 0
SG,0,2019,no available information online assumed value of 0
SX,0,2019,no available information online assumed value of 0
SK,0,2019,no available information online assumed value of 0
SI,0,2019,no available information online assumed value of 0
SB,0,2019,no available information online assumed value of 0
SO,0,2019,no available information online assumed value of 0
ZA,0,2019,no available information online assumed value of 0
GS,0,2019,no available information online assumed value of 0
SS,0,2019,no available information online assumed value of 0
ES,0,2019,no available information online assumed value of 0
LK,0,2019,no available information online assumed value of 0
SD,0,2019,no available information online assumed value of 0
SR,0,2019,no available information online assumed value of 0
SJ,0,2019,no available information online assumed value of 0
SE,0,2019,no available information online assumed value of 0
CH,0,2019,no available information online assumed value of 0
SY,0,2019,no available information online assumed value of 0
TW,0,2019,no available information online assumed value of 0
TJ,0,2019,no available information online assumed value of 0
TZ,0,2019,no available information online assumed value of 0
TH,0,2019,no available information online assumed value of 0
TL,0,2019,no available information online assumed value of 0
TG,0,2019,no available information online assumed value of 0
TK,0,2019,no available information online assumed value of 0
TO,0,2019,no available information online assumed value of 0
TT,0,2019,no available information online assumed value of 0
TN,0,2019,no available information online assumed value of 0
TR,0,2019,no available information online assumed value of 0
TM,0,2019,no available information online assumed value of 0
TC,0,2019,no available information online assumed value of 0
TV,0,2019,no available information online assumed value of 0
UG,0,2019,no available information online assumed value of 0
UA,0,2019,no available information online assumed value of 0
GB,0,2019,no available information online assumed value of 0
US,0,2019,no available information online assumed value of 0
UM,0,2019,no available information online assumed value of 0
UY,0,2019,no available information online assumed value of 0
UZ,0,2019,no available information online assumed value of 0
VU,0,2019,no available information online assumed value of 0
VE,0,2019,no available information online assumed value of 0
VN,0,2019,no available information online assumed value of 0
VG,0,2019,no available information online assumed value of 0
VI,0,2019,no available information online assumed value of 0
WF,0,2019,no available information online assumed value of 0
EH,0,2019,no available information online assumed value of 0
YE,0,2019,no available information online assumed value of 0
ZM,0,2019,no available information online assumed value of 0
ZW,0,2019,no available information online assumed value of 0
3 changes: 3 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ E.g. if a new rule becomes available describe how to use it `make test` and in o

* Include a dedicated cutout for Oceania in bundle_config.yaml `PR #1157 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1157>`_

* Drop duplicate entries in `AL_production.csv` data used in `build_industry_demand` rule `PR #1143 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1143>`_


PyPSA-Earth 0.4.1
=================

Expand Down
14 changes: 13 additions & 1 deletion scripts/build_industry_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,21 @@ def match_technology(df):

aluminium_year = snakemake.params.aluminium_year
AL = read_csv_nafix("data/AL_production.csv", index_col=0)
# Filter data for the given year and countries
AL_prod_tom = AL.query("Year == @aluminium_year and index in @countries_geo")[
"production[ktons/a]"
].reindex(countries_geo, fill_value=0.0)
]

# Check if aluminum data is missing for any countries
for country in countries_geo:
if country not in AL_prod_tom.index:
_logger.warning(
f"No aluminum production data found for {country}. Filled with 0.0."
)

# Reindex and fill missing values with 0.0
AL_prod_tom = AL_prod_tom.reindex(countries_geo, fill_value=0.0)

AL_emissions = AL_prod_tom * emission_factors["non-ferrous metals"]

Steel_emissions = (
Expand Down
Loading