The Real Python Podcast

Building Python Unit Tests & Exploring a Data Visualization Gallery

5 snips
May 31, 2024
Python expert Christopher Trudeau discusses adding unit tests to Python code using the unittest framework, covering organizing tests, assert methods, fixtures, and debugging. They also explore Python data visualizations from the Python Graph Gallery, showcasing tutorials for different chart types. Other topics include Python 3.13 features, pytest speed improvements, software friction, Raspberry Pi document scanner, and time per iteration loop control project.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

A Gallery For Advanced Plots

  • The Python Graph Gallery offers hundreds of reproducible, advanced visualizations across Matplotlib, Seaborn, Plotly, and more.
  • It accelerates learning by providing ready-to-run code and deep explanations for complex charts.
ADVICE

Animate Data With FuncAnimation

  • Use matplotlib.animation.FuncAnimation for annotated, event-driven animations that highlight key data points.
  • Combine pandas, NumPy, and Pillow for tidy data animations and single-image sequences.
INSIGHT

Sankey Diagrams Convey Flow Quantities

  • Sankey diagrams visualize flows where arrow width maps to quantity, making them ideal for energy or material transfers.
  • Plotly provides strong Sankey support with customization and real-world examples.
Get the Snipd Podcast app to discover more snips from this episode
Get the app