Merge branch 'develop' into feature/fakturoid2
This commit is contained in:
@@ -177,7 +177,11 @@ columndict = {
|
|||||||
'cumdist': 'cum_dist',
|
'cumdist': 'cum_dist',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def remove_nulls_pl(data):
|
def remove_nulls_pl(data):
|
||||||
|
for c in data.columns:
|
||||||
|
if c=='hr':
|
||||||
|
dologging('remove_nulls.log',"HR data len {f}".format(f=len(data[c])))
|
||||||
data = data.lazy().with_columns(
|
data = data.lazy().with_columns(
|
||||||
pl.when(
|
pl.when(
|
||||||
pl.all().is_infinite()
|
pl.all().is_infinite()
|
||||||
@@ -198,6 +202,10 @@ def remove_nulls_pl(data):
|
|||||||
except: # pragma: no cover
|
except: # pragma: no cover
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
for c in data.columns:
|
||||||
|
if c=='hr':
|
||||||
|
dologging('remove_nulls.log',"HR data len {f}".format(f=len(data[c])))
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
@@ -249,8 +257,7 @@ def get_video_data(w, groups=['basic'], mode='water'):
|
|||||||
df2 = pd.concat([df2, coordinates], axis=1)
|
df2 = pd.concat([df2, coordinates], axis=1)
|
||||||
latitude = df2['latitude']
|
latitude = df2['latitude']
|
||||||
longitude = df2['longitude']
|
longitude = df2['longitude']
|
||||||
boatspeed = (100*df2['velo'].fillna(method='ffill')).astype(int)/100.
|
boatspeed = (100*df2['velo'].fillna(method='ffill').fillna(method='bfill')).astype(int)/100.
|
||||||
|
|
||||||
# bundle data
|
# bundle data
|
||||||
data = {
|
data = {
|
||||||
'boatspeed': boatspeed.values.tolist(),
|
'boatspeed': boatspeed.values.tolist(),
|
||||||
|
|||||||
Reference in New Issue
Block a user