cdasws Binning Example Jupyter Notebook

This Jupyter notebook demonstrates using the cdasws Python package to retrieve data from two cdaweb datasets that have different timestamps and places the data on the same time grid (with optional spike removal). The data is returned in the SpacePy data model. The AC_H0_SWE and AC_H2_SWE datasets are used in this example. For more information on binning, see binning in cdaweb.

This notebook contains the following sections:

  1. Prerequisites
  2. Setup
  3. Display Original Data
  4. Get Binned Data
  5. Compare Data
  6. Additional Documentation

Prerequisites

Install the prerequisite software the Python Package Index.

  1. pip install spacepy
  2. pip install cdasws

Setup

Execute some preliminary code that is necessary before the code that follows.

Display Original Data

The following code gets and displays the original, unbinned data.

Get Binned Data

The following code gets data after it has been binned with 60 second time intervals and any missing values created by interpolation.

Compare Data

The following code compares the binned data from the two datasets by plotting the values.

Additional Documentation

View the cdasws API for additional functions. Additional notebook examples are also available.