Skip to main content

NOAA NDBC-API (ndbcrealtime)

PyPi Integration to the NOAA National Data Buoy Centre real time observations for wind, waves, sea level pressure, air temperature, water temperature, dewpoint, visibility, pressure tendency, and tide information (as available) for a specific buoy.

Available Classes and Methods

Class NDBC(station_id, session (optional))

Create an instance of the NDBC class with a specific station_id in order to retrieve the current observation data using get_data()

station_id (string): the station id for the buoy which can be found from the NDBC website: https://www.ndbc.noaa.gov/

Session can be sent as an optional aiohttp session if you are managing your session within an application.

get_data()

Returns the current observation data as a JSON object.

Return Payload

The payload returned will be structured as:

{
    "location": {
        "latitude": latitude (float),
        "longitude": longitude (float),
        "elevation": elevation (int),
        "name": station name (str)
    },
    "observation": {
        "time": {
            "utc_time": utc date/time (datetime),
            "unix_time": unix timestamp (int)
        },
        "wind": {
            "direction": wind direction (int),
            "direction_unit": direction units (str),
            "direction_compass": direction text (str),
            "speed": wind speed (float),
            "speed_unit": speed units (str),
            "gusts": wind gusts (float),
            "gusts_unit": gusts units (str)
        },
        "waves": {
            "height": wave height (float),
            "height_unit": wave height units (str),
            "period": dominant wave period (int),
            "period_unit": wave period units (str),
            "average_period": average wave period (int),
            "average_period_unit": average period units (str),
            "direction": dominant wave direction (int),
            "direction_unit": dominant direction units (str),
            "direction_compass": direction text (str)
        },
        "weather": {
            "pressure": sea level pressure (float),
            "pressure_unit": pressure units (str),
            "air_temperature": air temperature (float),
            "air_temperature_unit": air temperature units (str),
            "water_temperature": water temperature (float),
            "water_temperature_unit": water temperature units (str),
            "dewpoint": dewpoint temperature (float),
            "dewpoint_unit": dewpoint_units (str),
            "visibility": visibility (float),
            "visibility_unit": visibility units (str),
            "pressure_tendency": pressure tendency (float),
            "pressure_tendency_unit": pressure tendency units (str),
            "tide": tide (float),
            "tide_unit": tide units (float)
        }
    }
}

Class Stations(session (optional))

Create an instance of the Stations class to retrieve a list of available stations from the NDBC database.

Session can be sent as an optional aiohttp session if you are managing your session within an application.

list()

Returns a dict containing all available NDBC stations.

Return Payload

The payload returned will be structured as:

{
    '00922': {
        '@id': '00922', 
        '@lat': '30', 
        '@lon': '-90', 
        '@name': 'OTN201 - 4800922', 
        '@owner': 'Dalhousie University', 
        '@pgm': 'IOOS Partners', 
        '@type': 'other', 
        '@met': 'n', 
        '@currents': 'n', 
        '@waterquality': 'n', 
        '@dart': 'n'},
    ...
}

Note: This library was built specifically for integration to Home Assistant.

Metadata

Release files for ndbcrealtime 0.0.6

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

Source distribution (sdist)

Source distribution for ndbcrealtime 0.0.6
File Size Uploaded
ndbcrealtime-0.0.6.tar.gz 9.0 kB Details

Built distribution (wheel)

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

Total release size: 18.8 kB

Release files / ndbcrealtime-0.0.6.tar.gz

Download URL ndbcrealtime-0.0.6.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0215716eae75d20d631ae19d84b697dfd389ca25aa0c605129120b557f3618d0
BLAKE2b-256 checksum
How to use checksums
35cfef7812abcd91bd049af86664d8d789a19f9b5ddfa22a4d9f7fefd319656c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / ndbcrealtime-0.0.6-py3-none-any.whl

Download URL ndbcrealtime-0.0.6-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
219ad1308251fe20aea1e0201fae5a5bffbe954e2c3a1bc29febd09250f3fd85
BLAKE2b-256 checksum
How to use checksums
76328eab6b95982b518dd416c063f24c3611b905f4ec373335a7a86209d82a85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

1 release file

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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