In this blog we will explore what is Jupyter Notebook & how we can setup in Windows 10 for Python & R.


Jupyter Notebook – open source web application that you can use to create and share documents that contain code, code output, visualizations, and text. You can include markdown in the jupyter notebooks.

Best way to write, execute code & share the output as document. See below sample notebook for R. Refer below screenshot contains markdown text, code & its output for R & Python.

Jupyter supports many programming languages, including Python, R and Scala.

Installation for Python & R:

For R: Just need to run below commands:

install.packages('IRkernel')
IRkernel::installspec()	
IRkernel::installspec(user = FALSE)

Installation is completed, now you can start creating & sharing notebooks.

Starting Jupyter Notebook

Go to the command prompt, change directory where you want to start the jupyter notebook, it will store all files in this directory only. Execute command: jupyter notebook , it will start the notebook application : http://localhost:8888/tree

Creating Notebook

Go the jupyter notebook home page & click on the new. Refer below screenshot, it is asking for the language, I have setup jupyter for R as well as Python. You can create new as well as run existing notebook files also.

You can create normal text file & folder in the directory where you have started the jupyter notebook.

Running Notebook using R

See below reference example of running the notebook for R language. It has markdown text, R code as well as code output.

Running Notebook using Python

See below reference example of running the notebook for Python language.

Exporting Notebook

You have option to download the notebook as html /ipynb/pfd… etc. Later you can share the notebook in GitHub, email or any blog.

Refer sample .ipynb notebooks I have pushed in GitHub: https://github.com/shobhit-singh/Python-Learning-Journey


Thanks!

Happy Learning! Your feedback would be appreciated!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s