forked from CubeBrowser/cube-explorer
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'metoffice/master'
- Loading branch information
Showing
16 changed files
with
913 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,5 @@ target/ | |
.python-version | ||
|
||
.DS_Store | ||
# Website | ||
doc/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[submodule "doc/nbpublisher"] | ||
path = doc/nbpublisher | ||
url = https://github.com/ioam/ioam-builder.git | ||
branch = nbpublisher | ||
[submodule "doc/builder"] | ||
path = doc/builder | ||
url = https://github.com/ioam/ioam-builder.git | ||
branch = docbuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"HoloCube is a [Python](http://python.org) library that makes it easy to explore and visualize geographical, meterological, oceanographic, and other multidimensional gridded datasets. HoloCube interfaces between the [HoloViews](http://holoviews.org) library for flexible visualizations of multidimensional data, the [Iris](http://scitools.org.uk/iris) library for storing and processing climate and weather data, and the [Cartopy](http://scitools.org.uk/cartopy) library for working with cartographic projections and visualizations in [Matplotlib](http://matplotlib.org/). Specifically, HoloCube:\n", | ||
"\n", | ||
"1. Extends HoloViews objects to allow them to use data stored in [Iris](http://scitools.org.uk/iris) [cubes](http://scitools.org.uk/iris/docs/latest/userguide/iris_cubes.html). After `import holocube`, data can be provided to any Holoviews `Element` directly as a cube, without needing to first convert into one of the other supported formats (NumPy arrays, Pandas data frames, etc.). This support is independent of the other support below -- data from Iris cubes can be used even in non-geographic `Element`s, and most geographic Elements can accept data in any format.\n", | ||
"\n", | ||
"2. Adds a set of new HoloViews `Element`s that have an associated geographic projection (`GeoElement`s), based on `cartopy.crs`. These currently include `GeoFeature`, `WMTS`, `GeoTiles`, `Points`, `Contours`, `Image`, and `Text` objects, each of which can easily be overlaid in the same plots. E.g. an object with temperature data can be overlaid with coastline data using an expression like ``Image(temp_cube)*hc.GeoFeature(cartopy.feature.COASTLINE)``. Each `GeoElement` can also be freely combined in layouts with any other HoloViews `Element`, making it simple to make even complex multi-figure layours.\n", | ||
"\n", | ||
"With HoloCube, you can now work easily and naturally with large, multidimensional datasets, instantly visualizing any subset or combination of them, while always being able to access the raw data underlying any plot. Here's a simple example:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import holoviews as hv\n", | ||
"import holocube as hc\n", | ||
"from cartopy import crs\n", | ||
"from cartopy import feature as cf\n", | ||
"\n", | ||
"hv.notebook_extension()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"%%opts GeoFeature [projection=crs.Geostationary()]\n", | ||
"\n", | ||
"coasts = hc.GeoFeature(cf.COASTLINE)\n", | ||
"borders = hc.GeoFeature(cf.BORDERS)\n", | ||
"ocean = hc.GeoFeature(cf.OCEAN)\n", | ||
"\n", | ||
"ocean + borders + (ocean*borders).relabel(\"Overlay\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The following example loads a cube from [iris-sample-data](https://github.com/SciTools/iris-sample-data) and displays it as follows:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import iris\n", | ||
"surface_temp = iris.load_cube(iris.sample_data_path('GloSea4', 'ensemble_001.pp'))\n", | ||
"print surface_temp.summary()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"With HoloViews, you can quickly view the data in the cube interactively:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"%%opts GeoImage [colorbar=True] (cmap='viridis')\n", | ||
"(hc.HoloCube(surface_temp).groupby(['time'], group_type=hc.Image) * hc.GeoFeature(cf.COASTLINE))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.11" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Oops, something went wrong.