Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Python Packages (Required)

Create a fresh Python environment to isolate this project's dependencies:

cd /path/to/data-visualization-demo
python -m venv .venv

Activate the virtual environment:

  • Linux/macOS:

    source .venv/bin/activate
    
  • Windows (PowerShell):

    .\.venv\Scripts\Activate.ps1
    
  • Windows (Command Prompt):

    .venv\Scripts\activate.bat
    

Install Dependencies

With the virtual environment activated, install all required Python packages:

pip install -r requirements.txt

This installs ~75 packages including:

  • Jupyter Lab / Notebook (latest)
  • Matplotlib 3.10.7 — static plotting
  • Seaborn 0.13.2 — statistical visualization
  • Plotly 6.4.0 — interactive web charts
  • Pandas 2.3.3 — data manipulation
  • NumPy 2.3.4 — numerical computing
  • Datashader 0.18.2 — large dataset aggregation
  • Statsmodels 0.14.5 — regression and statistics
  • And ~50+ supporting libraries (see requirements.txt for full list).

System Packages (Optional)

Depending on which features you want to use, you may need to install additional system-level packages.

LaTeX (for Direct PDF Export)

Required for jupyter nbconvert --to pdf.

Debian/Ubuntu:

sudo apt update
sudo apt install -y texlive-xetex texlive-fonts-recommended texlive-latex-recommended

macOS (with Homebrew):

brew install mactex

Windows: Download and install MiKTeX or TeX Live from their official sites.

Chromium / Google Chrome (for Headless HTML→PDF)

Alternative to LaTeX; recommended for environments where TeX is difficult to install.

Debian/Ubuntu:

sudo apt update
sudo apt install -y chromium-browser

macOS (with Homebrew):

brew install chromium

Windows: Download from Google Chrome or Chromium.

ffmpeg (for Animation Export to MP4)

Debian/Ubuntu:

sudo apt install -y ffmpeg

macOS (with Homebrew):

brew install ffmpeg

Windows: Download from ffmpeg.org or install via Chocolatey:

choco install ffmpeg

Verification

To verify your installation, activate your virtual environment and run:

python -c "import jupyter, matplotlib, seaborn, plotly; print('All core packages imported successfully!')"
jupyter --version

You should see version information for Jupyter and no errors.

Next: Running the Notebook

Once installed, see Running the Notebook to get started.