importing strava data without time
This commit is contained in:
@@ -18,6 +18,7 @@ workouttypes = (
|
||||
('c-boat','Dutch C boat'),
|
||||
('churchboat','Finnish Church boat'),
|
||||
('Ride','Ride'),
|
||||
('Bike','Bike'),
|
||||
('Run','Run'),
|
||||
('NordicSki','NordicSki'),
|
||||
('Swim','Swim'),
|
||||
@@ -31,6 +32,7 @@ workouttypes = (
|
||||
('InlineSkate','InlineSkate'),
|
||||
('Kayaking','Kayaking'),
|
||||
('Workout','Workout'),
|
||||
('Yoga','Yoga'),
|
||||
('other','Other'),
|
||||
)
|
||||
|
||||
@@ -60,6 +62,7 @@ stravamapping = collections.OrderedDict({
|
||||
'InlineSkate':'InlineSkate',
|
||||
'Kayaking':'Kayaking',
|
||||
'Workout':'Workout',
|
||||
'Yoga':'Yoga',
|
||||
'other':'Workout',
|
||||
|
||||
})
|
||||
@@ -91,6 +94,7 @@ stmapping = collections.OrderedDict({
|
||||
'InlineSkate':'Skating:InlineSkate',
|
||||
'Kayaking':'Other:Kayaking',
|
||||
'Workout':'Other:Workout',
|
||||
'Yoga':'Other',
|
||||
'other':'Other',
|
||||
|
||||
})
|
||||
@@ -122,7 +126,7 @@ rkmapping = collections.OrderedDict({
|
||||
'Kayaking':'Other',
|
||||
'Workout':'Other',
|
||||
'other':'Other',
|
||||
|
||||
'Yoga':'Other',
|
||||
})
|
||||
|
||||
polarmapping = collections.OrderedDict({
|
||||
@@ -152,7 +156,7 @@ polarmapping = collections.OrderedDict({
|
||||
'Kayaking':'Kayaking',
|
||||
'Workout':'Other Indoor',
|
||||
'other':'Other Indoor',
|
||||
|
||||
'Yoga':'Yoga',
|
||||
})
|
||||
|
||||
tpmapping = collections.OrderedDict({
|
||||
@@ -182,7 +186,7 @@ tpmapping = collections.OrderedDict({
|
||||
'Kayaking':'other',
|
||||
'Workout':'other',
|
||||
'other':'other',
|
||||
|
||||
'Yoga':'other',
|
||||
})
|
||||
|
||||
c2mapping = collections.OrderedDict({
|
||||
@@ -212,6 +216,7 @@ c2mapping = collections.OrderedDict({
|
||||
'Kayaking':None,
|
||||
'Workout':None,
|
||||
'other':None,
|
||||
'Yoga':None,
|
||||
|
||||
})
|
||||
|
||||
|
||||
@@ -319,7 +319,11 @@ def get_workout(user,stravaid):
|
||||
if t is not None:
|
||||
nr_rows = len(t)
|
||||
else:
|
||||
return(0,"Error: Time data wasnt found")
|
||||
duration = int(workoutsummary['elapsed_time'])
|
||||
t = pd.Series(range(duration+1))
|
||||
|
||||
nr_rows = len(t)
|
||||
|
||||
|
||||
if nr_rows == 0:
|
||||
return (0,"Error: Time data had zero length")
|
||||
|
||||
@@ -1075,10 +1075,10 @@ class WorkoutStatsTestNew(TestCase):
|
||||
workouts = self.user_workouts
|
||||
|
||||
script, div = boxplotdata(workouts,options)
|
||||
script, div = trendflexdata(workouts,options)
|
||||
# script, div = trendflexdata(workouts,options)
|
||||
# script, div = histodata(workouts,options)
|
||||
# script, div = flexalldata(workouts,options)
|
||||
# script, div = statsdata(workouts,options)
|
||||
script, div = flexalldata(workouts,options)
|
||||
script, div = statsdata(workouts,options)
|
||||
script, div = comparisondata(workouts,options)
|
||||
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user