Skip to main content

Build Status License: MIT

ipython_IDV

Part of the EarthCube DRILSDOWN project

Extension for IPython Notebooks to provide line and cell magics to call out to Unidata's Integrated Data Viewer

To set it up:

  1. After installing Jupyter/iPython notebook software like this, you will also need to install the ipywidgets package

  2. Once Jupyter/iPython is ready, copy ipython_IDV.py to your local extensions directory, ~/.ipython/extensions

  3. To run IDV commands from the Notebook, you will need to have installed IDV version 5.4 or later. Also, you need to set your IDV_HOME environment variable to be the IDV install directory, so that python can execute the command ${IDV_HOME}/runIDV

  4. You also need to configure your IDV to accept connections from the ipython notebook. To do this set the following property in your local ~/.unidata/idv/DefaultIdv/idv.properties file:

idv.monitorport = 8765

Now you've done the 4 steps above.

When you launch jupyter notebook, and run an iPython notebook in your browser, do this in the notebook:

%load_ext ipython_IDV

That will give you a dashboard-style view of many of the ways the Notebook can launch and interact with The IDV, and find resources such as existing bundles, data catalogs, and more, including a link to the help section.

If you plan on writing Python code in this notbeook (rather then merely capturing images and notes about a case study IDV session), you should import the Idv and Ramadda classes:

from drilsdown import Idv
from drilsdown import Ramadda

We welcome your use cases! Email mapes at miami dot edu. See examples below.


Publishing to RAMADDA, using the IDV's capabilities

If you want to enable your IDV to publish to a RAMADDA server, get ramaddaplugin.jar. Copy this file to your local IDV plugins directory (~/.unidata/idv/DefaultIdv/plugins). While it is not a plain text code file, it is included in this repo so all of the products that are required for running drilsdown can be found in one place.


Setting up your own RAMADDA to handle DRILSDOWN Case Study objects

If you operate a RAMADDA, and want it to host DRILSDOWN Case Study digital objects, get drilsdownplugin.jar, put it in your RAMADDA installation's plugins area, and restart. It is produced from the code at RAMADDA drilsdown repository but is included here so all of the products that are required for running drilsdown can be found in one place.

Examples of Python notebooks calling DRILSDOWN and The IDV:

Here is an example of how to use the API to load an IDV bundle with different bounding boxes and capture images
from drilsdown import Idv
Idv.fileUrl="http://geodesystems.com/repository/entry/get?entryid=d83e0924-008d-4025-9517-394e9f13712f"
bboxes = [[50,-130,40,-100],[50,-100,40,-75],[40,-130,20,-100],[40,-100,20,-75]]
for i in range(len(bboxes)):
    bbox=bboxes[i];
    Idv.loadBundle(Idv.fileUrl,bbox)
    Idv.makeImage(caption="BBOX:" + repr(bbox[0]) +"/" + repr(bbox[1]) +"  " + repr(bbox[2]) +"/" + repr(bbox[3]))
from drilsdown import Idv
Idv.fileUrl="http://geodesystems.com/repository/entry/get?entryid=d83e0924-008d-4025-9517-394e9f13712f"
bboxes = [[50,-130,40,-100],[50,-100,40,-75],[40,-130,20,-100],[40,-100,20,-75]]
for i in range(len(bboxes)):
    bbox=bboxes[i];
    Idv.loadBundle(Idv.fileUrl,bbox);
    label = "BBOX:" + repr(bbox[0]) +"/" + repr(bbox[1]) +"  " + repr(bbox[2]) +"/" + repr(bbox[3]);
    Idv.makeMovie(caption=label,display=True, publish={'parent':'9adf32b5-aad4-4a8d-997e-216b9757d240',"name":"Image #" + repr(i)})

The makeImage can take one of 2 forms of a publish argument. The first is a boolean and will result in the IDV popping up its RAMADDA publish dialog box where the image can be published.

    Idv.makeImage(caption=label, publish=True);

In the second form the publish argument is a map. This directs the python to do the publishing directly to RAMADDA. The map can contain a parent member which is the entry id to publish to and a name member which is the entry name.

    Idv.makeImage(caption=label, publish={'parent':'9adf32b5-aad4-4a8d-997e-216b9757d240',"name":"Image #" + repr(i)})

To enable direct publishing to RAMADDA you need to have your RAMADDA user name and password defined as environment variables:

export RAMADDA_USER=
export RAMADDA_PASSWORD=

Metadata

Release files for ipyidv 2.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipyidv 2.4.9
File Size Uploaded Provenance Actions
ipyidv-2.4.9.tar.gz 18.6 kB Without provenance Details for ipyidv-2.4.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipyidv 2.4.9
File Interpreter ABI Platform Actions
ipyidv-2.4.9-py2.py3-none-any.whl Python 3, Python 2 none any Details for ipyidv-2.4.9-py2.py3-none-any.whl

Total release size: 49.1 kB

Release files / ipyidv-2.4.9.tar.gz

Download URL ipyidv-2.4.9.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0f8078bcdeb74e3ab8bc54859019d5d891d19639eb82ec721cef530cbdef1da9
BLAKE2b-256 checksum
How to use checksums
b4beb854f0d4752bd29c8559c7a6889a7abff32035c2f39b27dae1658d1554f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

Release files / ipyidv-2.4.9-py2.py3-none-any.whl

Download URL ipyidv-2.4.9-py2.py3-none-any.whl
Size 30.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
af6abf077939bde49739d1d6f005da5d76a7c3f45e6423dc3c148a8136cca025
BLAKE2b-256 checksum
How to use checksums
59bb723739c4fb92077e69f82a44ef7b95ae2044b606f270ae0c28f0d288b692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

Security for ipyidv 2.4.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.4.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page