Interactive Visualization and Plotting with Julia

Book description

Represent and analyze data using Plots to find actionable insights using Julia programming

Key Features

  • Learn to use static and interactive plots to explore data with Julia
  • Become well versed with the various plotting attributes needed to customize your plots
  • Create insightful and appealing plots using data interactions, animations, layouts, and themes

Book Description

The Julia programming language offers a fresh perspective into the data visualization field.

Interactive Visualization and Plotting with Julia begins by introducing the Julia language and the Plots package. The book then gives a quick overview of the Julia plotting ecosystem to help you choose the best library for your task. In particular, you will discover the many ways to create interactive visualizations with its packages. You'll also leverage Pluto notebooks to gain interactivity and use them intensively through this book. You'll find out how to create animations, a handy skill for communication and teaching. Then, the book shows how to solve data analysis problems using DataFrames and various plotting packages based on the grammar of graphics. Furthermore, you'll discover how to create the most common statistical plots for data exploration. Also, you'll learn to visualize geographically distributed data, graphs and networks, and biological data. Lastly, this book will go deeper into plot customizations with Plots, Makie, and Gadfly—focusing on the former—teaching you to create plot themes, arrange multiple plots into a single figure, and build new plot types.

By the end of this Julia book, you'll be able to create interactive and publication-quality static plots for data analysis and exploration tasks using Julia.

What you will learn

  • Create interactive plots with Makie, Plots, Jupyter, and Pluto
  • Create standard statistical plots and visualize clustering results
  • Plot geographically distributed and biological data
  • Visualize graphs and networks using GraphRecipes and GraphPlots
  • Find out how to draw and animate objects with Javis, Plots, and Makie
  • Define plot themes to reuse plot visual aspect customizations
  • Arrange plots using Plots, Makie, and Gadfly layout systems
  • Define new plot types and determine how Plots and Makie show objects

Who this book is for

Data analysts looking to explore Julia's data visualization capabilities will find this book helpful, along with scientists and academics who want to generate and communicate knowledge and improve their teaching material. This data visualization book will also interest Julia programmers willing to delve into the language plotting ecosystem and improve their visualization skills. Basic programming knowledge is assumed — but the book will introduce you to Julia's important features. Familiarity with mathematical and statistical concepts will help you make the most of some of the chapters.

Publisher resources

Download Example Code

