Jupyter Notebook Application (AEN 4.1.2)
========================================

.. raw:: html

    <p>The Jupyter Notebook Application allows the creation and editing of
    documents that display the input and output of a Python or R language script.
    Once saved, these files may easily be shared with others.</p>
    <p>NOTE: Python and R language are included by default, and with customization the
    notebooks can run many other kernel/languages.</p>
    <p>Anaconda Enterprise Notebooks 4.1 uses Jupyter notebook 4.2.3,
    plus some extensions to make them even more useful. This includes one-click
    integration with Anaconda Cloud, easy management of conda environments
    and packages from a conda tab within the notebook, easy notebook presentations and more.</p>
    <p><strong>Official Jupyter Notebook user instructions</strong> are located in the <a class="reference external" href="http://jupyter.readthedocs.org/en/latest/">Jupyter documentation</a>.</p>
    <p>This page includes a brief introduction to Jupyter Notebooks for AEN users, and information
    on using the notebook extensions included in AEN.</p>
    <p><img alt="image1" src="../../../_images/ae-notebooks/4.1.2/user/finding-jupyter.png" /></p>
    <p>To open the Jupyter Notebook application, from your user home page, select the project you want to manage. On the project&#8217;s home page, click the Jupyter Notebooks icon.</p>
    <p>This brings you to the Jupyter Notebooks Files tab:</p>
    <p><img alt="image0" src="../../../_images/ae-notebooks/4.1.2/user/jupyter_main41.png" /></p>
    <p>TIP: You can see and manage the same file list in the Terminal, Workbench, and Viewer apps.</p>
    <ul class="simple">
    <li><strong>Test a sample notebook</strong>. The examples folder contains several types of notebook examples in Python and one in R language. Open any example notebook to play with it and see how it works.</li>
    <li><strong>Create a new notebook</strong>. From the Files tab, create a new notebook by clicking the top right New button, then select the kernel you want to use. When you create the project, customizable Python and R Language kernel environments are automatically created for you.</li>
    </ul>
    <p>Which kernel should I select for my new notebook?</p>
    <p><img alt="image14" src="../../../_images/ae-notebooks/4.1.2/user/kernel-menu41.png" /></p>
    <ul class="simple">
    <li>Your project&#8217;s default &#8220;conda env&#8221; kernels are a cloned copy of the root environment. You can customize them, install and delete additional packages.</li>
    <li>Root is managed by your Administrator. You cannot make any changes to it.</li>
    <li>You will be able to switch between Python, R language and any other custom kernels in the notebook as you work in your notebook. See &#8220;Synchronize Environments&#8221; below.</li>
    </ul>
    <p>NOTE: By default, your new Jupyter Notebook is saved in the related project directory.</p>
    <div class="section" id="notebook-extensions">
    <h2>Notebook Extensions<a class="headerlink" href="#notebook-extensions" title="Permalink to this headline">¶</a></h2>
    <p>Extensions included in Anaconda Enterprise Jupyter Notebooks include:</p>
    <ul class="simple">
    <li><strong>Synchronize Environments</strong> with Jupyter from top Kernel menu</li>
    <li><strong>Locking</strong> multi-user capability from top menu Lock button</li>
    <li><strong>Revision Control Mechanism (RCM)</strong> adds top menu buttons Status, Checkout and Commit</li>
    <li><strong>Conda</strong> environment and package management tab</li>
    <li><strong>Conda notebook</strong> conda management inside notebook from Kernel - Conda Packages menu</li>
    <li><strong>Anaconda Cloud</strong> integration from top menu Publish to cloud button</li>
    <li><strong>Notebook Present</strong> Turns your notebook into a PowerPoint-style presentation.</li>
    </ul>
    <p>These extensions are all detailed below.</p>
    <div class="section" id="synchronize-environments">
    <h3>Synchronize environments<a class="headerlink" href="#synchronize-environments" title="Permalink to this headline">¶</a></h3>
    <p>You can change Python, R language and any other custom language environments inside a unique notebook session, without the need to start up several instances using each of your selected environments. To change environments, from the top menu bar, select Kernel, then Change kernel, and select Python [default] or R [default].</p>
    <p><img alt="image6" src="../../../_images/ae-notebooks/4.1.2/user/extensions_kernels41.png" /></p>
    <p>NOTE: In Anaconda Enterprise Notebooks 4.1, the default kernel for projects is <code class="docutils literal"><span class="pre">default</span></code>. In versions prior to 4.0, the default kernel for projects was root Python.</p>
    </div>
    <div class="section" id="locking">
    <h3>Locking<a class="headerlink" href="#locking" title="Permalink to this headline">¶</a></h3>
    <p>The multi-user capability in the Anaconda Enterprise Notebooks Enterprise experience is engaged when multiple users work in the same notebook file. The notebook is &#8220;locked&#8221; on opening. If other users later open and try to save the notebook with their own changes, their save capability will be disabled, and they can not overwrite the locked notebook. To override this, they must actively take the lock by clicking the &#8220;lock&#8221; icon in the notebook toolbar:</p>
    <p><img alt="image7" src="../../../_images/ae-notebooks/4.1.2/user/extensions_locker.png" /></p>
    <p>NOTE: This is a &#8220;soft locking model&#8221; so a team member can choose to override a lock to save their work. If you have given team members write access to your files, they should unlock your file only to perform only meaningful (non-destructive) team contributions.</p>
    </div>
    </div>
    <div class="section" id="revision-control-mechanism-rcm">
    <span id="revision-control-mechanism"></span><h2>Revision Control Mechanism (RCM)<a class="headerlink" href="#revision-control-mechanism-rcm" title="Permalink to this headline">¶</a></h2>
    <p>The RCM Notebook Extension is simple version control for Jupyter notebook files. It is a notebook extension that uses the internal Jupyter machinery to perform its tasks.</p>
    <p>On the surface it is a simple &#8220;linear&#8221; model, but under the hood is a more complex git-based branched model. It is a model with &#8220;the latest wins&#8221; as its main &#8220;merging&#8221; strategy, so by design there are no merge conflicts.</p>
    <p>The RCM Notebook Extension adds 3 buttons:</p>
    <p><img alt="image8" src="../../../_images/ae-notebooks/4.1.2/user/extensions_rcm.png" /></p>
    <ul class="simple">
    <li><strong>Status button</strong>: See what revision you are on.</li>
    <li><strong>Checkout button</strong>: View a list of the previous revision points, check out a previous revision or compare differences between revisions.</li>
    <li><strong>Commit button</strong>: Commit the current changes.</li>
    </ul>
    <p><img alt="image9" src="../../../_images/ae-notebooks/4.1.2/user/extensions_rcm_status.png" /></p>
    <p>TIP: If you do not see the RCM buttons, please see &#8220;First time setting up RCM&#8221; below.</p>
    <ul class="simple">
    <li>STATUS: After clicking the Status button, the following window appears:</li>
    </ul>
    <p><img alt="image9" src="../../../_images/ae-notebooks/4.1.2/user/extensions_rcm_status.png" /></p>
    <ul class="simple">
    <li><strong>CHECKOUT</strong>: After clicking the Checkout button, the following window appears:</li>
    </ul>
    <p><img alt="image10" src="../../../_images/ae-notebooks/4.1.2/user/extensions_rcm_checkout.png" /></p>
    <blockquote>
    <div><ul class="simple">
    <li><strong>Checkout a previous revision point</strong>. Check the checkbox of the
    desired revision point and press the &#8220;OK&#8221; button. This will open
    a copy of the notebook at the selected revision point. If you have
    not saved your current window, checking out a previous revision
    will destroy it. If in doubt, click Cancel, save your work, then
    revert to a previous revision point.</li>
    <li><strong>Make a diff comparison</strong>. Compare two previous revision points
    by checking the checkboxes and clicking the &#8220;View Diff&#8221; button.</li>
    <li><strong>Cancel</strong> to close the current modal window.</li>
    </ul>
    </div></blockquote>
    <ul class="simple">
    <li>COMMIT: Save or persist the changes. This keeps a permanent record of
    the changes introduced so you don&#8217;t have to worry about losing data
    or information. You can &#8220;roll back&#8221; at any time by checking out a
    previous version you have committed. After clicking the Commit button,
    the following window appears:</li>
    </ul>
    <p><img alt="image11" src="../../../_images/ae-notebooks/4.1.2/user/extensions_rcm_commit.png" /></p>
    <p>Enter a description of this commit to remind you if you need to revert
    back to it later. Click the OK button when finished.</p>
    <p><strong>First time setting up RCM</strong></p>
    <p>If you do not see the RCM buttons in your notebook, go to the project home page and open the Terminal app.</p>
    <p>In the terminal run these commands:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">config</span> <span class="o">--</span><span class="k">global</span> <span class="n">user</span><span class="o">.</span><span class="n">email</span> <span class="s2">&quot;you@example.com&quot;</span>
    <span class="n">git</span> <span class="n">config</span> <span class="o">--</span><span class="k">global</span> <span class="n">user</span><span class="o">.</span><span class="n">name</span> <span class="s2">&quot;Your Name&quot;</span>
    </pre></div>
    </div>
    <p>NOTE: Change &#8220;<a class="reference external" href="mailto:you&#37;&#52;&#48;example&#46;com">you<span>&#64;</span>example<span>&#46;</span>com</a>&#8221; to your email address, and &#8220;Your Name&#8221; to your actual name.</p>
    <p>Now open Jupyter Notebook again and refresh, and you will see the RCM buttons.</p>
    </div>
    <div class="section" id="conda-integration">
    <span id="aen-conda-integration"></span><h2>Conda integration<a class="headerlink" href="#conda-integration" title="Permalink to this headline">¶</a></h2>
    <p>The NBConda extension adds a Conda tab to the notebook for easy
    environment and package management from within the notebook:</p>
    <p><img alt="image12" src="../../../_images/ae-notebooks/4.1.2/user/extensions_conda.png" /></p>
    <p>Click the Conda tab in a notebook to display:</p>
    <ul class="simple">
    <li><strong>Conda environments list</strong>. Also export, clone or delete an environment
    in the action column, or create a new environment by clicking the &#8220;+&#8221; icon.
    Switch to an environment by clicking it; packages for that
    environment are displayed below in the installed packages list.</li>
    <li><strong>Conda available packages list</strong> for the selected environment
    in currently configured channels, search for packages and click a package
    name to install it.</li>
    <li><strong>Installed packages list</strong> in the selected environment, check for updates, update
    or delete selected packages.</li>
    </ul>
    <p>TIP: While you are in any notebook, you can jump to this same conda extension for
    the current environment by selecting Kernel -&gt; Conda Packages:</p>
    <p><img alt="image13" src="../../../_images/ae-notebooks/4.1.2/user/extensions_anacondacloud.png" /></p>
    <div class="section" id="conda-in-notebook-view">
    <h3>Conda in Notebook view<a class="headerlink" href="#conda-in-notebook-view" title="Permalink to this headline">¶</a></h3>
    <p>This extension adds a Conda Packages item to the Kernel menu. Selecting
    this item displays the list of Conda packages in the environment
    associated with the running kernel, and the list of available packages.
    You can perform the same actions as in the Conda tab, but only against
    the current environment.</p>
    </div>
    </div>
    <div class="section" id="anaconda-cloud-integration">
    <h2>Anaconda Cloud integration<a class="headerlink" href="#anaconda-cloud-integration" title="Permalink to this headline">¶</a></h2>
    <p>You can now easily upload your notebook to Anaconda Cloud with a simple
    button at the notebook UI:</p>
    <p><img alt="image13" src="../../../_images/ae-notebooks/4.1.2/user/extensions_anacondacloud.png" /></p>
    </div>
    <div class="section" id="notebook-present">
    <h2>Notebook Present<a class="headerlink" href="#notebook-present" title="Permalink to this headline">¶</a></h2>
    <p>Turns your notebook into a PowerPoint-style presentation.</p>
    </div>
    </div>
    <div class="section" id="id1">
    <h1>1. Notebook Present<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
    <p>Turns your notebook into a PowerPoint-style presentation. Two new
    buttons are visible in your top menu bar: Edit Presentation, and Show
    Presentation:</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-present1.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-present1.png" />
    <p>To begin using Notebook Present, click the Edit Presentation button.
    A black bar with several menu items appears on the right side of your
    browser. As you click each icon, the menu and layout of your screen
    changes.</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-present2.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-present2.png" />
    <p>Click the Help icon to view three quick tours of the main features of
    Notebook Present. The tours are: Intro Tour, Slides Tour, and Editor
    Tour.</p>
    <p><strong>Intro tour</strong></p>
    <p>Click Help - Intro to see a 2-minute presentation on how to use all
    of the main features. Every button is explained, and you can pause,
    go back to the previous slide, or the next slide. Here is a summary
    of the presentation.</p>
    <p>App Bar: When Authoring, you control the content and style of your
    presentation. It also activates several special editing keyboard
    shortcuts:</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-shortcuts.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-shortcuts.png" />
    <p>Stop Authoring: Clicking the Edit Presentation button again stops
    Authoring, and removes all keyboard shortcuts.</p>
    <p>Show Presentation: If you just want to run your presentation without
    using any Authoring tools, just click the Show Presentation button.</p>
    <p>Presenting/Authoring: Once you&#8217;ve made some slides, start Presenting,
    where you can use most Notebook functions with the Theme we have defined,
    as well as customize slides on the fly.</p>
    <p>Slides button: Slides, made of Regions linked to Cell Parts are the bread
    and butter of any presentation, and can be imported, created, linked,
    reordered, and edited here.</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-slides1.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-slides1.png" />
    <p>Theming: Theming lets you select from existing colors, typography, and
    backgrounds to make distinctive presentations. The first theme you
    select will become the default, while you can choose custom themes for
    a particular slide, like a title.</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-themes.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-themes.png" />
    <p>Saving: Whenever you save your Notebook, all your presentation data will
    be stored right in the Notebook .ipynb file.</p>
    <p>Downloading: After you&#8217;ve made a presentation, you can download it as an
    HTML page by choosing Download → Download As: Presentation (.html) in the
    menu.</p>
    <p>Help: Activate Help at any time to try other tours, connect with the
    Present developers and community, and other information.</p>
    <p><strong>Using slides</strong></p>
    <p>From the Help menu, clicking Slides brings up the following 2-minute
    presentation on how to create and manage slides:</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/user/nb-ext-slides2.png" src="../../../_images/ae-notebooks/4.1.2/user/nb-ext-slides2.png" />
    <p>Slides make up a presentation. Clicking Slides toggles the sorter
    view and the Slide Toolbar.</p>
    <p>Slide Toolbar: Let&#8217;s create a new slide. Clicking the + Slide will
    offer some choices for creating your new slide.</p>
    <p>Import: The quickest way to a presentation is to just import every
    complete cell as a slide. If you&#8217;ve already created slides with the
    official slideshow cell toolbar or RISE, you can import most of the
    content.</p>
    <p>Template Library: You can also pick from some existing templates...</p>
    <p>Reuse Slide as Template: Or copy an existing slide.</p>
    <p>Simple Template: A common template is the Quad Chart, with four pieces
    of content arranged in a grid.</p>
    <p>Region: The Quad Chart has four Regions. Select a region by clicking
    it.</p>
    <p>Linking a Region to a Cell Part: Each Region can be linked to a single
    Cell Part</p>
    <p>Link Overlay: The Link Overlay shows all of the parts available</p>
    <p>Cell Part: Source (blue): Source, such as code and Markdown text</p>
    <p>Cell Part: Outputs (red): Outputs, such as rich figures and script
    results</p>
    <p>Cell Part: Widgets (purple): Jupyter widgets, interactive widgets
    that provide both visualization and user input.</p>
    <p>Cell Part: Whole (orange): Finally, a Whole Cell (including its
    Source, Widgets, and Outputs) can be linked to a single region</p>
    <p>Part Thumbnail: We&#8217;ll try to draw a part thumbnail. It can only
    be reliably updated when a linked Cell Part is on-screen when you
    mouse over it, but you should usually be able to get an idea of what
    you&#8217;re seeing. The colors of the regions correspond to the cell types.</p>
    <p>Cell Part: Unlinking: Unlinking removes the connection between a
    region and a cell part, without deleting either one.</p>
    <p>Region: Trashing: Trashing a Region permanently deletes it, without
    affecting any linked Cell Part</p>
    <p>Presenting: Clicking the Present button while editing brings up the
    Presenter with editing mode still enabled:</p>
    <p>It&#8217;s still a Notebook: Linked inputs and widgets are still interactive.</p>
    <p>Go forward: Click to go to the next slide</p>
    <p>Go back: Click to go back to the previous slide</p>
    <p>Go back to the beginning: Click here to go back to the first slide</p>
    <p>My work is done here: Click to go back to the Notebook.</p>
    <p><strong>Using the editor</strong></p>
    <p>When you click Help - Editor, you see the following 2-minute presentation
    on editing your notebook:</p>
    <p>So You Made Some Slides: Once you&#8217;ve made a few slides, you&#8217;ll likely need
    to customize them</p>
    <p>Editing Slides: Once you have selected a slide, you can activate the Slide
    Editor by double-clicking the slide, or clicking Edit Slide.</p>
    <p>Region Editor: This is the Region editor. You can click and drag Regions
    around and resize them.</p>
    <p>Region Tree: This is the Region tree. It lets you reorder Regions and see
    the details of how your Regions will show their linked Parts.</p>
    <p>Add Region: You can add new regions</p>
    <p>Attribute Editor: All of the properties of a region can be edited here</p>
    <p>Data Layouts: In addition to manually moving regions around, you can use
    other Layouts, like this Treemap, which will fill the slide:</p>
    <p>More Regions: More regions will be added with a weight of 1</p>
    <p>Tree Weight: This new value lets you make a Region bigger or smaller
    based on relative Weight</p>
    <p>12 Grid: The Grid is a compromise between Free layout and Treemap layout,
    and rounds all the values to a factor of 12.</p>
