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.0

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.0
File Size Uploaded
geomagdata-2.0.0.tar.gz 242.4 kB Details

Built distribution (wheel)

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

Total release size: 255.3 kB

Release files / geomagdata-2.0.0.tar.gz

Download URL geomagdata-2.0.0.tar.gz
Size 242.4 kB
Tags Source
SHA-256 checksum
How to use checksums
906f25f573a6c3cc4576468f015d08dbed33470c720c4a8e06136a4c7d15b5e1
BLAKE2b-256 checksum
How to use checksums
9be1875e52a0d51e05edfdcdfd552fc1a62d36143ab3eb8d29fe114338959036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

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

Download URL geomagdata-2.0.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eb2bc570fb2542956e56f3e0dc8c0a158f053c7d46ab4753f55b10710031d53
BLAKE2b-256 checksum
How to use checksums
d7580bcf3f8966e501f855fb7db0b0347ffaf278407389a51086d6777e1d8daa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.6.1

2 release files

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