dylanplummer commited on
Commit
b3d7da6
·
1 Parent(s): 25e57be

minor fixes

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -137,6 +137,7 @@ def full_report():
137
  template="plotly_dark")
138
 
139
  avg.update_layout(showlegend=False)
 
140
 
141
  country_df['rank'] = country_df['jumps'].rank(ascending=False)
142
  total_map = px.choropleth(country_df, locations="iso",
@@ -168,7 +169,6 @@ def full_report():
168
  df = df.groupby(['day', 'continent']).sum().reset_index()
169
  df = df.sort_values(by=['day'])
170
  df['total_jumps'] = df.groupby('continent')['jumps'].cumsum()
171
- print(df)
172
  # fill in any missing days with current max value
173
  for day in range(1, df['day'].max() + 1):
174
  for continent in df['continent'].unique():
@@ -204,9 +204,9 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
204
  with gr.Row():
205
  jumps_over_time = gr.Plot(label="Jumps Over Time")
206
  with gr.Row():
207
- total_plot = gr.Plot(label="Total Jumps")
208
  with gr.Row():
209
- avg_plot = gr.Plot(label="Average Jumps per Day")
210
 
211
  outputs = [total_jumps_label, total_plot, avg_plot, map_fig, jumps_over_time, county_map, per_day_plot]
212
  dep = demo.load(full_report, None, outputs)
 
137
  template="plotly_dark")
138
 
139
  avg.update_layout(showlegend=False)
140
+ avg.update(layout_coloraxis_showscale=False)
141
 
142
  country_df['rank'] = country_df['jumps'].rank(ascending=False)
143
  total_map = px.choropleth(country_df, locations="iso",
 
169
  df = df.groupby(['day', 'continent']).sum().reset_index()
170
  df = df.sort_values(by=['day'])
171
  df['total_jumps'] = df.groupby('continent')['jumps'].cumsum()
 
172
  # fill in any missing days with current max value
173
  for day in range(1, df['day'].max() + 1):
174
  for continent in df['continent'].unique():
 
204
  with gr.Row():
205
  jumps_over_time = gr.Plot(label="Jumps Over Time")
206
  with gr.Row():
207
+ total_plot = gr.Plot(label="Top 10 Countries")
208
  with gr.Row():
209
+ avg_plot = gr.Plot(label="Top 10 Cities")
210
 
211
  outputs = [total_jumps_label, total_plot, avg_plot, map_fig, jumps_over_time, county_map, per_day_plot]
212
  dep = demo.load(full_report, None, outputs)