Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2019-11-25 13:16:38 +01:00
4 changed files with 20 additions and 7 deletions
+11
View File
@@ -347,9 +347,20 @@ def summaryfromsplitdata(splitdata,data,filename,sep='|'):
timebased = False
for interval in splitdata:
try:
idist = interval['distance']
except KeyError:
idist = 0
try:
itime = interval['time']/10.
except KeyError:
itime = 0
try:
ipace = 500.*itime/idist
except (ZeroDivisionError,OverflowError):
ipace = 180.
try:
ispm = interval['stroke_rate']
except KeyError:
+2
View File
@@ -2051,6 +2051,8 @@ def read_df_sql(id):
if rowdata and len(rowdata.df):
data = dataprep(rowdata.df,id=id,bands=True,otwpower=True,barchart=True)
df = pd.read_parquet(f)
else:
df = pd.DataFrame()
df = df.fillna(value=0)
+1 -1
View File
@@ -729,7 +729,7 @@ def getsmallrowdata_db(columns,ids=[],debug=False):
try:
df = pd.read_parquet(csvfilenames[0],columns=columns,engine='pyarrow')
except (OSError,IndexError):
pass
df = pd.DataFrame()
return df
+3 -3
View File
@@ -3072,9 +3072,9 @@ attrs.update(strokedatafields)
# when the StrokeData are expanded.
# No Django Instances of this model are managed. Strokedata table is
# accesssed directly with SQL commands
StrokeData = type(str('StrokeData'), (models.Model,),
attrs
)
#StrokeData = type(str('StrokeData'), (models.Model,),
# attrs
# )
# Storing data for the OTW CP chart
class cpdata(models.Model):