-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prescriptor select #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated readme to reflect new project structure
@@ -32,7 +31,7 @@ | |||
app.title = "Climate Change Decision Making" | |||
|
|||
context_component.register_callbacks(app) | |||
parallel_component.register_callbacks(app) | |||
filter_component.register_callbacks(app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced parallel coordinates component with new filter component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created some classes we can re-use between components
Starts by plotting "other" so that it's the bottom of the z axis. | ||
Then plots selected candidates in color. | ||
Finally plots the baseline on top. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved parallel coordinates code into filter.py
html.Div( | ||
dbc.Accordion( | ||
dbc.AccordionItem(dcc.Graph(id="parcoords-figure"), title="View Parallel Coordinates"), | ||
start_collapsed=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hide parallel coordinates in accordion dropdown
), | ||
dbc.Col( | ||
dbc.Button( | ||
"Explore & Fine-Tune Policy in En-ROADS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big fancy button to open En-ROADS to draw user in
|
||
if "baseline" in cand_idxs: | ||
baseline_outcomes_df = outcomes_dfs[-1] | ||
baseline_outcomes_df["year"] = list(range(1990, 2101)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer can toggle baseline nor other
@@ -13,6 +13,27 @@ | |||
from evolution.outcomes.outcome_manager import OutcomeManager | |||
|
|||
|
|||
def filter_metrics_json(metrics_json: dict[str, list], | |||
metric_ranges: list[tuple[float, float]], | |||
normalize=False) -> pd.DataFrame: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this function into utils so it can be used in filtering too.
outcomes_dfs: list[pd.DataFrame]) -> pd.DataFrame: | ||
""" | ||
Takes parallel lists of context_actions_dicts and outcomes_dfs and processes them into a metrics dict. | ||
All of these metrics dicts are then concatenated into a single DataFrame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice for filtering
Created a nice, interactive way to filter out prescriptors to acquire desired behavior.
Refactored page to be nicer formatted via. bootstrap.