NDBC Real Time Buoy Observation Data Wrapper.
Project description
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()
Create an instance of the Stations class to retrieve a list of available stations from the NDBC database.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ndbcrealtime-0.0.4.tar.gz
.
File metadata
- Download URL: ndbcrealtime-0.0.4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc93991fb9442badfb0b307568c869638b6829772c9ec21dd7500aeedcb839bf |
|
MD5 | 6883235fae9a577b4e91f885bef13f8b |
|
BLAKE2b-256 | 47928f3b7ecf2c798fcf15b4427187c39e9efc2f4553bc9f14da379e3a3cc4f8 |
File details
Details for the file ndbcrealtime-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ndbcrealtime-0.0.4-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db692102f4b4bca77395d2075bc36b9134d2b001ac2b3020a8161d0b2e0d0fe |
|
MD5 | b515e59cb0dffda7ad8dd0e2dab9a8f8 |
|
BLAKE2b-256 | ff83c1938a565e72f10c188ebfd051da5357cc2280d6834e66ec48b0d14437c4 |