Skip to content

Commit

Permalink
Add result calculating code
Browse files Browse the repository at this point in the history
  • Loading branch information
staadecker committed Jan 28, 2023
1 parent f88bc3e commit 41c970c
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,32 @@
# %% night time drop
df = daily_lmp[["Midnight", "8pm", "4am"]].mean(axis=1)
(1 - df.loc[3] / df.iloc[0]) * 100 / ((3 - 1.94) * 10)
# %% LMP stats
raw_load_balance.nunique()
raw_load_balance
# %% Variability baseline
baseline = raw_load_balance[raw_load_balance.scenario_name == 1.94]
len(baseline[baseline.value == 0]) / len(baseline) * 100 # Percent at 0 LMP
len(baseline[baseline.value > 40]) / len(baseline)
# %% Variability 20twh
df = raw_load_balance[raw_load_balance.scenario_name == 20]
df.value.quantile(.99)
len(df[df.value == 0]) / len(df)
df.value.median()
# %% Regional NORTH
df = raw_load_balance[raw_load_balance.region.isin(["CAN", "OR", "WA"])]
df.groupby("scenario_name").value.mean()
# %% Regional CA
df = raw_load_balance[raw_load_balance.region == "CA"]
df = df.groupby("scenario_name").value.mean()
df
-(1 - df / df.iloc[0]) * 100
# %% Regional SOUTH
df = raw_load_balance[raw_load_balance.region.isin(["MEX", "AZ", "NV", "NM"])]
df = df.groupby("scenario_name").value.mean()
df
# %% MONTHLY
cap
cap.loc[20, :]
df = cap.loc[64, :].sort_values(ascending=False)
df

0 comments on commit 41c970c

Please sign in to comment.