Skip to content

Commit

Permalink
Delete power plants without capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Mar 4, 2021
1 parent 4ae8246 commit 91d5830
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/egon/data/processing/power_plants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def scale_prox2now(df, target, level='federal_state'):
df.loc[:,'Nettonennleistung'] = df.Nettonennleistung.apply(
lambda x: x/x.sum()).mul(target.values)

df = df[df.Nettonennleistung>0]

return df

def select_target(carrier, scenario):
Expand Down Expand Up @@ -130,7 +132,8 @@ def filter_mastr_geometry(mastr):
gpd.read_postgis(
f"SELECT geometry as geom FROM {cfg['sources']['geom_germany']}",
con = db.engine()).to_crs(4326),
mastr_loc, how='right').drop('index_left', axis=1)
mastr_loc,
how='right').query("index_left==0").drop('index_left', axis=1)

return mastr_loc

Expand Down

0 comments on commit 91d5830

Please sign in to comment.