{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "GeoViews is designed to make full use of multidimensional gridded datasets stored in netCDF or other common formats, via the xarray and iris interfaces in HoloViews. This notebook will demonstrate how to load data using both of these data backends, along with some of their individual quirks. The data used in this notebook was originally shipped as part of the [``SciTools/iris-sample-data``](https://github.com/SciTools/iris-sample-data) repository, but a smaller netCDF file is included as part of the GeoViews so that it can be used with xarray as well." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import xarray as xr\n", "import holoviews as hv\n", "import geoviews as gv\n", "import geoviews.feature as gf\n", "from cartopy import crs\n", "\n", "hv.extension('matplotlib', 'bokeh')\n", "\n", "#conda install -c ioam -c conda-forge holoviews geoviews" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setting some notebook-wide options" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's start by setting some normalization options (discussed below) and always enable colorbars for the elements we will be displaying:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%opts Image {+framewise} [colorbar=True] Curve [xrotation=60]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can see that it is easy to set global defaults for a project, allowing any suitable settings to be made into a default on a per-element-type basis. Now let's specify the maximum number of frames we will be displaying:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%output max_frames=1000 " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "