Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ max_year = int(taraf_s['Year'].max())
|
|
25 |
def plot_timeline(yaxis, citi = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], min_year = 0, max_year = 400):
|
26 |
if min_year >= max_year:
|
27 |
raise gr.error('Min Year Cannot be Bigger than Max Year!')
|
28 |
-
if citi
|
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:
|
|
|
25 |
def plot_timeline(yaxis, citi = ['المدينه', 'بغداد', 'كوفة', 'بصرة'], min_year = 0, max_year = 400):
|
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:
|