eaglelandsonce commited on
Commit
425ebac
·
verified ·
1 Parent(s): 735670d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -8,11 +8,14 @@ st.write(df)
8
 
9
  year_options = df['year'].unique().tolist()
10
  year = st.selectbox("Which year would you like to see?", year_options, 0)
11
- df = df[df['year'] == year]
12
 
13
  fig = px.scatter(df, x="gdpPercap", y="lifeExp",
14
  size="pop", color="continent", hover_name="continent",
15
- log_x=True, size_max=55, range_x=[100,100000], range_y=[25,90])
 
 
 
16
 
17
  fig.update_layout(width=800)
18
 
 
8
 
9
  year_options = df['year'].unique().tolist()
10
  year = st.selectbox("Which year would you like to see?", year_options, 0)
11
+ #df = df[df['year'] == year]
12
 
13
  fig = px.scatter(df, x="gdpPercap", y="lifeExp",
14
  size="pop", color="continent", hover_name="continent",
15
+ log_x=True, size_max=55, range_x=[100,100000], range_y=[25,90],
16
+ animation_frame="year", animation_group="country")
17
+
18
+ )
19
 
20
  fig.update_layout(width=800)
21