IAMTFRMZA commited on
Commit
55531d4
·
verified ·
1 Parent(s): ca949c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -98,27 +98,27 @@ def show_map(date_str, rep):
98
  lat="Latitude", lon="Longitude",
99
  text=["End"], color_discrete_sequence=["red"]).data[0])
100
 
101
- fig.update_layout(mapbox_style="open-street-map", title=f"\U0001F4CD {rep}'s Route on {date_str}")
102
 
103
  table = subset[[
104
  'Visit Order', 'Dealership', 'Time', 'Time Diff (min)',
105
  'Interaction Type', 'Product'
106
  ]].rename(columns={
107
- 'Dealership': '\U0001F9ED Dealer',
108
- 'Time': '\U0001F552 Time',
109
- 'Time Diff (min)': '\u23F1\ufe0f Time Spent',
110
- 'Interaction Type': '\ud83d\udcde Interaction',
111
- 'Product': '\ud83d\udcbc Product Type'
112
  })
113
 
114
- total_time = round(table['⏱️ Time Spent'].sum(), 2)
115
  summary_row = pd.DataFrame([{
116
  'Visit Order': '',
117
- '🧭 Dealer': f"🧮 Total Time: {total_time} min",
118
- '🕒 Time': '',
119
- '⏱️ Time Spent': '',
120
- '📞 Interaction': '',
121
- '💼 Product Type': ''
122
  }])
123
  table = pd.concat([table, summary_row], ignore_index=True)
124
  return table, fig
 
98
  lat="Latitude", lon="Longitude",
99
  text=["End"], color_discrete_sequence=["red"]).data[0])
100
 
101
+ fig.update_layout(mapbox_style="open-street-map", title=f"{rep}'s Route on {date_str}")
102
 
103
  table = subset[[
104
  'Visit Order', 'Dealership', 'Time', 'Time Diff (min)',
105
  'Interaction Type', 'Product'
106
  ]].rename(columns={
107
+ 'Dealership': 'Dealer',
108
+ 'Time': 'Time',
109
+ 'Time Diff (min)': 'Time Spent (min)',
110
+ 'Interaction Type': 'Interaction',
111
+ 'Product': 'Product Type'
112
  })
113
 
114
+ total_time = round(table['Time Spent (min)'].sum(), 2)
115
  summary_row = pd.DataFrame([{
116
  'Visit Order': '',
117
+ 'Dealer': f"Total Time: {total_time} min",
118
+ 'Time': '',
119
+ 'Time Spent (min)': '',
120
+ 'Interaction': '',
121
+ 'Product Type': ''
122
  }])
123
  table = pd.concat([table, summary_row], ignore_index=True)
124
  return table, fig