# seastate
## Summary
Collect ocean measurement data based on location and timeframe
**Features**
- Closest active station is selected for each measurement
- Reaches into secondary historical archives when required
- Returns pandas dataframe compatible dictionaries
- Available measurements: Tide, wind, water temp, air temp, air pressure, conductivity and swell information
- Datasources: NOAA NDBC, NOAA Tides and Currents
## Installing
`pip install seastate`
## Quick start
```
from seastate import SeaState
from datetime import datetime
# make SeaState object for specific location
san_diego = SeaState(32,-117)
# retrieve measurements for today
san_diego_today = san_diego.from_date_range(datetime.today())
san_diego_today['tide'] -> [{t: time, v: value, s: stdev}]
san_diego_today['wind']-> [{t: time, v: value, d: direction, g: gust}]
san_diego_today['water_temp']-> [{t: time, v: value}]
san_diego_today['air_temp']-> [{t: time, v: value}]
san_diego_today['air_press']-> [{t: time, v: value}]
san_diego_today['wave']-> [{t: time, v: Wave Height, dpd: Dominant Period, mwd: dpd Direction}]
san_diego_today['conductivity']-> [{t: time, v: value}]
```
Measurement details for NDBC are [here](https://www.ndbc.noaa.gov/measdes.shtml) and for Tides and Currents [here](https://api.tidesandcurrents.noaa.gov/api/prod/responseHelp.html)
## API reference
Useful metadata can be accessed through the SeaState object
```
san_diego = SeaState(32,-117)
# Each measurement has an entry point
san_diego.tide
-> (api.mediator Object)
# The valid keys are:
valid_measurements = {
'tide',
'wind',
'water_temp',
'air_temp',
'air_press',
'wave',
'conductivity',
}
# the original lat/lon are available
san_diego.lat
-> 32
san_diego.tide._target_lon
-> 32
# the distance of each measurement station to target gps
san_diego.tide.distance
-> xyz kilometers
# and other useful exposed api keys
san_diego.tide.station.name
san_diego.tide.station.id
san_diego.tide.station.lat
san_diego.tide.station.lon
```
## Measurement x API breakdown
| Measurement | T&C | NDBC |
| -----------: | :-: | :--: |
| tide | y | y |
| wind | y | y |
| water_temp | y | y |
| air_temp | y | y |
| air_press | y | y |
| wave | | y |
| conductivity | y | |
## More Examples
### Measurements for past 30 days
```
from seastate import SeaState
from datetime import datetime, timedelta
start = datetime.today()-timedelta(days=30)
end = datetime.today()
san_diego_past_30 = san_diego.measurements_from_date_range(start,end)
```
### Hourly Slices
```
san_diego_past_30_hourly = san_diego.hourly(start,end) # this returns a single reading per hour
# experimental feature
# no guarantee between APIs that readings will align or exist in all cases
```
Raw data
{
"_id": null,
"home_page": null,
"name": "seastate",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8.1",
"maintainer_email": null,
"keywords": "api, currents, data, forecast, marine, ndbc, noaa, ocean, temperature, tides, weather, wind",
"author": null,
"author_email": "Ivo Rivetta <ivo@ivorivetta.com>",
"download_url": "https://files.pythonhosted.org/packages/74/82/5f5c3aca00e54acaed8255455eb652eb156d75b547f3e915e6d73bace905/seastate-0.2.1.tar.gz",
"platform": null,
"description": "# seastate\n\n## Summary\n\nCollect ocean measurement data based on location and timeframe\n\n**Features**\n\n- Closest active station is selected for each measurement\n- Reaches into secondary historical archives when required\n- Returns pandas dataframe compatible dictionaries\n- Available measurements: Tide, wind, water temp, air temp, air pressure, conductivity and swell information\n- Datasources: NOAA NDBC, NOAA Tides and Currents\n\n## Installing\n\n`pip install seastate`\n\n## Quick start\n\n```\nfrom seastate import SeaState\nfrom datetime import datetime\n\n# make SeaState object for specific location\nsan_diego = SeaState(32,-117)\n\n# retrieve measurements for today\nsan_diego_today = san_diego.from_date_range(datetime.today())\n\nsan_diego_today['tide'] -> [{t: time, v: value, s: stdev}]\nsan_diego_today['wind']-> [{t: time, v: value, d: direction, g: gust}]\nsan_diego_today['water_temp']-> [{t: time, v: value}]\nsan_diego_today['air_temp']-> [{t: time, v: value}]\nsan_diego_today['air_press']-> [{t: time, v: value}]\nsan_diego_today['wave']-> [{t: time, v: Wave Height, dpd: Dominant Period, mwd: dpd Direction}]\nsan_diego_today['conductivity']-> [{t: time, v: value}]\n```\n\nMeasurement details for NDBC are [here](https://www.ndbc.noaa.gov/measdes.shtml) and for Tides and Currents [here](https://api.tidesandcurrents.noaa.gov/api/prod/responseHelp.html)\n\n## API reference\n\nUseful metadata can be accessed through the SeaState object\n\n```\nsan_diego = SeaState(32,-117)\n\n# Each measurement has an entry point\nsan_diego.tide\n-> (api.mediator Object)\n\n# The valid keys are:\nvalid_measurements = {\n 'tide',\n 'wind',\n 'water_temp',\n 'air_temp',\n 'air_press',\n 'wave',\n 'conductivity',\n}\n\n\n# the original lat/lon are available\nsan_diego.lat\n-> 32\nsan_diego.tide._target_lon\n-> 32\n\n# the distance of each measurement station to target gps\nsan_diego.tide.distance\n-> xyz kilometers\n\n# and other useful exposed api keys\nsan_diego.tide.station.name\nsan_diego.tide.station.id\nsan_diego.tide.station.lat\nsan_diego.tide.station.lon\n\n```\n\n## Measurement x API breakdown\n\n| Measurement | T&C | NDBC |\n| -----------: | :-: | :--: |\n| tide | y | y |\n| wind | y | y |\n| water_temp | y | y |\n| air_temp | y | y |\n| air_press | y | y |\n| wave | | y |\n| conductivity | y | |\n\n## More Examples\n\n### Measurements for past 30 days\n\n```\nfrom seastate import SeaState\nfrom datetime import datetime, timedelta\n\nstart = datetime.today()-timedelta(days=30)\nend = datetime.today()\nsan_diego_past_30 = san_diego.measurements_from_date_range(start,end)\n```\n\n### Hourly Slices\n\n```\nsan_diego_past_30_hourly = san_diego.hourly(start,end) # this returns a single reading per hour\n# experimental feature\n# no guarantee between APIs that readings will align or exist in all cases\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Collect ocean measurements for location and timeframe. Integrates NDBC and TidesAndCurrents datasources.",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/ivorivetta/seastate",
"Issues": "https://github.com/ivorivetta/seastate/issues"
},
"split_keywords": [
"api",
" currents",
" data",
" forecast",
" marine",
" ndbc",
" noaa",
" ocean",
" temperature",
" tides",
" weather",
" wind"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3a6753df2e9836cc261949200502649d8a0312dc82baa2199176c8fee64874e3",
"md5": "f10d6a6a6a8f25c76f4852810bc0976b",
"sha256": "1d489b1b2f2f30b3b4445c6051227f8f6819c68b95a5047b6de1ec6914cfdd0d"
},
"downloads": -1,
"filename": "seastate-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f10d6a6a6a8f25c76f4852810bc0976b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1",
"size": 40135,
"upload_time": "2024-04-14T14:24:25",
"upload_time_iso_8601": "2024-04-14T14:24:25.603121Z",
"url": "https://files.pythonhosted.org/packages/3a/67/53df2e9836cc261949200502649d8a0312dc82baa2199176c8fee64874e3/seastate-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "74825f5c3aca00e54acaed8255455eb652eb156d75b547f3e915e6d73bace905",
"md5": "4d59759bb0144c26ed11e7f704226e5e",
"sha256": "dd692f17a485662f828388f11b922d0beb912dc636e4471e68708f32a25cecfd"
},
"downloads": -1,
"filename": "seastate-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "4d59759bb0144c26ed11e7f704226e5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1",
"size": 39066,
"upload_time": "2024-04-14T14:24:27",
"upload_time_iso_8601": "2024-04-14T14:24:27.278788Z",
"url": "https://files.pythonhosted.org/packages/74/82/5f5c3aca00e54acaed8255455eb652eb156d75b547f3e915e6d73bace905/seastate-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-14 14:24:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ivorivetta",
"github_project": "seastate",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "seastate"
}