diff --git a/examples/intake-erddap.ipynb b/examples/intake-erddap.ipynb new file mode 100644 index 0000000..26bcfbf --- /dev/null +++ b/examples/intake-erddap.ipynb @@ -0,0 +1,359 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Intake-ERDDAP" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from intake_erddap.erddap_cat import ERDDAPCatalog\n", + "import intake\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "server = 'https://cioosatlantic.ca/erddap'\n", + "cat = ERDDAPCatalog(server)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['coastal_action_7471_9460_c025',\n", + " 'SMA_bay_of_exploits',\n", + " 'SMA_bay_of_islands',\n", + " 'bb1_bop_level1',\n", + " 'SMA_bonavista',\n", + " 'SMA_port_aux_basques',\n", + " 'SMA_port_aux_basqes_wharf',\n", + " 'coast-of-bays-hydrographic-2009-2013',\n", + " 'SMA_corner_brook_wharf',\n", + " 'SMA_saint_john_cruise_terminal',\n", + " 'SMA_Fortune_Bay_Buoy',\n", + " 'SMA_halifax',\n", + " 'SMA_halifax_fairview',\n", + " 'SMA_halifax_anemometer1',\n", + " 'SMA_halifax_pier9c',\n", + " 'SMA_head_of_placentia_bay-come_by_chance_point',\n", + " 'SMA_Holyrood_Buoy2',\n", + " 'SMA_holyrood_wharf',\n", + " 'SMA_bay_of_exploits_wharf',\n", + " 'SMA_manolis_buoy',\n", + " 'SMA_MouthofPlacentiaBayBuoy',\n", + " 'sma_negl_black_tickle_nlqu0003',\n", + " 'sma_negl_cartwright_junction_nlqu0004',\n", + " 'sma_negl_north_west_river_nlqu0007',\n", + " 'sma_negl_postville_nlqu0001',\n", + " 'sma_negl_red_bay_nlqu0005',\n", + " 'sma_negl_rigolet_nlqu0002',\n", + " 'SMA_red_island_shoal',\n", + " 'DFO_Sutron_NHARB',\n", + " 'DFO_Sutron_KLUMI',\n", + " 'SMA_saint_john_wharf',\n", + " 'SMA_saint_john',\n", + " 'SMA_st_johns',\n", + " 'SMA_st_johns_wharf',\n", + " 'SmartAtlantic_XEOS_hk4_buoy']" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "list(cat)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'name': 'SMA_bay_of_exploits',\n", + " 'container': 'dataframe',\n", + " 'plugin': ['erddap'],\n", + " 'description': 'ERDDAP dataset_id SMA_bay_of_exploits from https://cioosatlantic.ca/erddap',\n", + " 'direct_access': True,\n", + " 'user_parameters': [],\n", + " 'metadata': {},\n", + " 'args': {'server': 'https://cioosatlantic.ca/erddap',\n", + " 'dataset_id': 'SMA_bay_of_exploits',\n", + " 'protocol': 'tabledap'}}" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cat.SMA_bay_of_exploits.describe()" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "df = cat.SMA_manolis_buoy.read()" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | station_name | \n", + "time (UTC) | \n", + "longitude (degrees_east) | \n", + "latitude (degrees_north) | \n", + "wind_spd_avg | \n", + "wind_spd_max | \n", + "wind_dir_avg | \n", + "air_temp_avg | \n", + "air_pressure_avg | \n", + "air_humidity_avg | \n", + "air_dewpoint_avg | \n", + "surface_temp_avg | \n", + "wave_ht_max | \n", + "wave_ht_sig | \n", + "wave_period_max | \n", + "wave_dir_avg | \n", + "wave_spread_avg | \n", + "curr_dir_avg | \n", + "curr_spd_avg | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "smb_manolis | \n", + "2018-07-10T00:23:41Z | \n", + "-54.507837 | \n", + "49.675302 | \n", + "5.9 | \n", + "7.2 | \n", + "222.0 | \n", + "18.9 | \n", + "1008.1 | \n", + "NaN | \n", + "NaN | \n", + "10.9 | \n", + "0.8 | \n", + "0.5 | \n", + "8.7 | \n", + "26.0 | \n", + "46.0 | \n", + "274.1 | \n", + "104.9 | \n", + "
1 | \n", + "smb_manolis | \n", + "2018-07-10T00:53:41Z | \n", + "-54.507828 | \n", + "49.675285 | \n", + "4.8 | \n", + "6.1 | \n", + "218.0 | \n", + "18.4 | \n", + "1008.5 | \n", + "NaN | \n", + "NaN | \n", + "10.9 | \n", + "0.8 | \n", + "0.5 | \n", + "8.7 | \n", + "26.0 | \n", + "46.0 | \n", + "271.5 | \n", + "85.4 | \n", + "
2 | \n", + "smb_manolis | \n", + "2018-07-10T01:23:41Z | \n", + "-54.507797 | \n", + "49.675293 | \n", + "7.8 | \n", + "9.9 | \n", + "235.0 | \n", + "19.8 | \n", + "1008.3 | \n", + "NaN | \n", + "NaN | \n", + "10.9 | \n", + "0.8 | \n", + "0.5 | \n", + "8.7 | \n", + "26.0 | \n", + "46.0 | \n", + "301.8 | \n", + "60.2 | \n", + "
3 | \n", + "smb_manolis | \n", + "2018-07-10T01:53:41Z | \n", + "-54.507805 | \n", + "49.675285 | \n", + "7.8 | \n", + "9.7 | \n", + "237.0 | \n", + "19.1 | \n", + "1008.3 | \n", + "NaN | \n", + "NaN | \n", + "10.9 | \n", + "0.8 | \n", + "0.5 | \n", + "8.7 | \n", + "26.0 | \n", + "46.0 | \n", + "326.3 | \n", + "64.3 | \n", + "
4 | \n", + "smb_manolis | \n", + "2018-07-10T02:23:41Z | \n", + "-54.507788 | \n", + "49.675310 | \n", + "6.9 | \n", + "7.6 | \n", + "233.0 | \n", + "17.3 | \n", + "1008.3 | \n", + "NaN | \n", + "NaN | \n", + "10.8 | \n", + "0.8 | \n", + "0.5 | \n", + "8.7 | \n", + "26.0 | \n", + "46.0 | \n", + "337.1 | \n", + "57.5 | \n", + "