Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -165,28 +165,28 @@ selection = col1.button('Movies')
|
|
165 |
col2.button('TV Series')
|
166 |
|
167 |
# Displaying charts in a customized layout based on selection
|
168 |
-
if
|
169 |
st.subheader('Movies')
|
170 |
-
st.
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
st.
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
|
181 |
-
|
182 |
st.subheader('TV Series')
|
183 |
-
st.
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
st.
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
165 |
col2.button('TV Series')
|
166 |
|
167 |
# Displaying charts in a customized layout based on selection
|
168 |
+
if selection_movies:
|
169 |
st.subheader('Movies')
|
170 |
+
col1_1, col1_2 = st.columns(2)
|
171 |
+
with col1_1:
|
172 |
+
st.plotly_chart(create_treemap(df_movies, 'Parental Guide - Movies'), use_container_width=True)
|
173 |
+
with col1_2:
|
174 |
+
st.plotly_chart(create_genre_bar_chart(df_movies, 'Top 10 Genres - Movies'), use_container_width=True)
|
175 |
+
col2_1, col2_2 = st.columns(2)
|
176 |
+
with col2_1:
|
177 |
+
st.plotly_chart(create_rating_box_chart(df_movies, 'Rating Distribution - Movies'), use_container_width=True)
|
178 |
+
with col2_2:
|
179 |
+
st.plotly_chart(create_country_map(df_movies, 'Global Distribution of Movies'), use_container_width=True)
|
180 |
|
181 |
+
elif selection_tv_series:
|
182 |
st.subheader('TV Series')
|
183 |
+
col1_1, col1_2 = st.columns(2)
|
184 |
+
with col1_1:
|
185 |
+
st.plotly_chart(create_treemap(df_tv_series, 'Parental Guide - TV Series'), use_container_width=True)
|
186 |
+
with col1_2:
|
187 |
+
st.plotly_chart(create_genre_bar_chart(df_tv_series, 'Top 10 Genres - TV Series'), use_container_width=True)
|
188 |
+
col2_1, col2_2 = st.columns(2)
|
189 |
+
with col2_1:
|
190 |
+
st.plotly_chart(create_rating_box_chart(df_tv_series, 'Rating Distribution - TV Series'), use_container_width=True)
|
191 |
+
with col2_2:
|
192 |
+
st.plotly_chart(create_country_map(df_tv_series, 'Global Distribution of TV Series'), use_container_width=True)
|