Oskar's SwingVision Data Model API
If you export the .xlsx file out of the SwingVision app on your phone, this trick allows you to analyze the data using a webpage. Now you can do some good graphs and take specific snippets from the video (still need to figure that out).

First you need to convert the .xlsx file into csv files you do it by running the python package, xlsx2csv, (need to install using pip) like so:
xlsx2csv -s 2 SwingVision-Ball_Machine_Practice-2023-02-12_at_22.46.02.xlsx shots_file.csv
Then you dump this script on a webserver that runs PHP, this php code converts the csv into a JSON type format and these functions are used to do the number crunching which is now easy enough to graph it up.

An example of this code is posted at: http://boxa.labbot3dsystems.com/tennisdata/data.org.php

If you like this show some love and use our referral code if you still haven't up for SwingVision:
https://swing.tennis/r/ee4778c442f60bcf>https://swing.tennis/r/ee4778c442f60bcf

https://swing.tennis/matches/sw2-Nwjhejk

Richard Rouse


Forehand

Speed (MPH)


Max speed data point
Array ( [Spin] => Flat [Speed (MPH)] => 58.636597 [Point] => 66 [Game] => 0 [Set] => 0 [Stroke] => Forehand [Bounce Depth] => no_mans_land [Bounce Zone] => deuce [Bounce Side] => near [Bounce (x)] => 1.777984 [Bounce (y)] => 3.398851 [Hit Depth] => out [Hit Zone] => deuce [Hit Side] => far [Hit (x)] => -1.599142 [Hit (y)] => 25.451632 [Hit (z)] => 0.584475 [Direction] => cross court [Result] => In [Favorited] => false [Start Time] => 20:09:57 [Video Time] => )

Shot direction

Result

Spin


Bounce Depth

Hit Depth

Bounce Zone

Hit Zone

Bounce Side

Hit Side




Backhand

Speed (MPH)


Max speed data point
Array ( [Spin] => Slice [Speed (MPH)] => 81.669533 [Point] => 7 [Game] => 0 [Set] => 0 [Stroke] => Backhand [Bounce Depth] => no_mans_land [Bounce Zone] => deuce_out [Bounce Side] => near [Bounce (x)] => 5.768352 [Bounce (y)] => 1.787643 [Hit Depth] => service_box [Hit Zone] => ad_alley [Hit Side] => far [Hit (x)] => 4.756084 [Hit (y)] => 15.651393 [Hit (z)] => 1.1653 [Direction] => down the line [Result] => Out [Favorited] => false [Start Time] => 19:50:26 [Video Time] => )

Shot direction

Result

Spin


Bounce Depth

Hit Depth

Bounce Zone

Hit Zone

Bounce Side

Hit Side




Serve

Speed (MPH)


Max speed data point
Array ( [Spin] => Flat [Speed (MPH)] => 82.497284 [Point] => 97 [Game] => 0 [Set] => 0 [Stroke] => Serve [Bounce Depth] => no_mans_land [Bounce Zone] => ad [Bounce Side] => far [Bounce (x)] => 1.172008 [Bounce (y)] => 18.935734 [Hit Depth] => service_box [Hit Zone] => ad [Hit Side] => near [Hit (x)] => -0.974898 [Hit (y)] => 0.348811 [Hit (z)] => 1.970417 [Direction] => down the T [Result] => Out [Favorited] => false [Start Time] => 20:18:41 [Video Time] => )

Shot direction

Result

Spin


Bounce Depth

Hit Depth

Bounce Zone

Hit Zone

Bounce Side

Hit Side




1

FH Volley

Speed (MPH)


Max speed data point
Array ( [Spin] => Flat [Speed (MPH)] => 23.382744 [Point] => 76 [Game] => 0 [Set] => 0 [Stroke] => FH Volley [Bounce Depth] => service_box [Bounce Zone] => deuce [Bounce Side] => near [Bounce (x)] => 0.599383 [Bounce (y)] => 7.041609 [Hit Depth] => no_mans_land [Hit Zone] => ad [Hit Side] => far [Hit (x)] => 0.756205 [Hit (y)] => 22.962885 [Hit (z)] => 0.35866 [Direction] => down the line [Result] => In [Favorited] => false [Start Time] => 20:12:42 [Video Time] => )

Shot direction

Result

Spin


Bounce Depth

Hit Depth

Bounce Zone

Hit Zone

Bounce Side

Hit Side




BH Volley

Speed (MPH)


Max speed data point
Array ( [Spin] => Flat [Speed (MPH)] => 24.248772 [Point] => 144 [Game] => 0 [Set] => 0 [Stroke] => BH Volley [Bounce Depth] => no_mans_land [Bounce Zone] => ad [Bounce Side] => far [Bounce (x)] => 1.505603 [Bounce (y)] => 18.997047 [Hit Depth] => service_box [Hit Zone] => ad [Hit Side] => near [Hit (x)] => -2.312498 [Hit (y)] => 7.181398 [Hit (z)] => 0.152337 [Direction] => cross court [Result] => In [Favorited] => false [Start Time] => 20:37:11 [Video Time] => )

Shot direction

Result

Spin


Bounce Depth

Hit Depth

Bounce Zone

Hit Zone

Bounce Side

Hit Side