This lesson introduces the core principles and practices of data visualization. You’ll learn why visualizing data is essential, how to select the right chart, and how to build clear, compelling visuals using Python and SQL. We also show how Galaxy’s SQL editor can preview charts straight from query results, giving you an end-to-end workflow.
Data visualization is the practice of translating raw data into graphical representations—a bar chart, line graph, map, or bespoke interactive—that reveal patterns, trends, and outliers faster than rows of numbers ever could. Humans process visuals 60,000× faster than text, making charts indispensable for analysis and communication.
Match data type to visual channel:
QuestionBest ChartCompare categoriesBar, Column, Dot plotShow change over timeLine, AreaPart-to-wholeStacked bar, Treemap (avoid 3-D pies!)DistributionHistogram, Box plot, ViolinRelationshipScatter, Bubble, Heat map
Suppose you have monthly revenue data and want to visualize growth.
import pandas as pd
import matplotlib.pyplot as plt
data = {
"month": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
"revenue": [22_000, 24_500, 27_000, 31_200, 35_100, 40_300]
}
df = pd.DataFrame(data)
plt.figure(figsize=(8,4))
plt.plot(df["month"], df["revenue"], marker="o", color="#4F6D7A")
plt.title("Monthly Revenue, H1 2024")
plt.ylabel("USD (thousands)")
plt.tight_layout()
plt.show()
What to observe: The slope accelerates after March—a cue to dig into driver events such as a product launch.
sales
Collection to store revenue queries.SELECT
DATE_TRUNC('month', order_date) AS month,
SUM(total_amount) / 1000 AS revenue_k
FROM orders
WHERE order_date >= '2024-01-01'
GROUP BY 1
ORDER BY 1;
month
as the X-axis and revenue_k
as the Y-axis. Choose a Line chart.sales
Collection, click Endorse, and share the link with Finance.This workflow keeps SQL, visualization, and collaboration in a single source-of-truth—no ad-hoc CSV exports.
Avoid chart junk—gradients, 3-D effects, excessive gridlines.
Axes, units, and annotations should be self-explanatory. If the audience has to guess, you’ve lost them.
Always start bar charts at zero; use consistent intervals on time axes.
alpha
) or density contours.orders
table, visualize revenue by product category.tips
dataset from Seaborn and create a scatterplot of total_bill vs tip colored by day. Add a trendline.Advance to intermediate topics like interactive dashboards, geospatial mapping, or storytelling with multiple linked charts. Galaxy’s roadmap includes lightweight visual builder features—get started now so you’re ready when they land!