Load and visualize fitness (running) data on a map with JupyterLab!

Discussion

Overview and Learning Goals

In this mini-lecture, we treat the following four main topics:

  • Get JupyterLab up and running.
  • The nature and role of Jupyter Notebooks and JupyterLab.
  • Load and show data with a simple chart and a GIS visualization.
  • The drawbacks of Jupyter Notebooks.

After following this mini-lecture, you will be able to:

  • Explain the role of Jupyter Notebooks in the modern data analysis pipeline.
  • Explain the risks of Jupyter Notebooks in the modern data analysis pipeline.
  • Get your own JupyterLab up and running.
  • Create new notebooks.
  • Load datasets into Pandas dataframes.
  • Build simple charts with those dataframes.

Pre-requisites

You will need an installed and confgured miniconda3 as explained in the vxuni mini-lecture Up and Running with Miniconda and PyCharm on MacOS.

Having followed the Conda Environments would be a bonus, but is not required.

Fire up JupyterLab, load the notebook

I have created a github repo with the code and notebook for this mini-lecture.

Checkout the code it your working directory, for example:

mkdir ~/Documents/vxuni
cd ~/Documents/vxuni
git clone git@github.com:vxuni/jupyter_running.git
cd jupyter_running

Bring your vxuni conda environment up to date:

conda env update

Start JupyterLab:

jupyter lab

Double click on the jupyter_running.ipynb file in the File sidebar on the left.

In the video, I go through the basics of navigating and executing the wonderful world that is the Jupyter Notebook.

What are Jupyter Notebooks?

Jupyter Notebooks, previously known as IPython notebooks, are a web-based modality for doing literate programming.

In other words, you can combine documentation, runnable code, results such as charts, tables and other data, all in a single document.

Notebooks can be viewed online, and others can reproduce your results by running a notebook you made.

See A gallery of interesting Jupyter Notebooks by the folks behind Jupyter for an amazing list of instantly-viewable and reproducible notebooks.

What is JupyterLab exactly?

JupyterLab is a new web-based software for scientific computation, with one of its primary operands being Jupyter Notebooks.

JupyterLab will eventually replaced Jupyter Notebook as the tool of choice for working with notebooks.

Continue the demo

  • Configure notebook.
    • Auto-reloading.
    • Notebook interactive charts.
  • Embed YouTube video.
  • Load and explore data.
  • Build a chart.
  • Build a more involved GIS visualization using folium.
  • Demo the console connected to the notebook.

Caveat emptor

Notebooks are great for documentation, presentation and interactive work. However, they get in the way of:

  • Using a full-powered IDE.
  • Building well-structured software.
  • Writing tests.
  • Effective version control.

We have to keep these drawbacks in mind whilst drinking all of this refreshing Kool-Aid.

Personally, I try to mitigate these issues with the following guidelines:

  • Keep notebooks as short as possible, for example limitng the notebook to a single experiment or hypothesis.
  • Factor out code as you go along. That factored out code should be documented, version-controlled and tested when relevant.

Leave a Reply

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search