From e0dbae7b2a39dbc9dd555f79e30af095180c78f8 Mon Sep 17 00:00:00 2001 From: PerryXDeng Date: Fri, 29 Mar 2019 18:48:31 -0400 Subject: [PATCH] few lines --- .gitignore | 3 +++ data_preparation/data/thisFolderContainsRawData | 1 + data_preparation/first_rows/games.csv | 1 + data_preparation/first_rows/gps.csv | 1 + data_preparation/first_rows/rpe.csv | 1 + data_preparation/first_rows/wellness.csv | 1 + data_preparation/printFirstFewRows.py | 6 ++++++ 7 files changed, 14 insertions(+) create mode 100644 data_preparation/data/thisFolderContainsRawData create mode 100644 data_preparation/first_rows/games.csv create mode 100644 data_preparation/first_rows/gps.csv create mode 100644 data_preparation/first_rows/rpe.csv create mode 100644 data_preparation/first_rows/wellness.csv create mode 100644 data_preparation/printFirstFewRows.py diff --git a/.gitignore b/.gitignore index 4e3d8bc..800aa6a 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,6 @@ vignettes/*.pdf # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html rsconnect/ + +# datafest +data_preparation/data/*.csv diff --git a/data_preparation/data/thisFolderContainsRawData b/data_preparation/data/thisFolderContainsRawData new file mode 100644 index 0000000..74afb3a --- /dev/null +++ b/data_preparation/data/thisFolderContainsRawData @@ -0,0 +1 @@ +do not add anything here to git diff --git a/data_preparation/first_rows/games.csv b/data_preparation/first_rows/games.csv new file mode 100644 index 0000000..86a4a06 --- /dev/null +++ b/data_preparation/first_rows/games.csv @@ -0,0 +1 @@ +['\ufeffGameID,Date,Tournament,TournamentGame,Team,Opponent,Outcome,TeamPoints,TeamPointsAllowed\n', '1,2017-11-30,Dubai,1,Canada,Spain,W,19,0\n', '2,2017-11-30,Dubai,2,Canada,Ireland,W,31,0\n', '3,2017-11-30,Dubai,3,Canada,Fiji,W,31,14\n', '4,2017-12-01,Dubai,4,Canada,France,W,24,19\n', '5,2017-12-01,Dubai,5,Canada,Australia,L,7,25\n', '6,2017-12-01,Dubai,6,Canada,Russia,L,5,10\n', '7,2018-01-26,Sydney,1,Canada,Fiji,W,24,12\n', '8,2018-01-26,Sydney,2,Canada,Ireland,W,24,12\n', '9,2018-01-26,Sydney,3,Canada,Russia,W,19,5\n', '10,2018-01-27,Sydney,4,Canada,France,W,28,12\n', '11,2018-01-27,Sydney,5,Canada,New Zealand,L,0,26\n', '12,2018-01-28,Sydney,6,Canada,Russia,W,40,12\n', '13,2018-04-13,Commonwealth,1,Canada,South Africa,W,29,0\n', '14,2018-04-13,Commonwealth,2,Canada,Kenya,W,24,12\n', '15,2018-04-14,Commonwealth,3,Canada,New Zealand,L,7,24\n', '16,2018-04-15,Commonwealth,4,Canada,Australia,L,7,33\n', '17,2018-04-15,Commonwealth,5,Canada,England,L,19,24\n', '18,2018-04-21,Kitakyushu,1,Canada,Fiji,W,38,14\n', '19,2018-04-21,Kitakyushu,2,Canada,England,L,19,21\n'] diff --git a/data_preparation/first_rows/gps.csv b/data_preparation/first_rows/gps.csv new file mode 100644 index 0000000..8ccbca3 --- /dev/null +++ b/data_preparation/first_rows/gps.csv @@ -0,0 +1 @@ +['GameID,Half,PlayerID,FrameID,Time,GameClock,Speed,AccelImpulse,AccelLoad,AccelX,AccelY,AccelZ,Longitude,Latitude\n', '1,1,2,1,00:22:01,00:00:00,0.65833386,0.6111116,0.005330055775340482,0.1325,0.69875,0.565,55.466666,24.99487317\n', '1,1,2,2,00:22:01,00:00:00,0.59444492,0.6388894,0.0065681174768838745,0.11125,0.9199999999999999,0.70625,55.46666633,24.99487367\n', '1,1,2,3,00:22:01,00:00:00,0.36388918,2.3055574,0.003114314124166962,0.01375,0.77,0.6775,55.46666683,24.99487383\n', '1,1,2,4,00:22:01,00:00:00,0.4444448,0.80555619999999994,0.0026018184905968666,0.00625,0.88625,0.595,55.46666717,24.99487417\n', '1,1,2,5,00:22:01,00:00:00,0.40000032,0.4444448,0.0038131387595548402,-0.017499999999999998,0.8575,0.57375,55.46666783,24.994874\n', '1,1,2,6,00:22:01,00:00:00,0,4.0000032,0.0030357852445959373,-0.06375,0.9037499999999999,0.55125,55.46666817,24.99487417\n', '1,1,2,7,00:22:01,00:00:00,0,0,0.004433123674069088,-0.06875,1.0175,0.45375,55.4666685,24.994874\n', '1,1,2,8,00:22:01,00:00:00,0,0,0.00541869611211891,-0.0975,1.08625,0.365,55.466669,24.994874\n', '1,1,2,9,00:22:01,00:00:00,0,0,0.005841307840687845,-0.13,0.8887499999999999,0.53625,55.46666917,24.99487383\n', '1,1,2,10,00:22:02,00:00:01,0,0,0.007464539226093879,-0.1775,0.8525,0.58875,55.46666917,24.99487383\n', '1,1,2,11,00:22:02,00:00:01,0,0,0.005548698158773078,-0.16749999999999998,0.9087500000000001,0.5525,55.46666917,24.99487367\n', '1,1,2,12,00:22:02,00:00:01,0,0,0.006430762460071173,-0.10875,0.9137500000000001,0.55875,55.46666933,24.99487333\n', '1,1,2,13,00:22:02,00:00:01,0.39722254,3.9722254,0.00507912007908566,-0.05875,0.86375,0.5925,55.46666933,24.99487267\n', '1,1,2,14,00:22:02,00:00:01,0.37222252,0.2500002,0.00404378877347331,-0.01375,0.84375,0.60375,55.4666695,24.99487217\n', '1,1,2,15,00:22:02,00:00:01,0.34166694,0.3055558,0.0015182830462427488,0.057499999999999996,0.895,0.6112500000000001,55.46666933,24.994872\n', '1,1,2,16,00:22:02,00:00:01,0.37222252,0.3055558,0.002377113995150987,0.0825,0.87875,0.5925,55.46666917,24.99487183\n', '1,1,2,17,00:22:02,00:00:01,0,3.7222252,0.003826218867270637,0.12625,0.84,0.61625,55.46666917,24.99487167\n', '1,1,2,18,00:22:02,00:00:01,0,0,0.004909086745507464,0.07625,0.9400000000000001,0.58,55.46666917,24.99487167\n', '1,1,2,19,00:22:02,00:00:01,0,0,0.0065297404465723494,-0.011250000000000001,0.8625,0.605,55.4666695,24.99487183\n'] diff --git a/data_preparation/first_rows/rpe.csv b/data_preparation/first_rows/rpe.csv new file mode 100644 index 0000000..f665b00 --- /dev/null +++ b/data_preparation/first_rows/rpe.csv @@ -0,0 +1 @@ +['Date,PlayerID,Training,SessionType,Duration,RPE,SessionLoad,DailyLoad,AcuteLoad,ChronicLoad,AcuteChronicRatio,ObjectiveRating,FocusRating,BestOutOfMyself\n', '2018-07-21,13,Yes,Mobility/Recovery,5,0,0,446,323.1,303.25,1.07,NA,NA,Not at all\n', '2018-07-21,13,Yes,Game,29,7,203,NA,NA,NA,NA,NA,NA,Not at all\n', '2018-07-21,13,Yes,Game,27,9,243,NA,NA,NA,NA,NA,NA,Not at all\n', '2018-07-20,11,Yes,Game,36,6,216,534,256.3,344.18,0.74,9,10,Absolutely\n', '2018-07-20,11,Yes,Game,36,8,288,NA,NA,NA,NA,9,10,Absolutely\n', '2018-07-20,11,Yes,Mobility/Recovery,15,2,30,NA,NA,NA,NA,9,10,Absolutely\n', '2018-07-20,13,Yes,Game,27,6,162,306,259.4,287.32,0.9,NA,NA,Not at all\n', '2018-07-20,13,Yes,Game,24,6,144,NA,NA,NA,NA,NA,NA,Not at all\n', '2018-07-20,13,Yes,Mobility/Recovery,10,0,0,NA,NA,NA,NA,NA,NA,Not at all\n', '2018-07-19,1,Yes,Skills,60,3,180,180,87.9,140.54,0.63,NA,NA,NA\n', '2018-07-19,2,Yes,Skills,60,4,240,240,117.1,279.96,0.42,NA,NA,NA\n', '2018-07-19,6,Yes,Conditioning,20,9,180,380,107.1,301.54,0.36,8,8,NA\n', '2018-07-19,6,Yes,Strength,30,4,120,NA,NA,NA,NA,8,8,NA\n', '2018-07-19,6,Yes,Combat,20,4,80,NA,NA,NA,NA,8,8,NA\n', '2018-07-19,7,Yes,Skills,60,5,300,300,141.4,342.32,0.41,NA,NA,NA\n', '2018-07-19,10,Yes,Skills,75,4,300,300,122.1,250,0.49,NA,NA,NA\n', '2018-07-19,11,Yes,Skills,90,5,450,450,180,325.11,0.55,9,9,Absolutely\n', '2018-07-19,13,Yes,Skills,90,6,540,540,215.7,276.39,0.78,NA,NA,Not at all\n', '2018-07-19,13,Yes,Mobility/Recovery,30,0,0,NA,NA,NA,NA,NA,NA,Not at all\n'] diff --git a/data_preparation/first_rows/wellness.csv b/data_preparation/first_rows/wellness.csv new file mode 100644 index 0000000..bb8b919 --- /dev/null +++ b/data_preparation/first_rows/wellness.csv @@ -0,0 +1 @@ +['Date,PlayerID,Fatigue,Soreness,Desire,Irritability,BedTime,WakeTime,SleepHours,SleepQuality,MonitoringScore,Pain,Illness,Menstruation,Nutrition,NutritionAdjustment,USGMeasurement,USG,TrainingReadiness\n', '2018-07-21,1,3,3,2,3,23:00:00,07:00:00,8,2,13,No,No,Yes,Excellent,Yes,No,NA,0%\n', '2018-07-21,2,4,3,4,4,23:00:00,07:00:00,8,4,19,Yes,No,Yes,NA,NA,Yes,1.01,0%\n', '2018-07-21,3,3,3,5,4,22:30:00,06:30:00,8,4,19,No,No,No,NA,NA,Yes,1.016,100%\n', '2018-07-21,4,2,3,5,4,00:30:00,07:00:00,6.5,1,15,No,No,Yes,Excellent,Yes,Yes,1.025,95%\n', '2018-07-21,5,5,3,4,4,23:45:00,07:00:00,7.25,4,20,No,No,No,Okay,Yes,Yes,1.022,100%\n', '2018-07-21,7,2,2,5,4,22:00:00,07:00:00,9,3,16,No,No,No,Excellent,Yes,Yes,1.014,95%\n', '2018-07-21,10,2,2,4,4,22:30:00,05:45:00,7.25,3,15,No,Slightly Off,No,Excellent,Yes,Yes,1.017,70%\n', '2018-07-21,11,4,3,6,4,23:00:00,07:00:00,8,3,20,No,Slightly Off,No,Excellent,Yes,Yes,1.013,100%\n', '2018-07-21,13,4,3,5,4,23:15:00,07:15:00,8,4,20,No,No,No,Excellent,Yes,Yes,1.025,100%\n', '2018-07-21,14,3,3,4,4,22:15:00,07:00:00,8.75,4,18,No,No,No,Excellent,Yes,Yes,1.015,100%\n', '2018-07-21,15,4,3,6,5,22:30:00,07:00:00,8.5,7,25,No,No,No,Excellent,Yes,No,NA,95%\n', '2018-07-21,16,3,2,5,3,23:00:00,07:00:00,8,2,15,No,No,No,Okay,Yes,Yes,1.14,100%\n', '2018-07-20,1,3,4,3,4,23:00:00,07:00:00,8,2,16,No,No,Yes,Excellent,Yes,Yes,1.019,0%\n', '2018-07-20,2,4,4,5,4,22:00:00,07:00:00,9,3,20,Yes,No,Yes,NA,NA,Yes,1.017,0%\n', '2018-07-20,3,4,4,6,4,22:30:00,06:30:00,8,4,22,No,No,No,NA,NA,Yes,1.016,100%\n', '2018-07-20,4,4,5,6,4,23:00:00,07:00:00,8,3,22,No,No,Yes,Excellent,Yes,Yes,1.019,95%\n', '2018-07-20,5,5,6,6,5,23:45:00,07:00:00,7.25,5,27,No,No,No,Okay,Yes,Yes,1.022,95%\n', '2018-07-20,7,3,4,4,4,22:00:00,07:00:00,9,4,19,No,No,No,Excellent,Yes,Yes,1.014,100%\n', '2018-07-20,10,3,4,4,4,22:30:00,07:00:00,8.5,3,18,No,Slightly Off,No,Excellent,Yes,Yes,1.016,60%\n'] diff --git a/data_preparation/printFirstFewRows.py b/data_preparation/printFirstFewRows.py new file mode 100644 index 0000000..f4c95d8 --- /dev/null +++ b/data_preparation/printFirstFewRows.py @@ -0,0 +1,6 @@ +FILENAME = ".csv" + +file = open("data/wellness.csv") +n = 20 +head = [next(file) for x in range(20)] +print(head)