diff --git a/rowers/dataprep.py b/rowers/dataprep.py index c2863531..3f9734e7 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -194,7 +194,10 @@ def get_video_data(w,groups=['basic'],mode='water'): for c in columns: if c != 'time': - data[c] = df2[c].values.tolist() + if dict(rowingmetrics)[c]['numtype'] == 'integer': + data[c] = df2[c].astype(int).tolist() + else: + data[c] = df2[c].values.tolist() metrics[c] = { 'name': dict(rowingmetrics)[c]['verbose_name'], 'metric': c, diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 5224ea7a..46ae99da 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -2954,8 +2954,6 @@ def interactive_chart_video(videodata): spm = videodata['spm'] time = range(len(spm)) - - data = zip(time,spm) data2 = [] @@ -2985,7 +2983,27 @@ def interactive_chart_video(videodata): var myChart = new Chart(ctx, { type: 'scatter', - label: 'pace', + label: 'SPM', + animationSteps: 10, + options: { + legend: { + display: false, + }, + scales: { + yAxes: [{ + scaleLabel: { + display: true, + labelString: 'Stroke Rate' + } + }], + xAxes: [{ + scaleLabel: { + display: true, + labelString: 'Time (seconds)' + } + }], + } + }, data: { datasets: [ @@ -3004,6 +3022,7 @@ def interactive_chart_video(videodata): }, }); + var marker = { datapoint: %s , setLatLng: function (LatLng) { diff --git a/rowers/templates/embedded_video.html b/rowers/templates/embedded_video.html index d02a9de2..9922bdd7 100644 --- a/rowers/templates/embedded_video.html +++ b/rowers/templates/embedded_video.html @@ -74,12 +74,17 @@
  • Paste link to you tube video below

    Use the slider to locate start point for video on workout map

    -

    Playing the video will advance the data in synchonization. Use the regular youtube controls +

    Playing the video will advance the data in synchonization. Use the regular YouTube + controls to move around in the video and play it.

    You can make manual adjustments to the delay to fine tune the alignment. Once you are finished, check "Lock Video and Data" to lock the video and the data.

    Once you are happy with the alignment, you can save the analysis, and share with other people.

  • + {% else %} +
  • +

    Playing the video will advance the data in synchronization. Use the regular + YouTube controls to move around in the video and play it.

    {% endif %}
  • @@ -206,6 +211,10 @@
  • Lock Data and Video
  • + {% else %} +
  • + +
  • {% endif %}
  • Data Time @@ -271,6 +280,8 @@ {{ metricsform.as_table }}
  • + {% else %} + {% endif %}
  • {% if analysis and user.is_authenticated and user == rower.user %}