My NBA Position Comparison Program reads survey data from a CSV file and analyzes how participants rated the importance of skill in different NBA positions. The program uses several functions to read, clean, analyze, and visualize the data. The main() function coordinates the program. Data is being cleaned by using helper functions such as check_age() and check_linear_scale(). The read_csv() function uses a loop to iterate over each row in the CSV. Conditional statements are being used to validate the age and rating fields, it counts how many people rated "4", or "5". These ratings are stored as integers. The plt_count function creates a pie chart which shows the percentage of people who gave different ratings. I used this new I learned recently called explode to make the pie chart really stand out. My friend suggested me to use it. The program uses different variables, strings for file names, integers for counters, and lists to store data. Loops condionals and functions are used to structure the program.
I expect my program to output a graph and a chart. The graph created was a histogram. This graph shows how participants feel how much skill is required for different NBA positions. The chart I created was a pie chart which showed how participants rated the importance of skill for different NBA positions.
Some trends you can tell from the graph is how most people agreed that certain positions do in fact require more skill than others. Participants most likely felt this way because they feel that the taller players have less skill than the shorter players because they usually have a smaller role on the court. A trend you can see in the chart is that most participants feel that different skills are important for different NBA positions. Even though all positions are starting to become more and more similar with the increase of 3-pt shooting. Participants still feel that certain skills are more important for certain positions.
These visualizations were pretty similar the previous visualizations made. They differ slightly due to less responses thanks to cleaned data responses. The data statistic being computed on my pie chart is ranking the skill of NBA positions. I chose this statistic because it directly supports my topic.