Spaces:
Sleeping
Sleeping
one more time
Browse files
app.py
CHANGED
|
@@ -90,14 +90,18 @@ bar_chart = (
|
|
| 90 |
.mark_bar()
|
| 91 |
.encode(
|
| 92 |
y=alt.Y("Agency:N", sort="-x"),
|
| 93 |
-
x=alt.X("YTD Gross:Q", title="
|
| 94 |
-
tooltip=[
|
|
|
|
|
|
|
|
|
|
| 95 |
color=alt.condition(select_bar, alt.value("#4C78A8"), alt.value("#CCCCCC"))
|
| 96 |
)
|
| 97 |
.add_params(select_bar)
|
| 98 |
.properties(width=500, height=800)
|
| 99 |
)
|
| 100 |
|
|
|
|
| 101 |
box = (
|
| 102 |
alt.Chart(df_small)
|
| 103 |
.mark_boxplot(size=40)
|
|
|
|
| 90 |
.mark_bar()
|
| 91 |
.encode(
|
| 92 |
y=alt.Y("Agency:N", sort="-x"),
|
| 93 |
+
x=alt.X("mean(YTD Gross):Q", title="Average YTD Gross"), # <-- take the mean
|
| 94 |
+
tooltip=[
|
| 95 |
+
"Agency:N",
|
| 96 |
+
alt.Tooltip("mean(YTD Gross):Q", title="Avg YTD Gross", format="$,.0f")
|
| 97 |
+
],
|
| 98 |
color=alt.condition(select_bar, alt.value("#4C78A8"), alt.value("#CCCCCC"))
|
| 99 |
)
|
| 100 |
.add_params(select_bar)
|
| 101 |
.properties(width=500, height=800)
|
| 102 |
)
|
| 103 |
|
| 104 |
+
|
| 105 |
box = (
|
| 106 |
alt.Chart(df_small)
|
| 107 |
.mark_boxplot(size=40)
|