ralate2 commited on
Commit
acf8067
·
verified ·
1 Parent(s): 1266ec7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
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: Stacked Bar Chart
86
- st.subheader("License Status by State (Stacked)")
87
- chart_stacked = alt.Chart(state_status_counts).mark_bar().encode(
88
  x=alt.X('State:N', title='State'),
89
- y=alt.Y('Count:Q', title='Number of Licenses'),
90
- color=alt.Color('License Status:N', title='License Status', scale=alt.Scale(scheme='category20'))
 
91
  ).properties(
92
  width=600,
93
  height=400,
94
- title="License Status by State (Stacked)"
95
  )
96
- st.altair_chart(chart_stacked)
 
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("""