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:
- Basic Example (ipynb file) demonstrating use of library with results returned in SpacePy data model. Launch on Binder.
- Basic Example (ipynb file) demonstrating use of library with results returned in an xarray.Dataset. Launch on Binder.
- 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:
- 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.
- 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.
-
$ pip install -U spacepy
-
$ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cdasws-1.8.6.tar.gz
.
File metadata
- Download URL: cdasws-1.8.6.tar.gz
- Upload date:
- Size: 26.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf61abc3a7c1ce17bdf21fd050da626415d484d3fe8bdad9114010776f0ffb9f |
|
MD5 | 5472d85f8c7dc5392a0024a0a17bd76d |
|
BLAKE2b-256 | 8aa641753e2dd1eb8e8739565e4a0caa0c794148abbf51e82000fbe603255184 |
File details
Details for the file cdasws-1.8.6-py3-none-any.whl
.
File metadata
- Download URL: cdasws-1.8.6-py3-none-any.whl
- Upload date:
- Size: 43.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 769880ba9439a45eafda5e391c722e4d8b83a1230364ff5793dcbc081f313152 |
|
MD5 | a9276833620aeb5b6e751df7bf897178 |
|
BLAKE2b-256 | d34c5cbbe7642636f84f2eb67eb11f2edcdd7afebd27eec2df03b54bd2d65f92 |