Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,18 +82,20 @@ df['Original Issue Year'] = df['Original Issue Date'].dt.year
|
|
| 82 |
# else:
|
| 83 |
# st.write("No data available for the 'License Status' plot.")
|
| 84 |
|
| 85 |
-
# Visualization:
|
| 86 |
-
st.subheader("License Status by State
|
| 87 |
-
|
| 88 |
x=alt.X('State:N', title='State'),
|
| 89 |
-
y=alt.Y('
|
| 90 |
-
color=alt.Color('
|
|
|
|
| 91 |
).properties(
|
| 92 |
width=600,
|
| 93 |
height=400,
|
| 94 |
-
title="License Status by State
|
| 95 |
)
|
| 96 |
-
st.altair_chart(
|
|
|
|
| 97 |
|
| 98 |
# Write-up for Visualization 1
|
| 99 |
st.write("""
|
|
|
|
| 82 |
# else:
|
| 83 |
# st.write("No data available for the 'License Status' plot.")
|
| 84 |
|
| 85 |
+
# Visualization: Heatmap
|
| 86 |
+
st.subheader("Heatmap of License Status by State")
|
| 87 |
+
chart_heatmap = alt.Chart(state_status_counts).mark_rect().encode(
|
| 88 |
x=alt.X('State:N', title='State'),
|
| 89 |
+
y=alt.Y('License Status:N', title='License Status'),
|
| 90 |
+
color=alt.Color('Count:Q', title='Number of Licenses', scale=alt.Scale(scheme='viridis')),
|
| 91 |
+
tooltip=['State', 'License Status', 'Count']
|
| 92 |
).properties(
|
| 93 |
width=600,
|
| 94 |
height=400,
|
| 95 |
+
title="Heatmap of License Status by State"
|
| 96 |
)
|
| 97 |
+
st.altair_chart(chart_heatmap)
|
| 98 |
+
|
| 99 |
|
| 100 |
# Write-up for Visualization 1
|
| 101 |
st.write("""
|