Table of contents

  1. Interactive Visualization and Plotting with Julia
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
  6. Section 1 – Getting Started
  7. Chapter 1: An Introduction to Julia for Data Visualization and Analysis
    1. Technical requirements
    2. Getting started with Julia
      1. Installing Julia
      2. Interacting with the Julia REPL
      3. Running Julia scripts
    3. Installing and managing packages
      1. Installing Julia packages
      2. Loading packages
      3. Managing environments
    4. Choosing a development environment
      1. The Julia extension for VS Code
      2. Using Julia notebooks
    5. Knowing the basic Julia types for data visualization
      1. Defining and calling functions
      2. Working with Julia types
    6. Creating a basic plot
      1. Plotting multiple series
      2. Modifying plots
      3. Scatter plots
      4. Bar plots
      5. Heatmaps
      6. Simple layouts
    7. Summary
    8. Further reading
  8. Chapter 2: The Julia Plotting Ecosystem
    1. Technical requirements
    2. Plotting libraries
      1. Pure Julia packages
      2. Wrappers
    3. Understanding the Plots package
    4. Plots' backends
    5. Introducing Makie
    6. Summary
    7. Further reading
  9. Chapter 3: Getting Interactive Plots with Julia
    1. Technical requirements
    2. Libraries focusing on interactivity
      1. Modifying the underlying data
      2. Modifying data’s perceptual formatting
    3. Exploiting the interactivity of Plots backends
    4. Interactive and reactive plots with Makie
    5. Interactivity on Jupyter and Pluto notebooks
      1. Creating interactive visualizations with Pluto
      2. Interactive visualization with Jupyter
    6. Sharing your interactive visualizations
      1. Creating a Julia application
      2. Sharing Pluto notebooks
      3. Publishing JavaScript plots
      4. Creating applications to serve interactive plots
    7. Summary
    8. Further reading
  10. Chapter 4: Creating Animations
    1. Technical requirements
    2. Easy animation using Plots
      1. Using the Animations package
    3. Animating Makie plots
    4. Getting started with Javis
    5. Summary
    6. Further reading
  11. Section 2 – Advanced Plot Types
  12. Chapter 5: Introducing the Grammar of Graphics
    1. Technical requirements
    2. Introducing the Grammar of Graphics
    3. Working with DataFrames and tidy data
      1. Encoding data
    4. Exploring data with Gadfly
    5. Introducing the Grammar of Interactive Graphics with VegaLite
    6. Makie’s Algebra of Graphics
    7. Summary
    8. Further reading
  13. Chapter 6: Creating Statistical Plots
    1. Technical requirements
    2. Introducing StatsPlots
    3. Visualizing univariate distributions
      1. Drawing histograms
      2. Approximating density functions
      3. Introducing boxplots
      4. Visualizing distribution shapes with violin plots
      5. Comparing distributions with Q-Q plots
    4. Plotting bivariate distributions and regressions
    5. Drawing regression lines
    6. Creating marginal plots
    7. Visualizing clustering results
    8. Comparing between groups
    9. Summary
    10. Further reading
  14. Chapter 7: Visualizing Graphs
    1. Technical requirements
    2. Working with graphs in Julia
      1. Working with MetaGraph
      2. Saving and loading graphs
    3. Graph visualization packages
      1. Visualizing graphs with GraphPlot
      2. Exploring GraphRecipes
      3. Creating interactive graphs with GraphMakie
    4. Graph layouts
    5. Analyzing graphs
    6. Summary
    7. Further reading
  15. Chapter 8: Visualizing Geographically Distributed Data
    1. Technical requirements
    2. Creating choropleth maps
      1. Creating a choropleth map with Plots
      2. Creating a choropleth map with GeoMakie
    3. Introducing OpenStreetMapX
    4. Summary
    5. Further reading
  16. Chapter 9: Plotting Biological Data
    1. Technical requirements
    2. Visualizing phylogenetic trees
    3. Plotting a protein sequence and structure
      1. Exploring multiple sequence alignments
      2. Visualizing protein structures
    4. Creating dashboards for biological data
    5. Summary
    6. Further reading
  17. Section 3 – Mastering Plot Customization
  18. Chapter 10: The Anatomy of a Plot
    1. Technical requirements
    2. The anatomy of a Plots plot
    3. Knowing the components of Makie’s figures
    4. Exploring Gadfly’s customizable components
    5. Summary
    6. Further reading
  19. Chapter 11: Defining Plot Layouts to Create Figure Panels
    1. Technical requirements
    2. Creating layouts with Plots
    3. Understanding Makie’s layout system
    4. Composing Gadfly plots
    5. Summary
    6. Further reading
  20. Chapter 12: Customizing Plot Attributes – Axes, Legends, and Colors
    1. Technical requirements
    2. Exploring plot attributes
    3. Using LaTeX equations
    4. Formatting the fonts
    5. Customizing the axes
    6. Tailoring legends
    7. Coloring our figures
      1. Color attributes
    8. Summary
    9. Further reading
  21. Chapter 13: Designing Plot Themes
    1. Technical requirements
    2. Working with themes
      1. Using and defining themes with Plots
      2. Theming with Makie
      3. Using themes with Gadfly
    3. Summary
    4. Further reading  
  22. Chapter 14: Designing Your Own Plots – Plot Recipes
    1. Technical requirements
    2. Drawing shapes
    3. Creating plotting recipes
      1. User recipes
      2. Type recipes
      3. Plot recipes
      4. Series recipes
    4. Writing plotting recipes for Makie
    5. Summary
    6. Further reading
    7. Why subscribe?
  23. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: Interactive Visualization and Plotting with Julia
  • Author(s): Diego Javier Zea
  • Release date: August 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781801810517