[solved]-Assignment Background Assignment Simple Statistical Analysis Nba National Basketball Assoc Q39058765









Assignment Background: This assignment will do some simple statistical analysis of some NBA (National Basketball Association) data from 2016/17 and 2017/18 season (2017.csv and 2018.csv respectively). This data has been downloaded from: www.nbastuffer.com We have also given you a small file for testing purposes (4lines.csv) Each file has the same columns where the first row indicates what data is in each column. For this assignment you will not be interested in all of the data but you will write functions to help you extract the data that you want to analyze. We have provided you with expected output files for the 3 input files provided (2017out.csv, 2018out.csv and 4linesout.csv) Your output should match these. You can assume that if the filename refers to a file that exists, that file will be in expected format. We will test your solutions with other input files but they will always be in the expected format. Download the three .csv (comma separated value) files provided and assignments.py to your working directory. In the assignments.py file you will see that we have specified a set of constants to help with data extraction given the columns of the csv file and format of the tuples you will be creating. In the assignment8.py file you will also see we have provided you with the documentation and tests for the following functions: read_file • get val filter list contains get_unique get_max get_avg get_report Complete this assignment by doing the following for each function: uncomment one test function call in main – implement the corresponding function following the given documentation run tests to ensure your implementation is correct – repeat until all functions are tested and implemented NOTE: The get_report and write_stats functions will require you to inspect the output files to ensure your functions have the correct behavior. Just running the test_get_report function is not sufficient. NOTICE: the highest scoring forward is printed – to determine this player you should consider players with POS of SF (shooting forward) and F (forward) but not PF (power forward) Below is the sample output of 4linesout.csv that your output should match: Team, Average Points/Game, Average Rebounds/Game, Average Steals/Game, Average Blocks/Game Den, 7.9,4.4,0.3,0.4 Tor, 8.4,6.0,1.1,1.1 highest scoring forward is: , Torrey Craig points per game:,6.6 rebounds per game:,5.1 steals per game:,0.5 blocks per game: ,0.36 4line 76% @d Collab View Zoom Add Category Insert Table Chart Text Shape Media Comment + Sheet1 RANK FULL NAME TEAM POS AGE GP MPG MNS.Minute PercentagePercentage of team minutes used by a player while he was on the floor USGSUsage Rate Usage rat,ke, usage percentage is an estimate of the percentage of team plays used by a play Wil Barton Der G 21 14 234 Malik Beasley Dono 22.47 14 20.1 Min o r 17 Tommy D F 41 142 76% Zoom 4line El T Table Chart Text Od Collabo Add Category Insert Shape Media Comment View + Sheet1 Hays used by a player while he was on the floor Tork Turnover Ametre that estimates the number of turnovers a player com PA FONEective shooting Percentage with three-point shots made we per 100 possessions FTA FT% B2 26 0.002 6.2 31 0.71 74 14 0.7 75 16 0. 58 46 P 04 0.37 0.478 4 3PA 3P% 05 0.273 47 DADA 4 35 26 0472 v 76% 4line E TI Table Chart Text Shape View Zoom Add Category Insert Media Comment Collabo + Sheet1 worth 50% more than two-point shots made. FG% Formula OM. 05 PMVFGA TSS. True Shooting Percentage True shooting percentage in a measure of shooting efficiency that takes into account field goal, 3-point field goals, and free thrown. PPG Points Points 0.404 0.591 0.001 We were unable to transcribe this image4line @ A View 76% Zoom E DE Insert Table TI Text Shape Add Category Chart Media Comment Collab + Sheet1 is a metrie that measures a player’s ability to produce in points, assists, and rebounds. The average player will score around a five on the index, while top players score above 1 ORTGONensive Ratingindividual offensive rating is the number of points produced by a player v 76% 4line DE . TIO Insert Table Chart Text Shape Media Comment Od Collabo View Zoom Add Category + Sheet1 player per 100 total individual possessions. ORTODefensive Rating individual defensive rating estimates how many points the player allowed per 100 possessions he individually faced while staying on the court. 1075 107 118.8 429.5 125% 4lineout ETTO Insert Table Chart Text Shape Media Od Collabo Zoom Add Category Comment View + Sheet1 ? Table data was imported. Adjust Settings 4lineout Team Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game Den 7.9 0.3 Tor 8.4 highest scoring forward is: Torrey Craig points per game: rebounds per game: steals per game: blocks per game: 5.1 0.5 0.36 125% Zoom 2017out E ET Insert Table Chart Text Shape View Add Category Media Comment Collabora + Sheet1 ? Table data was imported. Adjust Settings 2017out Team Min Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game 8.4 0.6 0.7 Uta 0.6 0.6 0.6 Okc Mil 2.9 2.9 Hou 0.5 9 Phi Mem Lac O View 125% Zoom 2017out E ET Insert Table Chart Text Shape Add Category Media Comment Collabo + Sheet1 OND i co O Lac Bos Cha Det Pho Den Mia highest scoring forward is: LeBron James points per game: rebounds per game: steals per game: blocks per game: 8.1 27.5 8.7 1.41 0.87 125% 2018out # El T Insert Table Chart Text View Zoom Add Category Shape Media Comment Collabor + Sheet 1 Adjust Settings Team 2018out ? Table data was imported. Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game 0.5 0.4 3.7 0.5 0.4 Den Por Tor Hou Gol Phi Lac 3.3 Ind Bos 7.8 highest scoring forward is: Kevin Durant points per game: 34.2 5.2 rebounds per game: steals per game: 1.18 blocks per game: Show transcribed image text View comments (1) ► Fyrert Answer Show transcribed image text Assignment Background: This assignment will do some simple statistical analysis of some NBA (National Basketball Association) data from 2016/17 and 2017/18 season (2017.csv and 2018.csv respectively). This data has been downloaded from: www.nbastuffer.com We have also given you a small file for testing purposes (4lines.csv) Each file has the same columns where the first row indicates what data is in each column. For this assignment you will not be interested in all of the data but you will write functions to help you extract the data that you want to analyze. We have provided you with expected output files for the 3 input files provided (2017out.csv, 2018out.csv and 4linesout.csv) Your output should match these. You can assume that if the filename refers to a file that exists, that file will be in expected format. We will test your solutions with other input files but they will always be in the expected format. Download the three .csv (comma separated value) files provided and assignments.py to your working directory. In the assignments.py file you will see that we have specified a set of constants to help with data extraction given the columns of the csv file and format of the tuples you will be creating. In the assignment8.py file you will also see we have provided you with the documentation and tests for the following functions: read_file • get val filter list contains get_unique get_max get_avg get_report
Complete this assignment by doing the following for each function: uncomment one test function call in main – implement the corresponding function following the given documentation run tests to ensure your implementation is correct – repeat until all functions are tested and implemented NOTE: The get_report and write_stats functions will require you to inspect the output files to ensure your functions have the correct behavior. Just running the test_get_report function is not sufficient. NOTICE: the highest scoring forward is printed – to determine this player you should consider players with POS of SF (shooting forward) and F (forward) but not PF (power forward) Below is the sample output of 4linesout.csv that your output should match: Team, Average Points/Game, Average Rebounds/Game, Average Steals/Game, Average Blocks/Game Den, 7.9,4.4,0.3,0.4 Tor, 8.4,6.0,1.1,1.1 highest scoring forward is: , Torrey Craig points per game:,6.6 rebounds per game:,5.1 steals per game:,0.5 blocks per game: ,0.36 4line 76% @d Collab View Zoom Add Category Insert Table Chart Text Shape Media Comment + Sheet1 RANK FULL NAME TEAM POS AGE GP MPG MNS.Minute PercentagePercentage of team minutes used by a player while he was on the floor USGSUsage Rate Usage rat,ke, usage percentage is an estimate of the percentage of team plays used by a play Wil Barton Der G 21 14 234 Malik Beasley Dono 22.47 14 20.1 Min o r 17 Tommy D F 41 142
76% Zoom 4line El T Table Chart Text Od Collabo Add Category Insert Shape Media Comment View + Sheet1 Hays used by a player while he was on the floor Tork Turnover Ametre that estimates the number of turnovers a player com PA FONEective shooting Percentage with three-point shots made we per 100 possessions FTA FT% B2 26 0.002 6.2 31 0.71 74 14 0.7 75 16 0. 58 46 P 04 0.37 0.478 4 3PA 3P% 05 0.273 47 DADA 4 35 26 0472 v 76% 4line E TI Table Chart Text Shape View Zoom Add Category Insert Media Comment Collabo + Sheet1 worth 50% more than two-point shots made. FG% Formula OM. 05 PMVFGA TSS. True Shooting Percentage True shooting percentage in a measure of shooting efficiency that takes into account field goal, 3-point field goals, and free thrown. PPG Points Points 0.404 0.591 0.001
4line @ A View 76% Zoom E DE Insert Table TI Text Shape Add Category Chart Media Comment Collab + Sheet1 is a metrie that measures a player’s ability to produce in points, assists, and rebounds. The average player will score around a five on the index, while top players score above 1 ORTGONensive Ratingindividual offensive rating is the number of points produced by a player v 76% 4line DE . TIO Insert Table Chart Text Shape Media Comment Od Collabo View Zoom Add Category + Sheet1 player per 100 total individual possessions. ORTODefensive Rating individual defensive rating estimates how many points the player allowed per 100 possessions he individually faced while staying on the court. 1075 107 118.8 429.5
125% 4lineout ETTO Insert Table Chart Text Shape Media Od Collabo Zoom Add Category Comment View + Sheet1 ? Table data was imported. Adjust Settings 4lineout Team Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game Den 7.9 0.3 Tor 8.4 highest scoring forward is: Torrey Craig points per game: rebounds per game: steals per game: blocks per game: 5.1 0.5 0.36
125% Zoom 2017out E ET Insert Table Chart Text Shape View Add Category Media Comment Collabora + Sheet1 ? Table data was imported. Adjust Settings 2017out Team Min Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game 8.4 0.6 0.7 Uta 0.6 0.6 0.6 Okc Mil 2.9 2.9 Hou 0.5 9 Phi Mem Lac
O View 125% Zoom 2017out E ET Insert Table Chart Text Shape Add Category Media Comment Collabo + Sheet1 OND i co O Lac Bos Cha Det Pho Den Mia highest scoring forward is: LeBron James points per game: rebounds per game: steals per game: blocks per game: 8.1 27.5 8.7 1.41 0.87
125% 2018out # El T Insert Table Chart Text View Zoom Add Category Shape Media Comment Collabor + Sheet 1 Adjust Settings Team 2018out ? Table data was imported. Average Points/Game Average Rebounds/Game Average Steals/Game Average Blocks/Game 0.5 0.4 3.7 0.5 0.4 Den Por Tor Hou Gol Phi Lac 3.3 Ind Bos 7.8 highest scoring forward is: Kevin Durant points per game: 34.2 5.2 rebounds per game: steals per game: 1.18 blocks per game: Show transcribed image text View comments (1) ► Fyrert Answer
Expert Answer
Answer to Assignment Background: This assignment will do some simple statistical analysis of some NBA (National Basketball Associa… . . .
OR

