Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

This is sports data analysis with python class.

One way to judge a basketball lineup is to determine the point differential when that particular combination of players is in the game - in other words, how many points does a particular lineup score vs how many do they give up to their opponents? In this assignment you will determine the best lineup for each NBA team over the 2009 season.

Procedure

Write a program (or a Jupyter/Python notebook) to calculate the point differential for each lineup for each NBA team during the 2009 season. The data is in the Basketball/PBP/2009 folder. Each csv file holds data for one NBA game; the file name includes the date of the game followed by the visiting team then the home team.

Each row of the file represents an event, where an event is a shot, a foul, a rebound, etc. For the purpose of this assignment you need only deal with a limited number of fields. Fields 0-4 hold the names of the visiting team players on the floor when the event occurred; fields 5-9 hold the names of the home team players on the floor. For the most part, you only need the points field, providing the number of points scored on the event. Oddly (and unfortunately), the points field does not register points scored on free throws.

To capture those points, you'll need the etype field and the result field. If the etype is free throw and the result is made, then one point is scored. In all cases, there are two ways to determine which team scored the points. You can use the team field; alternatively, you can use the player field and find out whether the player is listed in field 0 to 4 (visiting team) or fields 5 to 9 (home team).

I suggest you use a Team class to store lineups and, for each team, store the lineups in a dictionary. The order of names in a lineup are irrelevant. Given five players A, B, C, D, and E, ABCDE, BDACE, and EADCB are all the same lineup. That means lineups are sets. Sets are mutable and can't be used as dictionary keys - but frozensets are immutable and can be dictionary keys.

For each lineup, keep track of the number of points scored and the number allowed. After all files have been processed, calculate the point differential for each lineup for each team. Print the team names (LAL, SAS, etc), the highest point differential for that team, and the lineup with the highest point differential. Either print the output in alphabetical order of team or in descending order of point differential.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93123412

Have any Question?


Related Questions in Computer Engineering

For the rosenberg land development problem problem 2 in

For the Rosenberg Land Development problem (Problem 2 in Chapter 14), suppose that the construction costs are uncertain. Specifically, assume that the distribution ofconstruction costs is normally distributed, with the m ...

Question resource security planning and risk management

Question: Resource: Security Planning and Risk Management Template The CIO of the organization you chose is ready for you to take a look at the organization's potential vulnerabilities and threats. Complete the 1.5- to 2 ...

Suppose a finite deck of numeric cards 1 2 3 have been

Suppose a finite deck of numeric cards 1, 2, 3, ... have been shuffled randomly. Repeat the following step: If the top card is numbered 1, the game terminates. But if it is any number n > 1, then reverse the ordering of ...

Question 1 your organization has approximately 10 tb of

Question: 1. Your Organization has approximately 10 TB of data, and you need to decide if your organization should have on-site or off-site tape storage. 2. Your organization must be able to easily recover data no older ...

Stack implemented with slldesign and code your own lifo

Stack implemented with SLL Design and code your own LIFO Stack using single liked list to hold a list of integers. Use the C++ "struct" structure to create your SLL nodes. Node position numbering should start with one. Y ...

Need help with calculation problem and design a program to

Need help with Calculation Problem and Design a program to input two numbers. Calculate the sum, the difference, the product, and the quotient. Display the answers. Car Rental Problem The Sports Car Rental Company rents ...

Question high-performing teambullimagine that you are an

Question: "High-Performing Team" • Imagine that you are an agile coach. Outline a plan that sets the expectations for your team when beginning a project. Provide a rationale for your response. • Read the mini-case titled ...

Assume that these data are seven random observations taken

Assume that these data are seven random observations taken from a larger population whose values are normally distributed. (even if this assumption makes little sense) Using this assumption, coupled with prior computatio ...

You are required but not limited to turn in the following

You are required, but not limited, to turn in the following source file: Requirements to get full credits in Documentation The assignment number, your name, StudentID, Lecture number(time), and a class description need t ...

Display the manager of the employee with the oldest project

Display the manager of the employee with the oldest project start date (start_date). (This query requires 3 nested queries, start by finding the min start_date from project, then find the emp_id from project where start_ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As