Advanced Visualization Cookbook
- -This Project Pythia Cookbook covers advanced visualization techniques building upon and combining various Python packages.
-Motivation
-The possibilities of data visualization in Python are almost endless. Already using matplotlib
the workhorse behind many visualization packages, the user has a lot of customization options available to them. cartopy
, metpy
, seaborn
, geocat-viz
, and datashader
are all also great packages that can offer unique additions to your Python visualization toolbox.
This Cookbook will house various visualization workflow examples that use different visualization packages, highlight the differences in functionality between the packages, any noteable syntax distinctions, and demonstrate combining tools to achieve a specific outcome.
-Structure
-This cookbook is broken up into a few sections - a “Basics of Geoscience Visualization” intro that compares different visualization packages and plot elements, and then example workflows of advanced visualization applications that are further subdivided.
-Basics of Geoscience Visualization
-Here we introduce the basics of geoscience visualization, the elements of a plot, different types of plots, and some unique considerations when dealing with model and measured data. Here we also share a comparison of different visualization packages available to the Scientific Python programmer.
-Specialty Plots
-There are some plot types that are unique to atmospheric science such as Taylor Diagrams or Skew-T plots. Here we will use metpy
and geocat-viz
to demonstrate these specialty plots.
Visualization of Structured Grids
-In this section we will demonstrate how to visualize data that is on a structured grid. Here we will have workflows that utilize packages such as cartopy
and geocat-viz
.
Visualization of Unstructured Grids
-There are lots of compelling reasons to use unstructured data. In this section we will go over these points and demonstrate how to visualizate unstructured grids using uxarray
.
Interactive Visualization
-Some plots allow users to iteract with them by toggling certain constants or changing the viewing angle. Here we use datashader
to iteract with some plots.
3D Visualization
-A lot of geoscience data is 3-dimensional. Here we discuss tools such as vapor
that are designed for multidimensional data visualization.
Running the Notebooks
-You can either run the notebook using Binder or on your local machine.
-Running on Binder
-The simplest way to interact with a Jupyter Notebook is through -Binder, which enables the execution of a -Jupyter Book in the cloud. The details of how this works are not -important for now. All you need to know is how to launch a Pythia -Cookbooks chapter via Binder. Simply navigate your mouse to -the top right corner of the book chapter you are viewing and click -on the rocket ship icon, (see figure below), and be sure to select -“launch Binder”. After a moment you should be presented with a -notebook that you can interact with. I.e. you’ll be able to execute -and even change the example programs. You’ll see that the code cells -have no output at first, until you execute them by pressing -Shift+Enter. Complete details on how to interact with -a live Jupyter notebook are described in Getting Started with -Jupyter.
-Running on Your Own Machine
-If you are interested in running this material locally on your com
--
-
Clone the
-https://github.com/ProjectPythia/advanced-viz-cookbook
repository:--git clone https://github.com/ProjectPythia/advanced-viz-cookbook.git -
-Move into the
-advanced-viz-cookbook
directory--cd advanced-viz-cookbook -
-Create and activate your conda environment from the
-environment.yml
file--conda env create -f environment.yml -conda activate advanced-viz-cookbook -
-Move into the
-notebooks
directory and start up Jupyterlab--cd notebooks/ -jupyter lab -
-