My project is a Basketball Analyst "chatbot" that interacts with a user and makes a prediction on how a seven game series between two NBA teams regardless of year would end up. The prediction is based on comparing the two teams's stats such as total rebounds, points scored, 3-point percentage, etc. The bot takes in a csv file downloaded from basketball-reference.com. Each file has a year as its name such as 1967.csv or 2011.csv representing the team stats of every NBA team from that year. The bot reads these csv files and turns it into pandas dataframes and extracting and copying the relevant team stats based on user keyboard input into a new dataframe, which is then ran into a function that analyzes if, for example if a team's Field Goal % is higher than the other team, and then adding one point to that winning team's score. The two scores are then subtracted from each other and based on the overall difference between the two team's scores, a winner is assigned and the bot claims that that team will win in either 4,5,6 games or if both of the teams are evenly matched (tied score) then that the series will go 7 games and the bot flips a coin to determine the winner.
I decided to write this Basketball Analyst Bot, because many people like to claim that the newest dominant team, such as the late 2010's Golden State Warriors would get beaten badly by a former dominant team like the 90's Chicago Bulls or vice versa. My aim in creating this bot is to make a more educated prediction based on stats rather than making predictions based on opinion.