Please create a data visualization from the baseball data set.

The visualization should show differences among the performance of the baseball players.

The baseball data set contains 1,157 baseball players, including their handedness (right or left handed), height (in inches),
weight (in pounds), batting average, and home runs.

The assignment should be a reflection of the theory and practice of data visualization, such as visual encodings, design principles, and effective communication.

Additional requirements:

- Please add a footnote or header for each graph/plot.

- Please provide a brief summary in no more than 4 sentences, briefly introduce your data visualization and add any context that can help readers understand it.

- Please include an interaction or animation for the visualization. The interaction or animation may be simple, such as a hover, tooltip, or transition. you may also want it to be done for the bar charts.

- Please describe initial design decisions such as chart type, visual encodings, layout, legends, or hierarchy are included at the beginning.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

from bokeh.plotting import figure, show
from bokeh.charts import BoxPlot, Histogram, Scatter
from bokeh.models import ColumnDataSource, CDSView, GroupFilter
from bokeh.layouts import gridplot

import pandas as pd

data = pd.read_csv("baseball.csv")


colormap = {'R': 'red', 'L': 'green', 'B' : 'blue'}
colors = [colormap[x] for x in data['handedness']]

source = ColumnDataSource(data)

tools = ["box_select", "hover", "pan", "box_zoom", "reset"]
p_all = figure(tools = tools, title = 'Batting Average vs Home Runs of all players', height = 200)
p_all.xaxis.axis_label = 'Average'
p_all.yaxis.axis_label = 'Home Runs'"avg", y="HR", color = colors, hover_color="red", source = source)...

By purchasing this solution you'll be able to access the following files: and Solution.html.

50% discount

$40.00 $20.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats