All Projects → IBM → nodejs-in-notebooks

IBM / nodejs-in-notebooks

Licence: Apache-2.0 License
Run Node.js code in Python notebooks

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to nodejs-in-notebooks

notebooks
Collection of (unfinished) notebooks
Stars: ✭ 13 (-87.74%)
Mutual labels:  jupyter
docker-stacks
Ready-to-run Docker images containing Jupyter applications
Stars: ✭ 6,573 (+6100.94%)
Mutual labels:  jupyter
hoomd-examples
HOOMD-blue example scripts.
Stars: ✭ 15 (-85.85%)
Mutual labels:  jupyter
MGT-python
Musical Gestures Toolbox for Python
Stars: ✭ 25 (-76.42%)
Mutual labels:  jupyter
perfume
Interactive performance benchmarking in Jupyter
Stars: ✭ 33 (-68.87%)
Mutual labels:  jupyter
heroku-jupyterlab
An example of running JupyterLab on Heroku, with Amazon S3.
Stars: ✭ 54 (-49.06%)
Mutual labels:  jupyter
jupyter rfb
Remote Frame Buffer for Jupyter
Stars: ✭ 21 (-80.19%)
Mutual labels:  jupyter
covid-19-community
Community effort to build a Neo4j Knowledge Graph (KG) that links heterogeneous data about COVID-19
Stars: ✭ 95 (-10.38%)
Mutual labels:  jupyter
ipylab
Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍
Stars: ✭ 101 (-4.72%)
Mutual labels:  jupyter
pc guidelines
Guidelines for using IvLabs PC. General instructions for maintaining and using any PC/laptop while using Ubuntu for Robotics/DL/RL research.
Stars: ✭ 23 (-78.3%)
Mutual labels:  jupyter
jupyter-venv
Jupyter Notebooks and Virtual Environments
Stars: ✭ 20 (-81.13%)
Mutual labels:  jupyter
imongo
A MongoDB kernel for Jupyter
Stars: ✭ 51 (-51.89%)
Mutual labels:  jupyter
get-started-with-JAX
The purpose of this repo is to make it easy to get started with JAX, Flax, and Haiku. It contains my "Machine Learning with JAX" series of tutorials (YouTube videos and Jupyter Notebooks) as well as the content I found useful while learning about the JAX ecosystem.
Stars: ✭ 229 (+116.04%)
Mutual labels:  jupyter
ko data science docker
데이터 분석 모델링용 도커 이미지
Stars: ✭ 14 (-86.79%)
Mutual labels:  jupyter
R-in-Jupyter-with-Binder
Example of how to use R in Jupyter notebooks and make compatible with Binder
Stars: ✭ 17 (-83.96%)
Mutual labels:  jupyter
keras-adversarial-autoencoders
Experiments with Adversarial Autoencoders using Keras
Stars: ✭ 20 (-81.13%)
Mutual labels:  jupyter
hugo jupyter
Publish Jupyter notebooks with Hugo
Stars: ✭ 69 (-34.91%)
Mutual labels:  jupyter
clustergrammer2-notebooks
Examples using Clustergrammer2 to explore high-dimensional datasets.
Stars: ✭ 35 (-66.98%)
Mutual labels:  jupyter
sage-binder-env
A SageMath-based computing environment for binder
Stars: ✭ 17 (-83.96%)
Mutual labels:  jupyter
visium-clustergrammer2
Spatial Transcriptomics Dashboard
Stars: ✭ 24 (-77.36%)
Mutual labels:  jupyter

Run Node.js code in Jupyter notebooks

Notebooks are where data scientists process, analyse, and visualise data in an iterative, collaborative environment. They typically run environments for languages like Python, R, and Scala. For years, data science notebooks have served academics and research scientists as a scratchpad for writing code, refining algorithms, and sharing and proving their work. Today, it's a workflow that lends itself well to web developers experimenting with data sets in Node.js.

To that end, pixiedust_node is an add-on for Jupyter notebooks that allows Node.js/JavaScript to run inside notebook cells. To learn more follow the setup steps and explore the getting started notebook or click on the sample image below to preview the output.

preview

When the reader has completed this Code Pattern, they will understand how to:

  • Run Node.js/JavaScript inside a Jupyter Notebook
  • Use JavaScript variables, functions, and promises
  • Work with remote data sources
  • Share data between Python and Node.js

architecture

Flow

  1. Install Node.js in target environment (Watson Studio or a local machine)
  2. Open Node.js notebook in target environment
  3. Run Node.js notebook

Included Components

  • Watson Studio: Analyze data using RStudio, Jupyter, and Python in a configured, collaborative environment that includes IBM value-adds, such as managed Spark.
  • Jupyter Notebook: An open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text.
  • PixieDust: Provides a Python helper library for IPython Notebook.
  • Cloudant NoSQL DB: A fully managed data layer designed for modern web and mobile applications that leverages a flexible JSON schema.

Featured Technologies

  • pixiedust_node: Open source Python package, providing support for Javascript/Node.js code.
  • Node.js: An open-source JavaScript run-time environment for executing server-side JavaScript code.

Steps

You can run Node.js code in Watson Studio or your local environment:

To preview an example notebook without going through a setup follow this link.

Run Node.js notebooks in Watson Studio

Creating a custom runtime environment

A runtime environment in Watson Studio (IBM's Data Science platform) is defined by its hardware and software configuration. By default, Node.js is not installed in runtime environments and you therefore need to create a custom runtime environment definition. [Learn more about environments...]

  • Open Watson Studio in your web browser. Sign up for a free account if necessary.
  • Create a "Complete" project. [Learn more about projects...]
  • In this project, open the Environments tab. A list of existing environment definitions for Python and R is displayed.
  • Create a new environment definition.
    • Assign a name to the new environment definition, such as Python 2 with Node.js.
    • Enter a brief environment description.
    • Choose the desired hardware configuration, such as a minimalist free setup (which is sufficient for demonstration purposes).
    • Select Python 2 as software version. (Python 3 is currently not supported by pixiedust_node.)
    • Create the environment definition.
  • Customize the software definition.
    • Add the nodejs conda package dependency, as shown below:

      # Please add conda channels here
      channels:
      - defaults
      
      # Please add conda packages here
      dependencies:
      - nodejs
      
      # Please add pip packages here
      # To add pip packages, please comment out the next line
      #- pip:
      
    • Apply the customization. It should look as follows:

      create_custom_runtime_environment

You can now associate notebooks with this environment definition and run Node.js in the code cells, as illustrated in the getting started notebook.

Note: An environment definition is only available within the project that it was defined in.

Loading the getting started notebook

The getting started notebook outlines how to

  • use variables, functions, and promises,
  • work with remote data sources, such as Apache CouchDB (or its managed sibling Cloudant),
  • visualize data,
  • share data between Python and Node.js.

In the project you've created, add a new notebook from URL:

  • Enter any notebook name.

  • Specify remote URL https://raw.githubusercontent.com/IBM/nodebook-code-pattern/master/notebooks/nodebook_1.ipynb as source.

  • Select the custom runtime environment Python 2 with Node.js. you've created earlier.

    create_nodebook

Follow the notebook instructions.

You should be able to run all cells one at a time without making any changes. Do not use run all.


Run Node.js notebooks in a local environment

Prerequisites

To get started with nodebooks you'll need a local installation of

Installing the samples

To access the samples, clone this repository and launch a Jupyter server on your local machine.

$ git clone https://github.com/IBM/nodejs-in-notebooks.git
$ cd nodejs-in-notebooks
$ jupyter notebook notebooks/

Running the samples

Open nodebook_1 to learn more about

  • using variables, functions, and promises,
  • working with remote data sources, such as Apache CouchDB (or its managed sibling Cloudant),
  • visualizing data,
  • sharing data between Python and Node.js.

You should be able to run all cells one at a time without making any changes. Do not use run all.


Optional data source customization

Some of the nodebook code pattern examples access a read-only Cloudant database for illustrative purposes. If you prefer you can create your own copy of this database by replicating from remote database URL https://56953ed8-3fba-4f7e-824e-5498c8e1d18e-bluemix.cloudant.com/cities. [Learn more about database replication...]

Sample Output

Open this link to preview the completed notebook.

Links

Learn more

  • Watson Studio: Master the art of data science with IBM's Watson Studio
  • Data Analytics Code Patterns: Enjoyed this Code Pattern? Check out our other Data Analytics Code Patterns
  • With Watson: Want to take your Watson app to the next level? Looking to utilize Watson Brand assets? Join the With Watson program to leverage exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].