Private
Public Access
1
0

started with StrokeData POST

This commit is contained in:
Sander Roosendaal
2016-11-25 15:27:46 +01:00
parent 44b2145f2f
commit af3396cfee
4 changed files with 27 additions and 5 deletions

View File

@@ -135,16 +135,18 @@ def getrowdata(id=0):
return rowdata,row
def prepmultipledata(ids):
def prepmultipledata(ids,verbose=False):
query = sa.text('SELECT DISTINCT workoutid FROM strokedata')
with engine.connect() as conn, conn.begin():
res = conn.execute(query)
res = list(itertools.chain.from_iterable(res.fetchall()))
res = list(set(ids)-set(res))
print "aap", res
for id in res:
rowdata,row = getrowdata(id=id)
if verbose:
print id
if rowdata:
data = dataprep(rowdata.df,id=id,bands=True,barchart=True,otwpower=True)
return res