cboettig commited on
Commit
898bb75
·
1 Parent(s): 8bd32d3

tidy columns

Browse files
Files changed (1) hide show
  1. app.py +28 -19
app.py CHANGED
@@ -68,7 +68,7 @@ def bar_chart(df, x, y):
68
  x=x,
69
  y=y,
70
  color=alt.Color('color').scale(None)
71
- ).properties(width="container", height=200)
72
  return chart
73
 
74
 
@@ -375,24 +375,33 @@ with main:
375
  human_impact = bar_chart(df, column, 'human_impact')
376
 
377
  with stats_col:
378
- col1, col2, col3 = st.columns(3)
379
- with col1:
380
- f"{total_percent}% Continental US Covered"
381
- st.altair_chart(area_chart, use_container_width=False)
382
- "Carbon Lost ('02-'22)"
383
- st.altair_chart(carbon_lost, use_container_width=True)
384
-
385
- with col2:
386
- "Species Richness"
387
- st.altair_chart(richness_chart, use_container_width=True)
388
- "Crop expansion"
389
- st.altair_chart(crop_expansion, use_container_width=True)
390
-
391
- with col3:
392
- "Range-Size Rarity"
393
- st.altair_chart(rsr_chart, use_container_width=True)
394
- "Human Impact"
395
- st.altair_chart(human_impact, use_container_width=True)
 
 
 
 
 
 
 
 
 
396
 
397
 
398
  st.divider()
 
68
  x=x,
69
  y=y,
70
  color=alt.Color('color').scale(None)
71
+ ).properties(width="container", height=300)
72
  return chart
73
 
74
 
 
375
  human_impact = bar_chart(df, column, 'human_impact')
376
 
377
  with stats_col:
378
+ with st.container():
379
+ col1, col2, col3 = st.columns(3)
380
+ with col1:
381
+ f"{total_percent}% Continental US Covered"
382
+ st.altair_chart(area_chart, use_container_width=False)
383
+
384
+ with col2:
385
+ "Species Richness"
386
+ st.altair_chart(richness_chart, use_container_width=True)
387
+
388
+ with col3:
389
+ "Range-Size Rarity"
390
+ st.altair_chart(rsr_chart, use_container_width=True)
391
+
392
+ with st.container():
393
+ col1b, col2b, col3b = st.columns(3)
394
+ with col1b:
395
+ "Carbon Lost ('02-'22)"
396
+ st.altair_chart(carbon_lost, use_container_width=True)
397
+
398
+ with col2b:
399
+ "Crop expansion"
400
+ st.altair_chart(crop_expansion, use_container_width=True)
401
+
402
+ with col3b:
403
+ "Human Impact"
404
+ st.altair_chart(human_impact, use_container_width=True)
405
 
406
 
407
  st.divider()