HAPIClient.jl

Build Status DOI 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 (Dates, Tables, Unitful)

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
  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 - Dict{String, Any} with 8 entries:
  "stopDate"    => "2025-05-29T23:59:58Z"
  "resourceURL" => "https://cdaweb.gsfc.nasa.gov/misc/NotesA.html#AC_H0_MFI"
  "uri"         => URI("https://cdaweb.gsfc.nasa.gov/hapi/data?time.min=2001-01…
  "parameters"  => Any[Dict{String, Any}("length"=>24, "name"=>"Time", "units"=…
  "startDate"   => "1997-09-02T00:00:12Z"
  "status"      => Dict{String, Any}("message"=>"OK", "code"=>1200)
  "HAPI"        => "2.0"
  "contact"     => "N. Ness @ Bartol Research Institute"