Skip to main content

Geomagnetic Data Indices

Geomagnetic indices downloader and parser, returns Ap, F10.7 (raw and averaged) and Kp.

This is derived from geomagindices, and has been modified to:

  • Correctly return averaged F10.7 values centered around the requested time.
  • Support the new post-SWPC data sources for all data dating back to 1932.
  • Fix a bug where averaging would not cross year boundaries.
  • Handle timezone-aware inputs correctly.
  • Return storm-time Ap indices for MSIS-xx models.

It is a drop-in replacement for geomagindices.

Output datatype is pandas.DataFrame (for multiple times)

internally, uses pandas.Index.get_loc to find nearest time to request.

Missing data is returned as NaN (Not a Number floating point value).

Installation

Direct installation:

$ pip install geomagdata

Indirect installation:

$ git clone https://github.com/sunipkm/geomagdata
$ cd geomagdata
$ pip install .

Examples

Use from other programs like

import geomagdata as gi

inds = gi.get_indices(date)

date can be a single value, or a sequence/array/pandas.DatetimeIndex. A single value can be an ISO date/time string; Python's datetime.date/datetime.datetime; numpy.datetime64; or a whenever Instant/ZonedDateTime/OffsetDateTime/PlainDateTime/Date.

A whenever exact-instant type (Instant, ZonedDateTime, OffsetDateTime) is always resolved to true UTC. A plain datetime/PlainDateTime is treated as naive UTC by default; pass tzaware=True if it carries its own timezone/offset that should be converted to UTC first.


python examples/plotindices.py 2015-01-01 2016-01-01

2015 Ap F10.7

Metadata

Release files for geomagdata 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geomagdata 2.0.1
File Size Uploaded Provenance Actions
geomagdata-2.0.1.tar.gz 247.7 kB With provenance Details for geomagdata-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geomagdata 2.0.1
File Interpreter ABI Platform Actions
geomagdata-2.0.1-py3-none-any.whl Python 3 none any Details for geomagdata-2.0.1-py3-none-any.whl

Total release size: 264.3 kB

Release files / geomagdata-2.0.1.tar.gz

Download URL geomagdata-2.0.1.tar.gz
Size 247.7 kB
Tags Source
SHA-256 checksum
How to use checksums
457db9d263d1dc429cfb06c73f3bf98c9ffcba952776bf3d46fe2b803900b194
BLAKE2b-256 checksum
How to use checksums
0cc3457d9078480e71faaf0c0763c9c51d885e111c2f6667ca97d821223ce135
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / geomagdata-2.0.1-py3-none-any.whl

Download URL geomagdata-2.0.1-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c508ca95e2b512dbfdc198ecac6ae6035d74350be78e5523e45a0acf47145748
BLAKE2b-256 checksum
How to use checksums
cde628531a053b5203b88cb9cce2281b0a4d0d53a94f84e57ac9ed6381bf34eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for geomagdata 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for geomagdata-2.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page