Skip to content

Commit

Permalink
Continued polish for SciPy tutorial (#197)
Browse files Browse the repository at this point in the history
* Further tweaks to most notebooks
* Added freeform exercise
* Flakes fixes
* Updated the inline exercise style in Custom Interactivity
* Fixed error in environment.yml channel spec
* Removed remaining WIP banners
* Clarified nature of hvplot output and mentioned projecting with geoviews
* Improvements to the Building a Dashboard exercise
* Completely reworked the Plotting exercise notebook
* Renamed tutorial sections consistently
* Fixed headers
* Cleaned up exercises
  • Loading branch information
jlstevens authored and jbednar committed Jul 8, 2019
1 parent 80fe20c commit bddb488
Show file tree
Hide file tree
Showing 14 changed files with 815 additions and 249 deletions.
10 changes: 5 additions & 5 deletions doc/tutorial/index.rst
Expand Up @@ -11,10 +11,10 @@ HoloViz Tutorial

Setup <Setup>
Overview <Overview>
Introduction to Panel <Introduction_to_Panel>
Adding Interactivity to Panel <Panel_Interactivity>
Using .plot <Using_.plot>
Composing Holoviews Plots <Composing_Holoviews_Plots>
Custom Interactivity <Custom_Interactivity>
Building Panels <Building_Panels>
Interlinked Panels <Interlinked_Panels>
Basic Plotting <Basic_Plotting>
Composing Plots <Composing_Plots>
Interlinked Plots <Interlinked_Plots>
Large Data <Large_Data>
Advanced Dashboards <Advanced_Dashboards>
2 changes: 1 addition & 1 deletion examples/environment.yml
@@ -1,6 +1,6 @@
name: holoviz-tutorial
channels:
- holoviz
- pyviz
- defaults
dependencies:
- bokeh ==1.2.0
Expand Down
8 changes: 5 additions & 3 deletions examples/tutorial/01_Overview.ipynb
Expand Up @@ -124,7 +124,7 @@
"\n",
"<br><br>\n",
"<br><br>\n",
"These tools are the most fully supported and are often all that many people will need.\n",
"These tools are the most fully supported and are often entirely sufficient on their own.\n",
"<br><br>\n",
"</div>\n",
"<div style=\"clear:left;\"></div>"
Expand All @@ -136,7 +136,7 @@
"source": [
"## HoloViz libraries\n",
"\n",
"<img height=\"148\" width=\"800\" src=\"../assets/pn_hp_hv_gv_ds_pa_cs.png\"/>\n",
"<img width=\"800\" src=\"../assets/pn_hp_hv_gv_ds_pa_cs.png\"/>\n",
"\n",
"To address the above issues, we have developed a set of open-source\n",
"Python packages to streamline the process of working with small and\n",
Expand Down Expand Up @@ -184,7 +184,9 @@
"* make simple but powerful plots out of Pandas dataframes and Xarray multidimensional arrays\n",
"* handle columnar data, big data, geo data, array data\n",
"* provide custom interactive links between views of datasets\n",
"* handle the whole process from getting the data in, cleaning it, exploring it visually, creating plots for communication, building dashboards for sharing your analyses, and deploying dashboards."
"* handle the whole process from getting the data in, cleaning it, exploring it visually, creating plots for communication, building dashboards for sharing your analyses, and deploying dashboards.\n",
"\n",
"The tutorial is organized around the most general to the most specific, in terms of tool support. We first look at [Panel](https://panel.pyviz.org) package, which works with nearly any plotting library, then [hvPlot](https://hvplot.pyviz.org), which works with nearly any data library and shares an API with many other plotting libraries, and then dive deeper into HoloViz-specific approaches that let you work with large data, provide deep interactivity, and other advanced features."
]
},
{
Expand Down
Expand Up @@ -6,25 +6,25 @@
"source": [
"<style>div.container { width: 100% }</style>\n",
"<img style=\"float:left; vertical-align:text-bottom;\" height=\"65\" width=\"172\" src=\"../assets/holoviz-logo-unstacked.svg\" />\n",
"<div style=\"float:right; vertical-align:text-bottom;\"><h2>Tutorial 2: Introduction to Panel</h2></div>"
"<div style=\"float:right; vertical-align:text-bottom;\"><h2>Tutorial 2: Building Panels</h2></div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"../assets/panel.png\" width=150>\n",
"<a href=\"https://panel.pyviz.org\"><img src=\"../assets/panel.png\" width=150></a>\n",
"\n",
"Panel allows you to build interactive apps and dashboards in the notebook and then deploy them as a separate server. One of the main aims behind Panel is to allow you to lay out and add interactive controls to many of objects you are used to working with in the PyData ecosystem. This ability to a) deploy dashboards straight from your notebook and b) display all the plots and objects you are used to working with allows it to plug easily into your existing workflows and build interactive components and dashboards you can share with colleagues or outside of your organization.\n",
"Panel is designed to make it simple to add interactive controls to your existing plots and data displays, simple to build apps for your own use in a notebook, simple to deploy apps as standalone dashboards to share with colleagues, and seamlessly shift back and forth between each of these tasks as your needs evolve. If there is one thing you should take away from this tutorial, it's Panel!\n",
"\n",
"In this section of the tutorial we will get you familiarized with the three main types of components, to get you started on displaying objects with Panel, laying them out, and then connecting them to interactive widgets to build simple apps. Finally we will take you through an exercise to build a simple dashboard from a number of existing components.\n",
"In this section of the tutorial we will get you familiarized with the three main types of components in Panel, to get you started on displaying objects, laying them out, and then connecting them to interactive widgets to build simple apps. Finally we will take you through an exercise to build a simple dashboard from a number of existing components. For now, we won't show code for any particular plotting library, but if you have a favorite one already, you should be able to use it with Panel in the exercises.\n",
"\n",
"## Component types\n",
"\n",
"Before we start building interactive apps with Panel we will learn about the three main types of components in Panel:\n",
"Before we start building interactive apps, we will learn about the three main types of components in Panel:\n",
"\n",
"* **Pane**: A Pane provides a view of an external object (e.g. text, images, plots etc.) by wrapping it\n",
"* **Panel**: A Panel lays out multiple components in a row, column or grid.\n",
"* **Pane**: A Pane provides a view of an external object (text, image, plot, etc.) by wrapping it\n",
"* **Panel**: A Panel lays out multiple components in a row, column, or grid.\n",
"* **Widget**: A Widget provides input controls to add interactive features to your Panel.\n",
"\n",
"If you ever want to discover how a particular component works, see the [reference gallery](https://panel.pyviz.org/reference/index.html).\n",
Expand Down Expand Up @@ -83,7 +83,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Panel transformed the `str` object and wrapped it in a so-called `Markdown` `Pane`. The ``pn.panel`` function attempts to find the most appropriate representation for different objects whether it is a string, an image, or even a plot. So if we provide the location of a PNG file instead, the ``panel`` function will automatically infer that it should be rendered as an image:"
"Panel transformed the `str` object and wrapped it in a so-called `Markdown` `Pane`. The ``pn.panel`` function attempts to find the most appropriate representation for different objects whether it is a string, an image, or even a plot. So if we provide the location of a PNG file instead as a path or a URL, the ``panel`` function will automatically infer that it should be rendered as an image:"
]
},
{
Expand Down Expand Up @@ -151,7 +151,7 @@
"source": [
"## Laying out content\n",
"\n",
"In addition to `Pane` objects Panel provides `Panel` objects which allow laying out components. The principal layouts are by ``Row`` or ``Column``. These components act just like a regular ``list`` in Python:"
"In addition to `Pane` objects, Panel provides `Panel` objects that allow laying out components. The principal layouts are by ``Row`` or ``Column``. These components act just like a regular ``list`` in Python:"
]
},
{
Expand All @@ -169,7 +169,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Panels may be nested arbitrarily to construct complex layouts. Internally, Panel will call the ``pn.panel`` function on any objects which are not already a known component type, making it easy to lay out objects without explicitly wrapping them in a panel component, but wrapping it explicitly allows passing arguments such as `width=500`:"
"Panels may be nested arbitrarily to construct complex layouts. Internally, Panel will call the ``pn.panel`` function on any objects which are not already a known component type, making it easy to lay out objects without explicitly wrapping them in a panel component, though wrapping it explicitly can help ensure that it is the type you expect:"
]
},
{
Expand Down Expand Up @@ -199,7 +199,7 @@
"source": [
"#### Exercise\n",
"\n",
"Use ``Row`` and ``Column`` panels to lay out the objects (text, images, or plots) you rendered in the previous exercise."
"Use ``Row`` and ``Column`` panels to lay out some of the objects (text, images, or plots) you rendered in the previous exercise."
]
},
{
Expand Down Expand Up @@ -277,7 +277,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As we discussed above ``Row`` and ``Column`` Panels behave much like lists. Just like lists we can use all the standard methods such as ``append``, ``pop``, ``remove`` or even setting to modify them. E.g. we could dynamically add a caption for the logo:"
"As we discussed above ``Row`` and ``Column`` Panels behave much like lists. Just like lists, we can use ``append``, ``pop``, ``remove``, and all the other standard methods (including setting with =) to modify them. E.g. we could dynamically add a caption for the logo:"
]
},
{
Expand Down Expand Up @@ -352,7 +352,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Once you are happy with the app or dashboard you have built you can annotate it with ``.servable()``. In the notebook, this annotation has no effect, but it will later indicate to the ``panel serve`` command that you want this particular component to be served. If you then go to the commandline and run ``panel serve 02_Introduction_to_Panel.ipynb``, the code cells in the notebook will be executed and the resulting dashboard will be served."
"Once you are happy with the app or dashboard you have built you can annotate it with ``.servable()``. In the notebook, this annotation has no effect, but it will later indicate to the ``panel serve`` command that you want this particular component to be served. If you then go to the command line and run ``panel serve 02_Introduction_to_Panel.ipynb``, the code cells in the notebook will be executed and the resulting dashboard will be available as a web server."
]
},
{
Expand Down

0 comments on commit bddb488

Please sign in to comment.