FDSRashid commited on
Commit
4489131
·
verified ·
1 Parent(s): feb71b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ def plot_timeline(yaxis, citi = ['المدينه', 'بغداد', 'كوفة', 'ب
26
  if min_year >= max_year:
27
  raise gr.error('Min Year Cannot be Bigger than Max Year!')
28
  if citi == ['All']:
29
- filtered = taraf_s.copy()[(taraf_s['Year'] >= min_year) & (taraf_s['Year'] <= max_year)].groupby(['Year']).sum()
30
  fig = px.line(data_frame = filtered, x = 'Year', y = yaxis, title = f"{yaxis} per Year", color = 'City', template = 'plotly_dark' )
31
  else:
32
  filtered = taraf_s[taraf_s['City'].isin(citi) & (taraf_s['Year'] >= min_year) & (taraf_s['Year'] <= max_year)]
 
26
  if min_year >= max_year:
27
  raise gr.error('Min Year Cannot be Bigger than Max Year!')
28
  if citi == ['All']:
29
+ filtered = taraf_s.copy()[(taraf_s['Year'] >= min_year) & (taraf_s['Year'] <= max_year)].groupby(['Year']).sum().reset_index()
30
  fig = px.line(data_frame = filtered, x = 'Year', y = yaxis, title = f"{yaxis} per Year", color = 'City', template = 'plotly_dark' )
31
  else:
32
  filtered = taraf_s[taraf_s['City'].isin(citi) & (taraf_s['Year'] >= min_year) & (taraf_s['Year'] <= max_year)]