Nirmal16 commited on
Commit
ecef6b8
·
verified ·
1 Parent(s): b56c355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -14
app.py CHANGED
@@ -3,14 +3,6 @@ import altair as alt
3
  import pandas as pd
4
 
5
  st.title("Building Inventory Insights")
6
- st.caption("""
7
- This scatter plot visualizes the distribution of building size based on their acquisition year.
8
- Design choices:
9
- - X-axis displays the years acquired sorted in descending order.
10
- - Y-axis displays the square footage.
11
- This scatter plot visualizes the relationship between year-acquired and Square Footage of buildings,
12
- with Total Floors encoded as the size of the points.
13
- """)
14
 
15
  # Load Dataset
16
  @st.cache_data
@@ -67,16 +59,22 @@ bar_chart = (
67
  )
68
 
69
  # Combined Chart
70
- chart = alt.vconcat(scatter, bar_chart, title="Building Inventory Insights")
71
 
72
  # Tabs for Themes
73
  tab1, tab2 = st.tabs(["Streamlit Theme", "Altair Native Theme"])
74
 
75
  with tab1:
76
-
77
- st.altair_chart(chart, theme="streamlit", use_container_width=True)
78
-
79
- with tab2:
 
 
 
 
 
 
80
  st.caption("""
81
  This bar chart visualizes the distribution of Agency Name based on their acquisition year.
82
  Design choices:
@@ -85,4 +83,22 @@ with tab2:
85
  This bar chart visualizes which agency acquired the count of buildings in which Year.
86
  The Agency Name is taken as the ordinal value.
87
  """)
88
- st.altair_chart(chart, theme=None, use_container_width=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  import pandas as pd
4
 
5
  st.title("Building Inventory Insights")
 
 
 
 
 
 
 
 
6
 
7
  # Load Dataset
8
  @st.cache_data
 
59
  )
60
 
61
  # Combined Chart
62
+ chart = alt.vconcat(scatter, bar_chart,title="Building Inventory Insights")
63
 
64
  # Tabs for Themes
65
  tab1, tab2 = st.tabs(["Streamlit Theme", "Altair Native Theme"])
66
 
67
  with tab1:
68
+ st.altair_chart(scatter, theme="streamlit", use_container_width=True)
69
+ st.caption("""
70
+ This scatter plot visualizes the distribution of building size based on their acquisition year.
71
+ Design choices:
72
+ - X-axis displays the years acquired sorted in descending order.
73
+ - Y-axis displays the square footage.
74
+ This scatter plot visualizes the relationship between year-acquired and Square Footage of buildings,
75
+ with Total Floors encoded as the size of the points.
76
+ """)
77
+ st.altair_chart(bar_chart, theme="streamlit", use_container_width=True)
78
  st.caption("""
79
  This bar chart visualizes the distribution of Agency Name based on their acquisition year.
80
  Design choices:
 
83
  This bar chart visualizes which agency acquired the count of buildings in which Year.
84
  The Agency Name is taken as the ordinal value.
85
  """)
86
+ with tab2:
87
+ st.altair_chart(scatter, theme=None, use_container_width=True)
88
+ st.caption("""
89
+ This scatter plot visualizes the distribution of building size based on their acquisition year.
90
+ Design choices:
91
+ - X-axis displays the years acquired sorted in descending order.
92
+ - Y-axis displays the square footage.
93
+ This scatter plot visualizes the relationship between year-acquired and Square Footage of buildings,
94
+ with Total Floors encoded as the size of the points.
95
+ """)
96
+ st.altair_chart(bar_chart, theme="streamlit", use_container_width=True)
97
+ st.caption("""
98
+ This bar chart visualizes the distribution of Agency Name based on their acquisition year.
99
+ Design choices:
100
+ - X-axis displays the Agency Name.
101
+ - Y-axis displays the Year Acquired.
102
+ This bar chart visualizes which agency acquired the count of buildings in which Year.
103
+ The Agency Name is taken as the ordinal value.
104
+ """)