Commit
·
e54556a
1
Parent(s):
3d6fc0d
More small fixes.
Browse files
app.py
CHANGED
|
@@ -170,15 +170,12 @@ def compute_summary(entries: List[Dict[str, Any]]):
|
|
| 170 |
return labels, props, counts, total
|
| 171 |
|
| 172 |
def summary_plot(entries: List[Dict[str, Any]]):
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
ax.tick_params(axis='x', rotation=20)
|
| 180 |
-
fig.tight_layout()
|
| 181 |
-
return fig
|
| 182 |
|
| 183 |
# ---------- Rendering ----------
|
| 184 |
|
|
|
|
| 170 |
return labels, props, counts, total
|
| 171 |
|
| 172 |
def summary_plot(entries: List[Dict[str, Any]]):
|
| 173 |
+
# Returns Markdown with proportions per trait under the current Name filter
|
| 174 |
+
labels, props, counts, total = compute_summary(entries)
|
| 175 |
+
lines = ["## 📊 Summary (Name filter)", f"**Total:** {total}"]
|
| 176 |
+
for label, p in zip(labels, props):
|
| 177 |
+
lines.append(f"- {label}: {p:.2f}")
|
| 178 |
+
return "\n".join(lines)
|
|
|
|
|
|
|
|
|
|
| 179 |
|
| 180 |
# ---------- Rendering ----------
|
| 181 |
|