{"id":6093,"date":"2020-10-13T16:36:51","date_gmt":"2020-10-13T15:36:51","guid":{"rendered":"https:\/\/www.blopig.com\/blog\/?p=6093"},"modified":"2020-10-14T17:33:49","modified_gmt":"2020-10-14T16:33:49","slug":"from-jupyter-to-slides-using-rise","status":"publish","type":"post","link":"https:\/\/www.blopig.com\/blog\/2020\/10\/from-jupyter-to-slides-using-rise\/","title":{"rendered":"From Jupyter to Slides using RISE"},"content":{"rendered":"\n<p>In preparation for remote teaching this year, I&#8217;ve spent the last few weeks converting the Doctoral Training Centre&#8217;s &#8216;Introduction to Computer Programming&#8217; course into a series of Jupyter notebooks so that the course can be run entirely using Google Colaboratory.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>In addition to running the practicals online, we&#8217;re also recording all of the lectures ahead of time so that students can watch (and re-watch) as they go. Having just written lots of notebooks, my immediate thoughts were &#8216;wouldn&#8217;t it be nice if I could just turn a notebook into a set of slides?&#8217;. Well, it turns out that you can, and using the Jupyter notebook extension &#8216;RISE&#8217;, it&#8217;s quick and easy. Here&#8217;s how it&#8217;s done.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install RISE<\/h2>\n\n\n\n<p>RISE is available through PIP or Conda:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install RISE<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>conda install -c conda-forge rise<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Make slides<\/h2>\n\n\n\n<p>Once RISE is installed, open a Jupyter notebook. Under View -&gt; Cell Toolbar, there will be a new &#8216;Slideshow&#8217; option.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"625\" height=\"203\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?resize=625%2C203&#038;ssl=1\" alt=\"\" class=\"wp-image-6126\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?resize=1024%2C332&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?resize=300%2C97&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?resize=768%2C249&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?resize=624%2C202&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_toolbar.png?w=1178&amp;ssl=1 1178w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>Enabling this will add add the option to set a slide type to each notebook cell. For example, here I&#8217;m working on a notebook to use for a lecture on data structures in python. In the first cell, I specify the width of my slides, but I don&#8217;t want this to be displayed as a slide, so I can set it to &#8216;notes&#8217; or &#8216;skip&#8217;. The second cell is my title slide, made using markdown. The third cell contains some text for a slide, entered using markdown. I also want to display the contents of the fourth cell, a python code cell, on the same slide, so I make it a &#8216;fragment&#8217;. This adds it to the same slide as the previous cell.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"625\" height=\"511\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?resize=625%2C511&#038;ssl=1\" alt=\"\" class=\"wp-image-6127\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?resize=1024%2C838&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?resize=300%2C246&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?resize=768%2C629&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?resize=624%2C511&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_code.png?w=1152&amp;ssl=1 1152w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>Finally, clicking the &#8216;Enter\/Exit RISE slideshow&#8217; icon on the notebook toolbar will render your notebook as a deck of slides in your browser. Here&#8217;s how my slide and fragment look:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"625\" height=\"317\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=625%2C317&#038;ssl=1\" alt=\"\" class=\"wp-image-6128\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=1024%2C520&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=300%2C152&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=768%2C390&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=1536%2C781&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?resize=624%2C317&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?w=1842&amp;ssl=1 1842w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2020\/10\/rise_slide.png?w=1250&amp;ssl=1 1250w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>Hopefully this will be useful to anybody who, like me is scrambling to create online lectures!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In preparation for remote teaching this year, I&#8217;ve spent the last few weeks converting the Doctoral Training Centre&#8217;s &#8216;Introduction to Computer Programming&#8217; course into a series of Jupyter notebooks so that the course can be run entirely using Google Colaboratory.<\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","wikipediapreview_detectlinks":true,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29,296,14,227,15],"tags":[],"ppma_author":[498],"class_list":["post-6093","post","type-post","status-publish","format-standard","hentry","category-code","category-hints-and-tips","category-howto","category-python-code","category-technical"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"authors":[{"term_id":498,"user_id":47,"is_guest":0,"slug":"fergus","display_name":"Fergus Boyles","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/ba8c419ba77128aad589b66ba7ee13da74f4ce2d3108fd724ddcefa200b51c7b?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/6093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/comments?post=6093"}],"version-history":[{"count":3,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/6093\/revisions"}],"predecessor-version":[{"id":6137,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/6093\/revisions\/6137"}],"wp:attachment":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/media?parent=6093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/categories?post=6093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/tags?post=6093"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=6093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}