Enterprise docs

Jupyter

Write, explore, and share your code with Jupyter's visual interface for Python and other coding languages.

Choose your preferred host.

You can choose to run the Jupyter app on either a personal server or Heroku.

Heroku offers a free, cloud-based alternative to a personal server.

Jupyter_1.png

Choose an app (or create a new app) with Heroku.

You can choose to work within a previously created version of Jupyter Notebook or create a new instance.

The following setup instructions will be using Heroku, see below for information on configuring a personal server.

  1. Choose Heroku from the host options in the Choose a host panel.

  2. Choose a previously created app from your list, or click Create New to create a new iteration of Jupyter.

Jupyter_2.png
  • If creating a new app, you will need to create a password and enter any required Python packages.

Jupyter_3.png

Configure & use a personal server.

Using a personal server is an easy way to run applications, allowing you full control over setup and configuration.

The following setup instructions will be using a personal server, skip this section if you are using Heroku.

  1. Choose Personal Server from the host options in the Choose a host panel.

  2. [Locally]: Create your server

    • InstallUse pip (Python 2.7 or 3.4+)

      pip install dwcontents

    • ConfigureCreate or update ~/.jupyter/jupyter_notebook_config.py with settings:

      import dwcontentsimport osc = get_config()c.NotebookApp.contents_manager_class = dwcontents.DwContentsc.DwContents.dw_auth_token = 'YOUR_API_TOKEN'

      You can get your API token in your data.world advanced settings.

    • RunAssuming jupyter and jupyterlab (optional) have already been installed, start as normal, for example:

      $ jupyter lab

  3. [On data.world]: Click Continue, enter your server's URL, and open your notebook.

    Jupyter_4.png

    If you'd like to use the same server each time you open Jupyter, remember to click the optional checkbox.

Use the Jupyter workspace.

Use Jupyter to create new notebooks or open & edit previous notebooks.

  1. Create a new notebook or open any previous notebook (.ipynb files).

  2. Jupyter_5.png
  3. Start writing code!

What next?

Here are a few things you can do with Jupyter and data.world:

  • Load data directly from data.world into your notebook with project ID using the import datadotworld function and var = dw.load_dataset('project-id') Example:

    import datadotworld as dwlds = dw.load_dataset('garyhoov/us-food-imports-and-exports')

  • Save tables locally as CSVs, using table_name.to_csv('csvname.csv', index=True), which will allow you to upload directly to data.world through Jupyter.Example:

    foodspivot.to_csv('foods.csv', index=True)

  • Upload CSVs directly to your data.world project, all within your notebook file, using the data.world API. make sure you've imported data.world using import datadotworld Example:

    import datadotworld as dwclient = dw.api_client()client.upload_files('sarakbarr/test-projects', 'foods.csv')client.upload_files('sarakbarr/test-projects', 'foods_chart.png')

  • Share documents containing live code, text, visualizations, and more.

  • Manipulate data and use statistical modeling.