HAPIClient.jl

DOI

Build Status Aqua QA Coverage

A Julia client for the Heliophysics Application Programmer's Interface (HAPI).

HAPIClient.jl makes it easy to access heliophysics data from HAPI-compliant servers. The package supports:

  • Listing available HAPI servers (See HAPI Server Browser)
  • Browsing catalogs of datasets
  • Retrieving parameter information
  • Downloading time series data
  • Integration with Julia's ecosystem (Unitful, DimensionalData)

Installation

using Pkg
Pkg.add("HAPIClient")

Quick Start

using HAPIClient
using Dates

# Get data from CDAWeb
dataset = "AC_H0_MFI"
parameters = "Magnitude,BGSEc"
start_time = DateTime(2001, 1, 1, 5, 0, 0)
end_time = DateTime(2001, 1, 1, 6, 0, 0)
data = hapi(CDAWeb, dataset, parameters, start_time, end_time)
HAPIVariables: CDAWeb/AC_H0_MFI (https://cdaweb.gsfc.nasa.gov/hapi/data?time.min=2001-01-01T05%3A00%3A00.000Z&parameters=Magnitude%2CBGSEc&format=csv&id=AC_H0_MFI&time.max=2001-01-01T06%3A00%3A00.000Z)
  Magnitude [Time Range: 2001-01-01T05:00:14 to 2001-01-01T05:59:58, Units: nT, Size: (225,)]
  BGSEc [Time Range: 2001-01-01T05:00:14 to 2001-01-01T05:59:58, Units: nT, Size: (225, 3)]
Metadata - JSON.Object{String, Any} with 7 entries:
  "HAPI"        => "2.0"
  "resourceURL" => "https://cdaweb.gsfc.nasa.gov/misc/NotesA.html#AC_H0_MFI"
  "contact"     => "N. Ness @ Bartol Research Institute"
  "parameters"  => Any[Object{String, Any}("name"=>"Time", "length"=>24, "units…
  "startDate"   => "1997-09-02T00:00:12Z"
  "stopDate"    => "2026-01-27T23:59:46Z"
  "status"      => Object{String, Any}("code"=>1200, "message"=>"OK")