{"id":4,"date":"2020-05-07T14:06:24","date_gmt":"2020-05-07T14:06:24","guid":{"rendered":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/2020\/05\/07\/introduction\/"},"modified":"2023-01-23T19:01:43","modified_gmt":"2023-01-23T19:01:43","slug":"introduction","status":"publish","type":"front-matter","link":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/front-matter\/introduction\/","title":{"rendered":"Introduction"},"content":{"raw":"This is just an example of a <a href=\"https:\/\/pressbooks.com\">Pressbooks<\/a> book using <a href=\"https:\/\/jupyter.org\">Jupyter Notebook<\/a> to add interactivity to the many great functionalities already available at <a href=\"https:\/\/pressbooks.com\">Pressbooks platform<\/a>, such as reader annotations (<a href=\"https:\/\/web.hypothes.is\">Hypothesis<\/a>) and\u00a0interactive content (<a href=\"https:\/\/h5p.org\">H5P<\/a>).\r\n\r\nThe Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.\r\n\r\nIt is very easy to include Jupyter notebooks in your open textbooks using a <a href=\"https:\/\/www.andrewchallis.co.uk\/portfolio\/php-nbconvert-a-wordpress-plugin-for-jupyter-notebooks\/\">plugin by Andrew Challis<\/a>.\r\n\r\n<hr \/>\r\n\r\n<blockquote><span style=\"text-decoration: underline;\">Note January 2023<\/span>: unfortunately nbviewer now adds extra lines that prevent this plugin from working properly. For that you need to clean up the output file from https:\/\/nbviewer.jupyter.org\/url\/&lt;ipynb githubfilename&gt; in this case <a href=\"https:\/\/nbviewer.org\/github\/Jero2760\/nbconvert\/blob\/master\/Python%20for%20DS\/lecture1.ipynb\">https:\/\/nbviewer.org\/github\/Jero2760\/nbconvert\/blob\/master\/Python%20for%20DS\/lecture1.ipynb<\/a><\/blockquote>\r\n\r\n<hr \/>\r\n\r\nIn this example book, lectures and assignments are provided as interactive Jupyter notebooks. Readers can then study through a lecture notebook and then read the assignment notebook and access it through GitHub to open and run the Jupyter notebook.\r\n<h2>Installation<\/h2>\r\n<ol>\r\n \t<li>Install <a href=\"https:\/\/wppusher.com\/\" rel=\"nofollow\">WP Pusher<\/a> as a plugin in your Pressbooks site by downloading and installing the package from a zip file: go to your Pressbooks dashboard, Network Administrator, and select Plugins -&gt; Add Plugins -&gt; Upload Plugin. Upload your WP Pusher zip file, install it and activate it<\/li>\r\n \t<li>Install the <strong>nbconvert plugin<\/strong> in your Pressbooks site: from the WP Pusher settings, add the nbconvert plugin by typing this uri into the git plugin installer: ghandic\/nbconvert. Go to Network Administrator -&gt; Plugins -&gt; WP Pusher -&gt; Install plugin -&gt; [Repository host: select GitHub] -&gt; [Plugin repository: type ghandic\/nbconvert] -&gt; Install plugin<\/li>\r\n \t<li>Activate the nbconvert plugin for your network<\/li>\r\n \t<li>Customize your book css as needed, since nbconvert.css from the plugin can require some adaptation (in your book go to Appearance -&gt; Custom Styles -&gt; Your Web Styles). My custom styles file is <a href=\"https:\/\/github.com\/Jero2760\/nbconvert\/blob\/master\/css\/my_custom_styles.css\">available here<\/a>.<\/li>\r\n<\/ol>\r\n<h2><a id=\"user-content-how-it-works\" class=\"anchor\" href=\"https:\/\/github.com\/Jero2760\/nbconvert#how-it-works\" aria-hidden=\"true\"><\/a>How it works<\/h2>\r\nSimply add a shortcode and a url to the notebook file into your page editor on Pressbooks, between square brackets:\r\n\r\nnbconvert url=\"https:\/\/github.com\/Jero2760\/nbconvert\/blob\/master\/example1.ipynb\"","rendered":"<p>This is just an example of a <a href=\"https:\/\/pressbooks.com\">Pressbooks<\/a> book using <a href=\"https:\/\/jupyter.org\">Jupyter Notebook<\/a> to add interactivity to the many great functionalities already available at <a href=\"https:\/\/pressbooks.com\">Pressbooks platform<\/a>, such as reader annotations (<a href=\"https:\/\/web.hypothes.is\">Hypothesis<\/a>) and\u00a0interactive content (<a href=\"https:\/\/h5p.org\">H5P<\/a>).<\/p>\n<p>The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.<\/p>\n<p>It is very easy to include Jupyter notebooks in your open textbooks using a <a href=\"https:\/\/www.andrewchallis.co.uk\/portfolio\/php-nbconvert-a-wordpress-plugin-for-jupyter-notebooks\/\">plugin by Andrew Challis<\/a>.<\/p>\n<hr \/>\n<blockquote><p><span style=\"text-decoration: underline;\">Note January 2023<\/span>: unfortunately nbviewer now adds extra lines that prevent this plugin from working properly. For that you need to clean up the output file from https:\/\/nbviewer.jupyter.org\/url\/&lt;ipynb githubfilename&gt; in this case <a href=\"https:\/\/nbviewer.org\/github\/Jero2760\/nbconvert\/blob\/master\/Python%20for%20DS\/lecture1.ipynb\">https:\/\/nbviewer.org\/github\/Jero2760\/nbconvert\/blob\/master\/Python%20for%20DS\/lecture1.ipynb<\/a><\/p><\/blockquote>\n<hr \/>\n<p>In this example book, lectures and assignments are provided as interactive Jupyter notebooks. Readers can then study through a lecture notebook and then read the assignment notebook and access it through GitHub to open and run the Jupyter notebook.<\/p>\n<h2>Installation<\/h2>\n<ol>\n<li>Install <a href=\"https:\/\/wppusher.com\/\" rel=\"nofollow\">WP Pusher<\/a> as a plugin in your Pressbooks site by downloading and installing the package from a zip file: go to your Pressbooks dashboard, Network Administrator, and select Plugins -&gt; Add Plugins -&gt; Upload Plugin. Upload your WP Pusher zip file, install it and activate it<\/li>\n<li>Install the <strong>nbconvert plugin<\/strong> in your Pressbooks site: from the WP Pusher settings, add the nbconvert plugin by typing this uri into the git plugin installer: ghandic\/nbconvert. Go to Network Administrator -&gt; Plugins -&gt; WP Pusher -&gt; Install plugin -&gt; [Repository host: select GitHub] -&gt; [Plugin repository: type ghandic\/nbconvert] -&gt; Install plugin<\/li>\n<li>Activate the nbconvert plugin for your network<\/li>\n<li>Customize your book css as needed, since nbconvert.css from the plugin can require some adaptation (in your book go to Appearance -&gt; Custom Styles -&gt; Your Web Styles). My custom styles file is <a href=\"https:\/\/github.com\/Jero2760\/nbconvert\/blob\/master\/css\/my_custom_styles.css\">available here<\/a>.<\/li>\n<\/ol>\n<h2><a id=\"user-content-how-it-works\" class=\"anchor\" href=\"https:\/\/github.com\/Jero2760\/nbconvert#how-it-works\" aria-hidden=\"true\"><\/a>How it works<\/h2>\n<p>Simply add a shortcode and a url to the notebook file into your page editor on Pressbooks, between square brackets:<\/p>\n<p>nbconvert url=&#8221;https:\/\/github.com\/Jero2760\/nbconvert\/blob\/master\/example1.ipynb&#8221;<\/p>\n","protected":false},"author":1,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"front-matter-type":[12],"contributor":[],"license":[],"class_list":["post-4","front-matter","type-front-matter","status-publish","hentry","front-matter-type-introduction"],"_links":{"self":[{"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter"}],"about":[{"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/wp\/v2\/types\/front-matter"}],"author":[{"embeddable":true,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":6,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter\/4\/revisions"}],"predecessor-version":[{"id":125,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter\/4\/revisions\/125"}],"metadata":[{"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter\/4\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"front-matter-type","embeddable":true,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/pressbooks\/v2\/front-matter-type?post=4"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/wp\/v2\/contributor?post=4"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/www.publiconsulting.com\/wordpress\/pythonfords\/wp-json\/wp\/v2\/license?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}