Skip to main content

NASA's Coordinated Data Analysis System Web Service Client Library

Project description

Synopsis

This library provides a simple python interface to the heliophysics data and services of NASA's Coordinated Data Analysis System (CDAS). This library implements the client side of the CDAS RESTful web services and can return data in the SpacePy data model or an xarray.Dataset with all the original ISTP/SPDF metadata. Frequently asked questions concerning this library are at FAQ. For more general details about the CDAS web services, see https://cdaweb.gsfc.nasa.gov/WebServices/REST/.

Code Example

This package contains example code calling most of the available web services. To run the included example, do the following

python -m cdasws

Also, the following Jupyter notebooks demonstrate different features of the library:

  1. Basic Example (ipynb file) demonstrating use of library with results returned in SpacePy data model. Launch on Binder.
  2. Basic Example (ipynb file) demonstrating use of library with results returned in an xarray.Dataset. Launch on Binder.
  3. Magnetic Field Line Conjunction Example (ipynb file) with related data retrieval/plotting using cdasws. Launch on Binder.

And at the bottom of each CDAWeb dataset description is a "Data Access Code Examples" link that contains dataset-specific code utilizing this package to access the data.

Motivation

This library hides the HTTP, JSON/XML, and CDF details of the CDAS web services. A python developer only has to deal with python objects and methods (primarily the SpacePy data model or xarray.Dataset object with full ISTP/SPDF metadata).

Dependencies

The only required dependencies are python-dateutil and requests. If you call the get_data method then one of the following two sets of additional dependencies are required:

  1. To have get_data return the data in the SpacePy data model.
    • SpacePy. Refer to the SpacePy documentation for the details of SpacePy's dependencies.
  2. To have get_data return the data in an xarray dataset.

Installation

As noted in the dependencies above, if you intend to call the get_data method, you must install one of the following options.

  1. SpacePy.

     $ pip install -U spacepy
    
  2. cdflib and xarray.

     $ pip install -U cdflib
     $ pip install -U xarray
    

Then, to install this package

$ pip install -U cdasws

API Reference

Refer to cdasws package API reference

or use the standard python help mechanism.

from cdasws import CdasWs
help(CdasWs)

Tests

The tests directory contains unittest tests.

Contributors

Bernie Harris.
e-mail for support.

License

This code is licensed under the NASA Open Source Agreement (NOSA).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdasws-1.8.2.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

cdasws-1.8.2-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file cdasws-1.8.2.tar.gz.

File metadata

  • Download URL: cdasws-1.8.2.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for cdasws-1.8.2.tar.gz
Algorithm Hash digest
SHA256 be9f0a6dd6ce46934e4f61eb82a73fd7df1e2773c61a5a84a3c6a51c01194273
MD5 56839018ce182262a8c457c33de41764
BLAKE2b-256 61b16c3402b6bba31ba93e047f223c74830426e498fa9080b249cd55c722c85c

See more details on using hashes here.

File details

Details for the file cdasws-1.8.2-py3-none-any.whl.

File metadata

  • Download URL: cdasws-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for cdasws-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 94488f69a3fd988bc74084bddd18485ee86757d8d23f3d95b1a9e85df4460f1a
MD5 5a74cb2128047fd3de07beb05d5c83c1
BLAKE2b-256 c69c5ebe8860ce659c6b9c53b6e55f3e84a886a1b15c10fa665fbc6be767c7f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page