[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d0f2d52853
commit
b8dee184a9
@ -350,7 +350,9 @@ rule add_electricity:
|
|||||||
hydro_capacities=ancient("data/bundle/hydro_capacities.csv"),
|
hydro_capacities=ancient("data/bundle/hydro_capacities.csv"),
|
||||||
geth_hydro_capacities="data/geth2015_hydro_capacities.csv",
|
geth_hydro_capacities="data/geth2015_hydro_capacities.csv",
|
||||||
unit_commitment="data/unit_commitment.csv",
|
unit_commitment="data/unit_commitment.csv",
|
||||||
fuel_price=RESOURCES + "monthly_fuel_price.csv" if config["conventional"]["dynamic_fuel_price"] else [],
|
fuel_price=RESOURCES + "monthly_fuel_price.csv"
|
||||||
|
if config["conventional"]["dynamic_fuel_price"]
|
||||||
|
else [],
|
||||||
load=RESOURCES + "load.csv",
|
load=RESOURCES + "load.csv",
|
||||||
nuts3_shapes=RESOURCES + "nuts3_shapes.geojson",
|
nuts3_shapes=RESOURCES + "nuts3_shapes.geojson",
|
||||||
output:
|
output:
|
||||||
|
@ -117,15 +117,19 @@ if config["enable"]["retrieve"] and config["enable"].get(
|
|||||||
]
|
]
|
||||||
|
|
||||||
datafolders = [
|
datafolders = [
|
||||||
protected(directory("data/bundle-sector/eurostat-energy_balances-june_2016_edition")),
|
protected(
|
||||||
protected(directory("data/bundle-sector/eurostat-energy_balances-may_2018_edition")),
|
directory("data/bundle-sector/eurostat-energy_balances-june_2016_edition")
|
||||||
|
),
|
||||||
|
protected(
|
||||||
|
directory("data/bundle-sector/eurostat-energy_balances-may_2018_edition")
|
||||||
|
),
|
||||||
protected(directory("data/bundle-sector/jrc-idees-2015")),
|
protected(directory("data/bundle-sector/jrc-idees-2015")),
|
||||||
]
|
]
|
||||||
|
|
||||||
rule retrieve_sector_databundle:
|
rule retrieve_sector_databundle:
|
||||||
output:
|
output:
|
||||||
protected(expand("data/bundle-sector/{files}", files=datafiles)),
|
protected(expand("data/bundle-sector/{files}", files=datafiles)),
|
||||||
*datafolders
|
*datafolders,
|
||||||
log:
|
log:
|
||||||
LOGS + "retrieve_sector_databundle.log",
|
LOGS + "retrieve_sector_databundle.log",
|
||||||
retries: 2
|
retries: 2
|
||||||
@ -147,7 +151,9 @@ if config["enable"]["retrieve"] and (
|
|||||||
|
|
||||||
rule retrieve_gas_infrastructure_data:
|
rule retrieve_gas_infrastructure_data:
|
||||||
output:
|
output:
|
||||||
protected(expand("data/gas_network/scigrid-gas/data/{files}", files=datafiles)),
|
protected(
|
||||||
|
expand("data/gas_network/scigrid-gas/data/{files}", files=datafiles)
|
||||||
|
),
|
||||||
log:
|
log:
|
||||||
LOGS + "retrieve_gas_infrastructure_data.log",
|
LOGS + "retrieve_gas_infrastructure_data.log",
|
||||||
retries: 2
|
retries: 2
|
||||||
|
@ -447,8 +447,11 @@ def add_heating_capacities_installed_before_baseyear(
|
|||||||
)
|
)
|
||||||
# if rural heating demand for one of the nodes doesn't exist,
|
# if rural heating demand for one of the nodes doesn't exist,
|
||||||
# then columns were dropped before and heating demand share should be 0.0
|
# then columns were dropped before and heating demand share should be 0.0
|
||||||
if all(f"{node} {service} rural heat" in p_set_sum.index for service in ["residential", "services"])
|
if all(
|
||||||
else 0.
|
f"{node} {service} rural heat" in p_set_sum.index
|
||||||
|
for service in ["residential", "services"]
|
||||||
|
)
|
||||||
|
else 0.0
|
||||||
for node in nodal_df.index
|
for node in nodal_df.index
|
||||||
],
|
],
|
||||||
index=nodal_df.index,
|
index=nodal_df.index,
|
||||||
|
@ -13,13 +13,14 @@ logger = logging.getLogger(__name__)
|
|||||||
import uuid
|
import uuid
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
|
import country_converter as coco
|
||||||
import geopandas as gpd
|
import geopandas as gpd
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from packaging.version import Version, parse
|
from packaging.version import Version, parse
|
||||||
|
|
||||||
import country_converter as coco
|
|
||||||
cc = coco.CountryConverter()
|
cc = coco.CountryConverter()
|
||||||
|
|
||||||
|
|
||||||
def locate_missing_industrial_sites(df):
|
def locate_missing_industrial_sites(df):
|
||||||
"""
|
"""
|
||||||
Locate industrial sites without valid locations based on city and
|
Locate industrial sites without valid locations based on city and
|
||||||
|
Loading…
Reference in New Issue
Block a user