FDSRashid commited on
Commit
a5afeb3
·
verified ·
1 Parent(s): d74f67f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -31,6 +31,7 @@ def plot_timeline(yaxis, citi = ['المدينه', 'بغداد', 'كوفة', 'ب
31
  tot = taraf_s.groupby(['Year']).sum().reset_index().drop(['Unnamed: 0', 'Ranking'], axis = 1)
32
  tot['City'] = 'All'
33
  filtered = pd.concat([filtered, tot])
 
34
  fig = px.line(data_frame = filtered, x = 'Year', y = yaxis, title = f"{yaxis} per Year", color = 'City', template = 'plotly_dark' )
35
  fig.update_layout(legend_x=1, legend_y=0, title = {'x':.5})
36
  return fig
 
31
  tot = taraf_s.groupby(['Year']).sum().reset_index().drop(['Unnamed: 0', 'Ranking'], axis = 1)
32
  tot['City'] = 'All'
33
  filtered = pd.concat([filtered, tot])
34
+ filtered = filtered[(filtered['Year'] >= min_year) & (filtered['Year'] <= max_year)]
35
  fig = px.line(data_frame = filtered, x = 'Year', y = yaxis, title = f"{yaxis} per Year", color = 'City', template = 'plotly_dark' )
36
  fig.update_layout(legend_x=1, legend_y=0, title = {'x':.5})
37
  return fig