Skip to content

owen9825/jupyter_demo

Repository files navigation

Jupyter Business Demo

Open In Colab

Here we demonstrate a workflow of how business processes could evolve by 2021, in a way that'll create a staging ground for even greater paradigm shifts after that.

The workflow here is that an "insightful" business analyst will be writing this report in Google Colab, while being supported by software engineers ("code monkeys") who will be writing useful code here in this repository.

It shall be shown how business reports can quickly be re-generated, with any assumptions tested against the current state of the world, for the easy spotting of new opportunities and risks. By running in Colab, people can start writing and executing their own code without having to install anything locally.

A ship in the ocean

Note that by convention, programming is conducted in US English, even if the resultant report is in some other language (in this case, British English).

Purpose

This project demonstrates the quickest and easiest way to introduce programming into the workflow of an executive or any sort of "non-technical" person.

It can be seen that even if business executives implement placeholder functions returning constants, it lays the groundwork for later contributors to turn the thinking into something that's repeatable over a timescale of decades rather than months.

Jupyter notebooks use the easiest programming language to learn, giving access to the state of the art in terms of natural-language processing, computer vision, web scraping and even monetary transactions, enabling you to run a business well into the future, even beyond the extent of your own life.

Note that this is intended as a tutorial, hence there are gaps for excited readers to implement!

Setup for Business Analysts

  • Have a look at the associated Colab file and save a copy − this is where you'll be working.
  • Go through some of Google's tutorial.
  • Note that although most of the functionality is meant to come from the code in GitHub, it will be possible for you to create your own functions too, within the Colab document.

If you'd like to export the Colab file for presenting in a more typical way to fellow business executives, the current method is to download the notebook file, then use nbconvert at the command line in order to generate a file in HTML.

jupyter nbconvert --to HTML Kamarian_trade.ipynb

If you'd like to export to PDF (requires TeX) the steps are:

Example usage:

Setup for Engineers

IDE Support

  • In considering IDEs:
    • The jupyter-notebook package for Atom says that it lacks autocompletion, which is a core reason for using an IDE.
    • PyCharm only offers support in its Professional edition, whereas this code is aimed at newcomers.
    • Editing is possible in Google's Colaboratory, with the possibility of local or cloud computation.
    • Running a Jupyter notebook locally and accessing it through a browser, both Chrome and Brave require users to press Tab. Chrome omits showing the actual suggestions.

Installation

  • Install Python and Jupyter.
  • pip install --requirement requirements.txt
  • If using a virtual environment, you'll need to create a local Python kernel too.
  • Set up an account with Wolfram Alpha and get an API key here.
  • You might wish to install jupyter_contrib_nbextensions.
  • You might like to enable a filter for notebooks in Git repositories, stripping their output so that only the source code is kept in version control.
    • At your command line, run echo PATH and choose one of the folders as a place to put your script.
    • Visit here and scroll down to find the new script for Jupyter v4. Also note that you should take the suggestion of adding the argument ensure_ascii=False. Download the script into your chosen folder.
    • Follow the rest of that script's installation instructions.

Running

  • In the directory where your notebook is saved (and where this README file exists), run:
    jupyter notebook
  • Going to «Edit» and «nbextension config», you might wish to enable Python Markdown. Instructions discussed here.

Implementation notes

  • Notice the awkward importing mechanism imposed by the path mismatch in Google Colab. Explanation is available here.

Troubleshooting

  • Feel free to reach out with questions in a public forum, such as the Issues tab.

Future Improvements:

  • How do engineers get notified that the business executives want a new function?
  • Is there an easier way to export a published version? Ideally it would stay as HTML rather than being printed on trees, so as to keep the accessibility afforded by web browsers, and to maintain the benefits of hyperlinks.
  • Include a demonstration of how Scrapy could be included here.
  • Include the lunar cycles in the calculation for shipping distance.
  • Unit tests for shipping distance.
  • Include some financial data for pig futures markets.
  • Include some data directly from Google Drive.
  • Demonstration with numpy, including this tutorial.

See Also:

For further discussion regarding the reasoning behind integrating Jupyter notebooks into business operations, you may be interested in:

About

A demonstration of how to use Jupyter for business processes, specifically the expansion of Kamarian trade.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published