Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ country_df = get_country_data()
|
|
| 58 |
# st.write(country_df.head(10))
|
| 59 |
|
| 60 |
# Interactive selection tool initialization
|
| 61 |
-
selection = alt.selection_single(fields=['name'],
|
| 62 |
|
| 63 |
# World Map with Interactions
|
| 64 |
map_chart = alt.Chart(countries).mark_geoshape(
|
|
@@ -76,7 +76,7 @@ map_chart = alt.Chart(countries).mark_geoshape(
|
|
| 76 |
alt.value('lightgray')),
|
| 77 |
).properties(
|
| 78 |
width=900,
|
| 79 |
-
height=
|
| 80 |
).project('naturalEarth1').add_selection(selection)
|
| 81 |
|
| 82 |
|
|
@@ -101,7 +101,7 @@ if selection != 'none':
|
|
| 101 |
selection
|
| 102 |
).properties(
|
| 103 |
title=f'Total Contracts per Fiscal Year',
|
| 104 |
-
width=
|
| 105 |
height=300
|
| 106 |
)
|
| 107 |
final_chart = map_chart & line_plot
|
|
|
|
| 58 |
# st.write(country_df.head(10))
|
| 59 |
|
| 60 |
# Interactive selection tool initialization
|
| 61 |
+
selection = alt.selection_single(fields=['name'], empty='none')
|
| 62 |
|
| 63 |
# World Map with Interactions
|
| 64 |
map_chart = alt.Chart(countries).mark_geoshape(
|
|
|
|
| 76 |
alt.value('lightgray')),
|
| 77 |
).properties(
|
| 78 |
width=900,
|
| 79 |
+
height=400
|
| 80 |
).project('naturalEarth1').add_selection(selection)
|
| 81 |
|
| 82 |
|
|
|
|
| 101 |
selection
|
| 102 |
).properties(
|
| 103 |
title=f'Total Contracts per Fiscal Year',
|
| 104 |
+
width=400,
|
| 105 |
height=300
|
| 106 |
)
|
| 107 |
final_chart = map_chart & line_plot
|