Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +6 -0
src/streamlit_app.py
CHANGED
|
@@ -270,6 +270,12 @@ fig.update_layout(
|
|
| 270 |
st.plotly_chart(fig, use_container_width=True)
|
| 271 |
|
| 272 |
# Prepare source/target/value lists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 273 |
grouped = tm.copy()
|
| 274 |
regions = list(grouped["RegionName"].unique())
|
| 275 |
crimes = list(grouped["crm_cd_desc"].unique())
|
|
|
|
| 270 |
st.plotly_chart(fig, use_container_width=True)
|
| 271 |
|
| 272 |
# Prepare source/target/value lists
|
| 273 |
+
tm = (
|
| 274 |
+
df
|
| 275 |
+
.groupby(["RegionName","crm_cd_desc"])
|
| 276 |
+
.size()
|
| 277 |
+
.reset_index(name="Count")
|
| 278 |
+
)
|
| 279 |
grouped = tm.copy()
|
| 280 |
regions = list(grouped["RegionName"].unique())
|
| 281 |
crimes = list(grouped["crm_cd_desc"].unique())
|