Install quilt data packages and use them in Binder notebooks
Switch branches/tags
Clone or download
Pull request Compare This branch is 6 commits ahead, 1 commit behind quiltdata:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Importing data with Quilt


Pull data into Binder notebooks

This example uses Quilt to inject data packages into a Jupyter notebook.

Data packages are versioned, immutable snapshots of data. Data packages may contain data of any size. Here is an example of data package: uciml/iris.

How to specify data dependencies in your own Binder

  1. Add quilt to requirements.txt

  2. Specify data package dependencies in quilt.yml (docs). For example:

  - vgauthier/DynamicPopEstimate   # get the latest version
  - danWebster/sgRNAs:a972d92      # get a specific hash (short hash)
  - akarve/sales:tag:latest        # get a specific tag
  - asah/snli:v:1.0                # get a specific version
  1. Include the following lines at the top of postBuild. (postBuild should be executable: chmod +x postBuild on UNIX, git update-index --chmod=+x postBuild for Windows).
quilt install

If you are adopting the binder folder pattern for your repo2docker configuration files, and including quilt.yml, your postBuild file should look like this:

quilt install @./binder/quilt.yml

More info about how to install data packages via the quilt install command is available here.

  1. Now you can access the package data in your Jupyter notebooks:
In [1]: from import sales
In [2]: sales.transactions()
      Row ID  Order ID Order Date Order Priority  Order Quantity       Sales  \
0          1         3 2010-10-13            Low               6    261.5400   
1         49       293 2012-10-01           High              49  10123.0200   
2         50       293 2012-10-01           High              27    244.5700