awacke1 commited on
Commit
294c5f6
Β·
1 Parent(s): 2a2fe29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -1
app.py CHANGED
@@ -360,4 +360,46 @@ def ridgeline_plot():
360
  )
361
  st.altair_chart(chart)
362
 
363
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  )
361
  st.altair_chart(chart)
362
 
363
+ def create_sidebar():
364
+ chart_functions = {
365
+ 'Stacked Bar Chart with Text Overlay': stacked_bar_chart_with_text_overlay,
366
+ 'Bump Chart': bump_chart,
367
+ 'Radial Chart': radial_chart,
368
+ 'Trellis Area Sort Chart': trellis_area_sort_chart,
369
+ 'Wind Vector Map': wind_vector_map,
370
+ 'Table Bubble Plot': table_bubble_plot,
371
+ 'Locations of US Airports': locations_of_us_airports,
372
+ 'Connections Among U.S. Airports Interactive': connections_among_us_airports_interactive,
373
+ 'One Dot Per Zipcode': one_dot_per_zipcode,
374
+ 'Isotype Visualization with Emoji': isotype_visualization_with_emoji,
375
+ 'Binned Heatmap': binned_heatmap,
376
+ 'Facetted Scatterplot with Marginal Histograms': facetted_scatterplot_with_marginal_histograms,
377
+ 'Ridgeline Plot': ridgeline_plot
378
+ }
379
+
380
+ st.sidebar.title('Charts')
381
+
382
+ for chart_name, chart_function in chart_functions.items():
383
+ chart_button = st.sidebar.button(f'{chart_name} {emoji(chart_name)}')
384
+ if chart_button:
385
+ chart_function()
386
+
387
+ def emoji(chart_name):
388
+ emojis = {
389
+ 'Stacked Bar Chart with Text Overlay': 'πŸ“Š',
390
+ 'Bump Chart': 'πŸ“ˆ',
391
+ 'Radial Chart': '🎑',
392
+ 'Trellis Area Sort Chart': 'πŸ“‰',
393
+ 'Wind Vector Map': '🌬️',
394
+ 'Table Bubble Plot': 'πŸ’¬',
395
+ 'Locations of US Airports': '✈️',
396
+ 'Connections Among U.S. Airports Interactive': 'πŸ›«',
397
+ 'One Dot Per Zipcode': 'πŸ“',
398
+ 'Isotype Visualization with Emoji': 'πŸ˜€',
399
+ 'Binned Heatmap': 'πŸ—ΊοΈ',
400
+ 'Facetted Scatterplot with Marginal Histograms': 'πŸ”³',
401
+ 'Ridgeline Plot': 'πŸ”οΈ'
402
+ }
403
+ return emojis.get(chart_name, '')
404
+
405
+ create_sidebar()