diff --git a/notebooks/overview.ipynb b/notebooks/overview.ipynb index 45c4fc5..23c6ea1 100644 --- a/notebooks/overview.ipynb +++ b/notebooks/overview.ipynb @@ -192,7 +192,7 @@ "
1344 rows × 12 columns
\n", + "1345 rows × 12 columns
\n", "" ], "text/plain": [ @@ -330,11 +330,11 @@ "3 13008 15.000 -38.000 0.0 \n", "4 13009 8.000 -38.000 0.0 \n", "... ... ... ... ... \n", - "1339 yata2 59.548 -139.733126 rows × 13 columns
\n", + "125 rows × 13 columns
\n", "" ], "text/plain": [ " Station Lat Lon Elevation \\\n", - "1279 tplm2 38.899 -76.436 0.0 \n", + "1280 tplm2 38.899 -76.436 0.0 \n", "213 44063 38.963 -76.448 0.0 \n", - "622 apam2 38.983 -76.479 1.4 \n", - "729 cpvm2 38.995 -76.388 3.4 \n", - "678 bslm2 38.781 -76.708 0.3 \n", + "621 apam2 38.983 -76.479 1.4 \n", + "730 cpvm2 38.995 -76.388 3.4 \n", + "676 bslm2 38.781 -76.708 0.3 \n", "... ... ... ... ... \n", - "693 cblo1 41.981 -80.556 177.0 \n", + "692 cblo1 41.981 -80.556 177.0 \n", "270 45142 42.740 -79.290 174.0 \n", "239 44402 39.314 -70.717 0.0 \n", - "1178 rprn6 43.263 -77.598 75.0 \n", - "1167 rcrn6 43.269 -77.626 76.7 \n", + "1179 rprn6 43.263 -77.598 75.0 \n", + "1168 rcrn6 43.269 -77.626 76.7 \n", "\n", " Name \\\n", - "1279 Thomas Point, MD \n", + "1280 Thomas Point, MD \n", "213 Annapolis, MD \n", - "622 8575512 - Annapolis, MD \n", - "729 8575437 - Chesapeake Bay Bridge Visibility, MD \n", - "678 Jug Bay, Chesapeake Bay Reserve, MD \n", + "621 8575512 - Annapolis, MD \n", + "730 8575437 - Chesapeake Bay Bridge Visibility, MD \n", + "676 Jug Bay, Chesapeake Bay Reserve, MD \n", "... ... \n", - "693 Conneaut Breakwater Light, OH \n", + "692 Conneaut Breakwater Light, OH \n", "270 Port Colborne \n", "239 SOUTHEAST BLOCK CANYON - 130 NM SE of Fire Isl... \n", - "1178 Rochester Coast Guard, NY \n", - "1167 9052058 - Rochester, NY \n", + "1179 Rochester Coast Guard, NY \n", + "1168 9052058 - Rochester, NY \n", "\n", " Owner \\\n", - "1279 NDBC \n", + "1280 NDBC \n", "213 Chesapeake Bay Interpretive Buoy System (CBIBS) \n", - "622 NOS \n", - "729 NOAA NOS PORTS \n", - "678 National Estuarine Research Reserve System \n", + "621 NOS \n", + "730 NOAA NOS PORTS \n", + "676 National Estuarine Research Reserve System \n", "... ... \n", - "693 NWS Eastern Region \n", + "692 NWS Eastern Region \n", "270 Environment and Climate Change Canada \n", "239 NDBC \n", - "1178 NWS Eastern Region \n", - "1167 NOS \n", + "1179 NWS Eastern Region \n", + "1168 NOS \n", "\n", " Program Type Includes Meteorology \\\n", - "1279 NDBC Meteorological/Ocean fixed True \n", - "213 IOOS Partners buoy True \n", - "622 NOS/CO-OPS fixed True \n", - "729 NOS/CO-OPS fixed True \n", - "678 NERRS fixed True \n", + "1280 NDBC Meteorological/Ocean fixed True \n", + "213 IOOS Partners buoy False \n", + "621 NOS/CO-OPS fixed True \n", + "730 NOS/CO-OPS fixed True \n", + "676 NERRS fixed True \n", "... ... ... ... \n", - "693 IOOS Partners fixed True \n", - "270 International Partners buoy True \n", + "692 IOOS Partners fixed True \n", + "270 International Partners buoy False \n", "239 Tsunami dart False \n", - "1178 IOOS Partners fixed True \n", - "1167 NOS/CO-OPS fixed True \n", + "1179 IOOS Partners fixed True \n", + "1168 NOS/CO-OPS fixed True \n", "\n", " Includes Currents Includes Water Quality DART Program distance \n", - "1279 False False False 2.177979 \n", - "213 True True False 9.369909 \n", - "622 False False False 12.225590 \n", - "729 False False False 13.307985 \n", - "678 False False False 26.506690 \n", + "1280 False False False 2.177979 \n", + "213 False False False 9.369909 \n", + "621 False False False 12.225590 \n", + "730 False False False 13.307985 \n", + "676 False False False 26.506690 \n", "... ... ... ... ... \n", - "693 False False False 491.192873 \n", + "692 False False False 491.192873 \n", "270 False False False 492.561301 \n", "239 False False True 495.825675 \n", - "1178 False False False 497.635930 \n", - "1167 False False False 498.756609 \n", + "1179 False False False 497.635930 \n", + "1168 False False False 498.756609 \n", "\n", - "[126 rows x 13 columns]" + "[125 rows x 13 columns]" ] }, - "execution_count": 9, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -1090,7 +1102,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -1112,7 +1124,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -1248,7 +1260,7 @@ "TIDE NaN NaN NaN" ] }, - "execution_count": 18, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -1259,7 +1271,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -1309,7 +1321,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -1642,7 +1654,7 @@ " Timestamp('2020-01-02 00:00:00'): nan}}]}" ] }, - "execution_count": 20, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -1666,7 +1678,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -1692,7 +1704,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -1821,7 +1833,7 @@ "TIDE NaN NaN NaN" ] }, - "execution_count": 22, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -1839,7 +1851,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -32878,7 +32890,7 @@ " ...}}]}" ] }, - "execution_count": 24, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -32906,628 +32918,305 @@ "source": [ "The NDBC API now supports retrieving data across stations and modes in the native `DODS NetCDF4` [format](https://dods.ndbc.noaa.gov/) provided by [THREDDS](https://dods.ndbc.noaa.gov/thredds/catalog/data/catalog.html). This data is retrieved from the DODS server through HTTPS, with the resulting data matching the quality-controlled records as closely as possible.\n", "\n", - "Data retrieval through THREDDS is controlled using the `use_opendap` argument (defaults to `False`).\n", + "Data retrieval through THREDDS is controlled using the `as_xarray_dataset` argument (defaults to `False`).\n", "\n", "As with the standard usage of the `get_data` method, the `start_time`, `end_time`, and `cols` arguments can be used to efficiently filter data during retrieval." ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ - "ds = api.get_data(station_ids=[\"tplm2\"], modes=[\"stdmet\"], start_time=\"2019-06-01\", end_time=\"2024-06-01\", use_opendap=True)" + "ds = api.get_data(station_ids=[\"tplm2\"], modes=[\"stdmet\"], start_time=\"2019-06-01\", end_time=\"2024-06-01\", as_xarray_dataset=True)" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "<xarray.Dataset> Size: 3MB\n", - "Dimensions: (time: 39874, latitude: 1, longitude: 1)\n", - "Coordinates:\n", - " * time (time) datetime64[ns] 319kB 2019-06-01 ... 2023-...\n", - " * latitude (latitude) float32 4B 38.9\n", - " * longitude (longitude) float32 4B -76.44\n", - "Data variables: (12/14)\n", - " wind_dir (time, latitude, longitude) float64 319kB 92.0 ....\n", - " wind_spd (time, latitude, longitude) float32 159kB 1.8 .....\n", - " gust (time, latitude, longitude) float32 159kB 1.9 .....\n", - " wave_height (time, latitude, longitude) float32 159kB nan .....\n", - " dominant_wpd (time, latitude, longitude) timedelta64[ns] 319kB ...\n", - " average_wpd (time, latitude, longitude) timedelta64[ns] 319kB ...\n", - " ... ...\n", - " air_temperature (time, latitude, longitude) float32 159kB 25.5 ....\n", - " sea_surface_temperature (time, latitude, longitude) float32 159kB 23.7 ....\n", - " dewpt_temperature (time, latitude, longitude) float32 159kB 17.2 ....\n", - " visibility (time, latitude, longitude) float32 159kB nan .....\n", - " water_level (time, latitude, longitude) float32 159kB nan .....\n", - " station_id <U5 20B 'tplm2'\n", - "Attributes:\n", - " institution: NOAA National Data Buoy Center and Participators in Data As...\n", - " url: http://dods.ndbc.noaa.gov\n", - " quality: Automated QC checks with manual editing and comprehensive m...\n", - " conventions: COARDS\n", - " station: tplm2\n", - " comment: Thomas Point, MD\n", - " location: 38.899 N 76.436 W