Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|