Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

exTerEX/noaa

 
 

Repository files navigation

NOAA Climate Data Online SDK for Python

Python API for NOAA climate data.

Getting started

Prerequisites

To use this interface you need:

  • python 3.7+

For development you additionaly need:

  • sphinx

Installing

Intall using pip from source:

Install latest available source using

python -m pip install git+https://github.com/exTerEX/noaa.git#egg=noaa

Or install specific version (tag, commit, branch) available using

python -m pip install git+https://github.com/exTerEX/noaa.git@<branch/commit hash/tag>#egg=noaa

where <branch/commit hash/tag> is changed out for a specific branch (e.g. main, development), commit hash (e.g. 86ba995, 770f02), or tag (e.g. 0.1.0-alpha, 1.17.6)

Install using pip from tarball:

Install latest available source using

python -m pip install git+https://github.com/exTerEX/noaa/tarball/main

Usage

Below is a simple example on how to use this API. Get a token from NOAA and input it into where <token> in the example below.

from noaa.climate import API

noaaobj = API("<token>")

print(noaaobj.get_datasets())
print(noaaobj.get_data(
        dataset_id = "GSOM",
        start_date="1970-10-03",
        end_date="2012-09-10")
)
print(noaaobj.get_data_categories())
print(noaaobj.get_data_types())
print(noaaobj.get_locations())
print(noaaobj.get_stations())

See documentation for an in-depth explanation of input values.

Running tests

Run the tests in the CMD using the line under, with a valid token.

python tests/climate.py <token>

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

This project use PEP440 for versioning. For the versions available, see the tags on this repository.

Authors

  • Andreas Sagen - Initial contributer

License

This project is licensed under the MIT. For more details see LICENSE.