Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2020-06-12 17:53:43 +02:00
parent d9753a89fc
commit 8ab93bf13c

View File

@@ -2064,16 +2064,19 @@ def leaflet_chart(lat,lon,name=""):
def leaflet_chart_compare(course,workoutids,labeldict={},startenddict={}):
data = []
for id in workoutids:
w = Workout.objects.get(id=id)
rowdata = rdata(w.csvfilename)
time = rowdata.df['TimeStamp (sec)']
df = pd.DataFrame({
'workoutid':id,
'lat':rowdata.df[' latitude'],
'lon':rowdata.df[' longitude'],
'time':time-time[0],
})
data.append(df)
try:
w = Workout.objects.get(id=id)
rowdata = rdata(w.csvfilename)
time = rowdata.df['TimeStamp (sec)']
df = pd.DataFrame({
'workoutid':id,
'lat':rowdata.df[' latitude'],
'lon':rowdata.df[' longitude'],
'time':time-time[0],
})
data.append(df)
except Workout.DoesNotExist:
pass
df = pd.concat(data,axis=0)