liveBook · Manning

Visualization

As explained in Learn AI Data Engineering

Data visualization is the graphical representation of data to reveal patterns, relationships, trends, or comparisons.

Data visualization turns cleaned, enriched analysis tables into graphical views that reveal patterns, trends, comparisons, and changing values. An excitement arc plots game excitement by play, marks key moments, and adds a smoothed trend to expose momentum shifts. section 9.3.5

A practical visualization workflow includes:

  • Prepare a compact DataFrame containing identifiers, measures, and grouping fields such as play number, excitement, key-moment status, inning number, and inning half. section 9.3.5
  • Use a line plot for values over time, scatter points for notable observations, and a smoothed line for broader movement. section 9.3.5
  • Finish with readable axis labels, a title, legend, grid, consistent y-axis limits, and notebook rendering. section 9.3.5
  • Treat AI-generated scores and structured fields as variable: model versions, prompts, and settings can change individual results and chart shape. section 9.3.5

Game 7 excitement arc

Filter the enriched Game 7 DataFrame, plot excitement against play number, overlay red markers for key moments, and calculate a size-10 uniform-filter smoothing line. Compare the resulting arc with pitcher or batter summary charts built from the same enriched dataset. section 9.3.5 section 9.4

Listing 9.9 Setting Up the Excitement Visualization
import matplotlib.pyplot as plt  #A
import seaborn as sns  #A
from scipy.ndimage import uniform_filter1d  #A
 
# Configure plot aesthetics
sns.set_style("whitegrid")  #B
plt.rcParams["figure.figsize"] = (14, 6)  #B
 
# Prepare a compact DataFrame for excitement analysis
excitement_df = df_enriched[  #C
    ["play_id", "excitement", "key_moment", "inning_number", "inning_half"]
].copy()

Use the visualization listings to inspect DataFrame preparation, plotting layers, smoothing, labels, and final rendering. section 9.3.5

How Learn AI Data Engineering covers it

How deep it goes
Implements DataFrame filtering, layered plots, smoothing, labels, scales, and rendering, while deferring advanced visualization design.
Examples
Demonstrates an excitement arc, key-moment markers, smoothed trends, and pitcher or batter performance charts.
What it assumes
Assumes cleaned, canonically mapped, enriched tabular data and familiarity with DataFrames, while using standard plotting tools.
What you can do after
Build it from scratch with Python plotting tools using prepared DataFrames and validated, explicitly labeled chart elements.
How it connects
Connects data cleaning, data transformation pipelines, feature engineering, joins, and AI-generated semantic features.

Also explained in

Compare how 17 books explain visualization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn AI Data Engineering. The section links point to the parts of the book it draws on.