Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

gadomski/pyisd

Repository files navigation

pyisd

Tests Lint PyPI - Version Read the Docs (version)

Reads NOAA Integrated Surface Database (ISD) data.

Installation

python -m pip install isd

Usage

There is a simple command line interface. The isd record command prints a single record in JSON format:

isd record tests/data/720538-00164-2021

The Python API allows reading compressed and uncompressed ISD files:

from isd import Batch

batch = Batch.from_path("isd-file")
for record in batch:
    print(record)

Streaming is also supported:

import isd.io

with isd.io.open("isd-file") as records_iterator:
    records = list(records_iterator)

There is currently no parsing of the additional_data section, but all mandatory fields are parsed out into appropriately-typed fields on a Record.

Development

This project uses uv for development. Install uv first:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then install the development dependencies:

uv sync

To run the unit tests:

uv run pytest

Release

To cut a new release of pyisd (assuming you have the appropriate permissions):

  1. Create a new branch, e.g. release/v0.1.4.
  2. Update pre-commit hooks: pre-commit autoupdate
  3. Update the CHANGELOG and pyproject.toml.
  4. Open a pull request with the changes.
  5. Merge the pull request once all required checks pass.
  6. Create an annotated tag, e.g. git tag -a v0.1.4.
  7. Push the annotated tag to github.
  8. Create a Github release. This will trigger a new PyPI release.

About

Reads NOAA's Integrated Surface Data (ISD) files

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages