# 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:
```json
{
"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:
```json
{
'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.
Raw data
{
"_id": null,
"home_page": "https://github.com/djtimca/ndbc-api",
"name": "ndbcrealtime",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "NDBC, Buoy, Waves, Wind, Weather",
"author": "Tim Empringham",
"author_email": "tim.empringham@live.ca",
"download_url": "https://files.pythonhosted.org/packages/24/0f/cb30ed017172120b9e2aec1d087b40304db87ee876dc7f0ce3427e87b416/ndbcrealtime-0.0.5.tar.gz",
"platform": null,
"description": "# NOAA NDBC-API (ndbcrealtime)\nPyPi 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.\n\n## Available Classes and Methods\n\n### Class NDBC(station_id, session (optional))\n\nCreate an instance of the NDBC class with a specific station_id in order to retrieve the current observation data using `get_data()`\n\n**station_id (string):** the station id for the buoy which can be found from the NDBC website: https://www.ndbc.noaa.gov/\n\nSession can be sent as an optional aiohttp session if you are managing your session within an application.\n\n#### get_data()\n\nReturns the current observation data as a JSON object.\n\n**Return Payload**\n\nThe payload returned will be structured as:\n\n```json\n{\n \"location\": {\n \"latitude\": latitude (float),\n \"longitude\": longitude (float),\n \"elevation\": elevation (int),\n \"name\": station name (str)\n },\n \"observation\": {\n \"time\": {\n \"utc_time\": utc date/time (datetime),\n \"unix_time\": unix timestamp (int)\n },\n \"wind\": {\n \"direction\": wind direction (int),\n \"direction_unit\": direction units (str),\n \"direction_compass\": direction text (str),\n \"speed\": wind speed (float),\n \"speed_unit\": speed units (str),\n \"gusts\": wind gusts (float),\n \"gusts_unit\": gusts units (str)\n },\n \"waves\": {\n \"height\": wave height (float),\n \"height_unit\": wave height units (str),\n \"period\": dominant wave period (int),\n \"period_unit\": wave period units (str),\n \"average_period\": average wave period (int),\n \"average_period_unit\": average period units (str),\n \"direction\": dominant wave direction (int),\n \"direction_unit\": dominant direction units (str),\n \"direction_compass\": direction text (str)\n },\n \"weather\": {\n \"pressure\": sea level pressure (float),\n \"pressure_unit\": pressure units (str),\n \"air_temperature\": air temperature (float),\n \"air_temperature_unit\": air temperature units (str),\n \"water_temperature\": water temperature (float),\n \"water_temperature_unit\": water temperature units (str),\n \"dewpoint\": dewpoint temperature (float),\n \"dewpoint_unit\": dewpoint_units (str),\n \"visibility\": visibility (float),\n \"visibility_unit\": visibility units (str),\n \"pressure_tendency\": pressure tendency (float),\n \"pressure_tendency_unit\": pressure tendency units (str),\n \"tide\": tide (float),\n \"tide_unit\": tide units (float)\n }\n }\n}\n```\n\n### Class Stations()\n\nCreate an instance of the Stations class to retrieve a list of available stations from the NDBC database.\n\n#### list()\n\nReturns a dict containing all available NDBC stations.\n\n**Return Payload**\n\nThe payload returned will be structured as:\n\n```json\n{\n '00922': {\n '@id': '00922', \n '@lat': '30', \n '@lon': '-90', \n '@name': 'OTN201 - 4800922', \n '@owner': 'Dalhousie University', \n '@pgm': 'IOOS Partners', \n '@type': 'other', \n '@met': 'n', \n '@currents': 'n', \n '@waterquality': 'n', \n '@dart': 'n'},\n ...\n}\n```\n\nNote: This library was built specifically for integration to Home Assistant.\n\n\n",
"bugtrack_url": null,
"license": "apache-2.0",
"summary": "NDBC Real Time Buoy Observation Data Wrapper.",
"version": "0.0.5",
"project_urls": {
"Download": "https://github.com/djtimca/ndbc-api/archive/refs/tags/0.0.4.tar.gz",
"Homepage": "https://github.com/djtimca/ndbc-api"
},
"split_keywords": [
"ndbc",
" buoy",
" waves",
" wind",
" weather"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "240fcb30ed017172120b9e2aec1d087b40304db87ee876dc7f0ce3427e87b416",
"md5": "1d39eb6d2fcf4cadf6fb016bb90859d6",
"sha256": "6f5e5b8c28c70e102659f4e2e2f28ff793cbd4f6540dfd7e2d102fb77828baee"
},
"downloads": -1,
"filename": "ndbcrealtime-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "1d39eb6d2fcf4cadf6fb016bb90859d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8827,
"upload_time": "2025-01-03T13:30:07",
"upload_time_iso_8601": "2025-01-03T13:30:07.448391Z",
"url": "https://files.pythonhosted.org/packages/24/0f/cb30ed017172120b9e2aec1d087b40304db87ee876dc7f0ce3427e87b416/ndbcrealtime-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-03 13:30:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "djtimca",
"github_project": "ndbc-api",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ndbcrealtime"
}