Slide 1

Slide 1 text

IBM Cloud Data Services Sprinkle some pixiedust on your Jupyter Notebooks Raj Singh, PhD Developer Advocate: Geo | Open Data [email protected] http://ibm.biz/rajrsingh twitter: @rajrsingh

Slide 2

Slide 2 text

@rajrsingh IBM Cloud Data Services Old-school analytics https://writescience.wordpress.com/tag/scientific-method/

Slide 3

Slide 3 text

@rajrsingh IBM Cloud Data Services A browser-based notebook with support for code, text, mathematical expressions, inline plots and other media

Slide 4

Slide 4 text

@rajrsingh IBM Cloud Data Services Jupyter features • Edit code in the browser, with automatic syntax highlighting, indentation, and tab completion/introspection. • Run code from the browser, with the results of computations attached to the code which generated them. • See the results of computations with rich media representations, such as HTML, LaTeX, PNG, SVG, PDF, etc. • Author narrative text using the Markdown markup language. • Javascript widgets, binding interactive UI controls and visualizations to reactive kernel side computations

Slide 5

Slide 5 text

©2016 IBM Corporation IBM Data Science Experience IBM Cloud Data Services makes data simple

Slide 6

Slide 6 text

@rajrsingh IBM Cloud Data Services PixieDust an Open Source Library that simplifies and improves Jupyter Python Notebooks

Slide 7

Slide 7 text

@rajrsingh IBM Cloud Data Services Jupyter + PixieDust 1. PackageManager 2. Visualizations 3. Cloud Integration 4. Scala Bridge 5. Extensibility 6. Embedded Apps https://github.com/ibm-cds-labs/pixiedust

Slide 8

Slide 8 text

@rajrsingh IBM Cloud Data Services 1. Pixiedust Package Manager • Install Spark packages or plain jars in your Notebook Python kernel without the need to modify configuration file Install GraphFrames Spark Package Uses the GraphFrame Python APIs

Slide 9

Slide 9 text

@rajrsingh IBM Cloud Data Services 2. Visualizations Call the Options dialog Performance statistics Panning/Zooming options One simple API: display()

Slide 10

Slide 10 text

@rajrsingh IBM Cloud Data Services 3. Cloud Integration Easily export your data to CSV, JSON, HTML, etc. locally on your laptop or into a cloud-based service like Cloudant or Object Storage

Slide 11

Slide 11 text

@rajrsingh IBM Cloud Data Services 4. Scala Bridge • Execute Scala code directly from your python Notebook %%scala val demo = com.ibm.cds.spark.samples.StreamingTwitter demo.setConfig("twitter4j.oauth.consumerKey",”XXXXX") demo.setConfig("twitter4j.oauth.consumerSecret",”XXXXX") demo.setConfig("twitter4j.oauth.accessToken",”XXXXX") demo.setConfig("twitter4j.oauth.accessTokenSecret",”XXXXX") demo.setConfig("watson.tone.url","https://watsonplatform.net/tone-analyzer/api") demo.setConfig("watson.tone.password",”XXXXX") demo.setConfig("watson.tone.username",”XXXX”) import org.apache.spark.streaming._ demo.startTwitterStreaming(sc, Seconds(10)) pythonVar = “pixiedust” Define Python variable println(pythonVar) Use the python var in Scala val __fromScalaVar = “Hello from Scala” Define scala variable print(__fromScalaVar) Use the scala var in Python

Slide 12

Slide 12 text

@rajrsingh IBM Cloud Data Services 5. Extensibility • Easily extend PixieDust to create your own visualizations using HTML/CSS/JavaScript Customized Visualization for GraphFrame Graphs

Slide 13

Slide 13 text

@rajrsingh IBM Cloud Data Services 6. Embed Apps in Notebooks • Encapsulate your analytics into compelling User Interfaces better suited for Line of Business Users from pixiedust_twitterdemo import * twitterDemo()

Slide 14

Slide 14 text

@rajrsingh IBM Cloud Data Services Graphs in matplotlib

Slide 15

Slide 15 text

@rajrsingh IBM Cloud Data Services demo

Slide 16

Slide 16 text

@rajrsingh IBM Cloud Data Services Spark: display DataFrame

Slide 17

Slide 17 text

@rajrsingh IBM Cloud Data Services Pixiedust: display DataFrame

Slide 18

Slide 18 text

IBM Cloud Data Services Thanks • https://github.com/ibm-cds-labs/pixiedust • Data Science Experience (DSX) • http://datascience.ibm.com/ • IBM Cloud Data Services on Bluemix • http://www.ibm.com/cloud-computing/bluemix/solutions/data-analytics/