diff --git a/premise/data_collection.py b/premise/data_collection.py index 92b6eaa8..d7b46969 100644 --- a/premise/data_collection.py +++ b/premise/data_collection.py @@ -713,11 +713,10 @@ def __get_iam_data( x.lower() if isinstance(x, str) else x for x in dataframe.columns ] - #print(dataframe["variable"].unique()) + # print(dataframe["variable"].unique()) dataframe = dataframe.loc[dataframe["variable"].isin(variables)] - dataframe = dataframe.rename(columns={"variable": "variables"}) # make a list of headers that are integer diff --git a/premise/electricity.py b/premise/electricity.py index 59755d75..9a7526a9 100644 --- a/premise/electricity.py +++ b/premise/electricity.py @@ -1658,24 +1658,34 @@ def create_region_specific_power_plants(self): "Gas CHP CCS", "Gas CC CCS", "Oil CC CCS", - #"Oil ST", - #"Oil CC", + # "Oil ST", + # "Oil CC", "Coal CF 80-20", "Coal CF 50-50", "Storage, Flow Battery", - "Storage, Hydrogen" + "Storage, Hydrogen", ] - list_datasets_to_duplicate = list(set([ - dataset["name"] - for dataset in self.database - if dataset["name"] - in [y for k, v in self.powerplant_map.items() - for y in v - if k in techs] - ])) + list_datasets_to_duplicate = list( + set( + [ + dataset["name"] + for dataset in self.database + if dataset["name"] + in [ + y + for k, v in self.powerplant_map.items() + for y in v + if k in techs + ] + ] + ) + ) - list_datasets_to_duplicate.insert(0,"hydrogen storage, for grid-balancing",) + list_datasets_to_duplicate.insert( + 0, + "hydrogen storage, for grid-balancing", + ) list_datasets_to_duplicate.extend( [ @@ -1695,7 +1705,6 @@ def create_region_specific_power_plants(self): *[ws.contains("name", name) for name in list_datasets_to_duplicate] ), ): - new_plants = self.fetch_proxies( name=dataset["name"], ref_prod=dataset["reference product"], diff --git a/premise/steel.py b/premise/steel.py index 76151aa6..f9e31554 100644 --- a/premise/steel.py +++ b/premise/steel.py @@ -228,10 +228,10 @@ def create_steel_markets(self): / self.iam_data.production_volumes.sel( variables=["steel - primary", "steel - secondary"], region=[ - x - for x in self.iam_data.production_volumes.region.values - if x != "World" - ], + x + for x in self.iam_data.production_volumes.region.values + if x != "World" + ], ) .interp(year=self.year) .sum(dim=["variables", "region"])