Spaces:
Build error
Build error
Kaushik Rajan
commited on
Commit
·
5fbfec0
1
Parent(s):
4887fce
Simplify create_plots function: condense px.line calls to single lines for better readability
Browse files
app.py
CHANGED
|
@@ -351,19 +351,13 @@ def create_interface():
|
|
| 351 |
if df.empty:
|
| 352 |
return None, None, None
|
| 353 |
|
| 354 |
-
fig_ms = px.line(df, x="Quarter", y=["Player Market Share", "AI Market Share"],
|
| 355 |
-
title="Market Share (%)", markers=True,
|
| 356 |
-
color_discrete_map={"Player Market Share": "#3b82f6", "AI Market Share": "#ef4444"})
|
| 357 |
fig_ms.update_layout(yaxis_range=[0,100], legend_title_text='')
|
| 358 |
|
| 359 |
-
fig_b = px.line(df, x="Quarter", y=["Player Budget", "AI Budget"],
|
| 360 |
-
title="Budget ($)", markers=True,
|
| 361 |
-
color_discrete_map={"Player Budget": "#3b82f6", "AI Budget": "#ef4444"})
|
| 362 |
fig_b.update_layout(legend_title_text='')
|
| 363 |
|
| 364 |
-
fig_q = px.line(df, x="Quarter", y=["Player Product Quality", "AI Product Quality"],
|
| 365 |
-
title="Product Quality Index", markers=True,
|
| 366 |
-
color_discrete_map={"Player Product Quality": "#3b82f6", "AI Product Quality": "#ef4444"})
|
| 367 |
fig_q.update_layout(legend_title_text='')
|
| 368 |
|
| 369 |
return fig_ms, fig_b, fig_q
|
|
|
|
| 351 |
if df.empty:
|
| 352 |
return None, None, None
|
| 353 |
|
| 354 |
+
fig_ms = px.line(df, x="Quarter", y=["Player Market Share", "AI Market Share"], title="Market Share (%)", markers=True, color_discrete_map={"Player Market Share": "#3b82f6", "AI Market Share": "#ef4444"})
|
|
|
|
|
|
|
| 355 |
fig_ms.update_layout(yaxis_range=[0,100], legend_title_text='')
|
| 356 |
|
| 357 |
+
fig_b = px.line(df, x="Quarter", y=["Player Budget", "AI Budget"], title="Budget ($)", markers=True, color_discrete_map={"Player Budget": "#3b82f6", "AI Budget": "#ef4444"})
|
|
|
|
|
|
|
| 358 |
fig_b.update_layout(legend_title_text='')
|
| 359 |
|
| 360 |
+
fig_q = px.line(df, x="Quarter", y=["Player Product Quality", "AI Product Quality"], title="Product Quality Index", markers=True, color_discrete_map={"Player Product Quality": "#3b82f6", "AI Product Quality": "#ef4444"})
|
|
|
|
|
|
|
| 361 |
fig_q.update_layout(legend_title_text='')
|
| 362 |
|
| 363 |
return fig_ms, fig_b, fig_q
|