Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/adjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def adjuster_page():
url = 'https://www.notion.so/openclimatefix/Adjuster-cae707fbac0a440895f8aacec2a7b55c?pvs=4'
st.markdown(f'<a href="{url}" target="_blank">Link to Notion page</a>', unsafe_allow_html=True)

st.markdown("**Note:** Adjuster values are subtracted from the forecast. Positive adjuster values will reduce the forecast.")

connection = DatabaseConnection(url=os.environ["DB_URL"], echo=True)
with connection.get_session() as session:
# get all the models with adjust values
Expand Down Expand Up @@ -50,9 +52,19 @@ def adjuster_page():
index="time_of_day", columns="forecast_horizon_minutes", values="value"
)

# Define OCF colorscale using only bold colors for full range
colorscale = [
[0, '#4675c1'], # Bold blue (negative values)
[0.25, '#65b0c9'], # Bold cyan
[0.5, '#58b0a9'], # Bold teal (around zero)
Comment on lines +55 to +59
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The colorscale uses teal (#58b0a9) as the center color for zero values. In typical diverging colorscales centered at zero (like the RdBu scale suggested in issue #376), the center is usually a neutral color (white, gray, or light yellow) to clearly distinguish between positive and negative values. Using teal as the center color may make it harder to quickly identify zero or near-zero values at a glance. Consider using a more neutral color for the center point (position 0.5) to improve visual clarity.

Suggested change
# Define OCF colorscale using only bold colors for full range
colorscale = [
[0, '#4675c1'], # Bold blue (negative values)
[0.25, '#65b0c9'], # Bold cyan
[0.5, '#58b0a9'], # Bold teal (around zero)
# Define OCF colorscale using bold colors for extremes and a neutral center at zero
colorscale = [
[0, '#4675c1'], # Bold blue (negative values)
[0.25, '#65b0c9'], # Bold cyan
[0.5, '#ffffff'], # Neutral white (around zero)

Copilot uses AI. Check for mistakes.
[0.75, '#ffd480'], # Bold yellow-orange
[1, '#faa056'] # Bold orange (positive values)
]
Comment on lines +55 to +62
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions using 10 OCF colors (#4675c1, #65b0c9, #58b0a9, #ffd480, #faa056, #9cb6e1, #a3d6e0, #9ed1cd, #ffe9bc, #ffdabc), but the implementation only uses 5 of these colors. The last 5 colors appear to be lighter/pastel versions of the first 5. While using 5 colors for a diverging scale is reasonable, this discrepancy between the PR description and implementation should be clarified. If the intent was to use all 10 colors, the colorscale definition should be updated. If 5 colors is the correct approach, the PR description should be updated to reflect this.

Copilot uses AI. Check for mistakes.

fig = go.Figure(
data=go.Heatmap(
z=metric_values_df.values, x=metric_values_df.columns, y=metric_values_df.index
z=metric_values_df.values, x=metric_values_df.columns, y=metric_values_df.index,
colorscale=colorscale, zmid=0, zmin=-3500, zmax=3500
),
layout=go.Layout(
title=go.layout.Title(text=f"Adjuster Value for {model_name}"),
Expand Down