Python 8. Jupyter Notebook

There is an interactive tutorial here running Python. This instance is running from another website so could be slow.

I found this video extremely good for setting up (I used the pip install method not anaconda) and how to use it.

The Jupyter Notebook

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.

  1. Language of choice.The Notebook has support for over 40 programming languages, including Python, R, Julia, and Scala.
  2. Share notebooks. Notebooks can be shared with others using email, Dropbox, GitHub and the Jupyter Notebook Viewer.
  3. Interactive output. Your code can produce rich, interactive output: HTML, images, videos, LaTeX, and custom MIME types.
  4. Big data integration. Leverage big data tools, such as Apache Spark, from Python, R and Scala. Explore that same data with pandas, scikit-learn, ggplot2, TensorFlow.

 Item 4 is a bit beyond my ken at the moment but the other three items are really useful.

I think I sort of dismissed it initially because I thought it was running over the internet so could potentially be slow based on your connection, that is why I didn’t look into it further earlier. A shame as it looks like a brilliant tool.

After installing it runs within your browser on a localhost server on your computer, so should be pretty fast.

The other thing I like is that you can:

  1. Write a story in Markdown to give an explanation of what you are trying to do, Markdown is a simplified version of HTML and can convert to HTML.
  2. it  shows pandas data-frames as tables
  3. it shows graphic outputs, and even some interactive outputs.

so great for doing an “explain page” on the web for your process.

An example

 

I am trying to explore Python Dashboards and I am  interested in BOKEH. I wanted to test the example half way down this page. Although it is in a Jupyter Notebook, I wanted to run it on my PC, so I cut the 3 blocks of code out and pasted them into a Jupyter Notebook I have running on my PC and output is on linked page here.

There is an interactive Chart (Widget?) at the bottom with adjustable sliders. So although the page is saved as an HTML  file it is still interactive. (Note, chart at bottom takes a little while to generate).

Zeppelin Notebook

I was looking at the Data Science and Cognitive Computing Courses website that has free courses on Data Science and also a free lab area for learning/testing/exploring and it had the Jupyter Notebook & the Zeppelin Notebook too.

The Zeppelin notebook runs on an apache spark local server.

I have not done any exploring with this yet as I want to practice a bit with the Jupyter Notebook first.

Th also have  Seahorse, Visual Spark, that seems to be a visual programming language like Grasshopper & DynamoBIM & Knime. This seems to run only in CHROME, and not in Firefox which I normally use. I may explore using this later too, although if you are doing the coding the visual coding is just another dimension to add to the fiddle factor.

Add a Comment