Skip to content

Instantly share code, notes, and snippets.

@MathewBiddle
Created August 22, 2023 20:02
Show Gist options
  • Save MathewBiddle/ccdd519acde10a82eae742224a578a96 to your computer and use it in GitHub Desktop.
Save MathewBiddle/ccdd519acde10a82eae742224a578a96 to your computer and use it in GitHub Desktop.
count_asset_inventory_platforms.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"name": "count_asset_inventory_platforms.ipynb",
"authorship_tag": "ABX9TyPu1hmUPPZ4ei5x6UkrZiAv",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/MathewBiddle/ccdd519acde10a82eae742224a578a96/datatypes_available_on_erddap.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"source": [
"!pip install erddapy"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "RTEcRpBTHd9F",
"outputId": "96422fd0-7d08-43ea-8473-51ff35449a7f"
},
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting erddapy\n",
" Downloading erddapy-2.2.0-py3-none-any.whl (22 kB)\n",
"Collecting httpx (from erddapy)\n",
" Downloading httpx-0.24.1-py3-none-any.whl (75 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.4/75.4 kB\u001b[0m \u001b[31m1.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pandas<3,>=0.25.2 in /usr/local/lib/python3.10/dist-packages (from erddapy) (1.5.3)\n",
"Requirement already satisfied: pytz in /usr/local/lib/python3.10/dist-packages (from erddapy) (2023.3)\n",
"Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3,>=0.25.2->erddapy) (2.8.2)\n",
"Requirement already satisfied: numpy>=1.21.0 in /usr/local/lib/python3.10/dist-packages (from pandas<3,>=0.25.2->erddapy) (1.23.5)\n",
"Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->erddapy) (2023.7.22)\n",
"Collecting httpcore<0.18.0,>=0.15.0 (from httpx->erddapy)\n",
" Downloading httpcore-0.17.3-py3-none-any.whl (74 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m74.5/74.5 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->erddapy) (3.4)\n",
"Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->erddapy) (1.3.0)\n",
"Collecting h11<0.15,>=0.13 (from httpcore<0.18.0,>=0.15.0->httpx->erddapy)\n",
" Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.18.0,>=0.15.0->httpx->erddapy) (3.7.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas<3,>=0.25.2->erddapy) (1.16.0)\n",
"Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx->erddapy) (1.1.3)\n",
"Installing collected packages: h11, httpcore, httpx, erddapy\n",
"Successfully installed erddapy-2.2.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Look at asset inventory for platforms."
],
"metadata": {
"id": "XLfgEQO6kCbU"
}
},
{
"cell_type": "code",
"source": [
"from erddapy import ERDDAP\n",
"import pandas as pd\n",
"\n",
"server = 'https://erddap.ioos.us/erddap/'\n",
"\n",
"e = ERDDAP(\n",
" server=server,\n",
" protocol=\"tabledap\",\n",
" response=\"csv\"\n",
")\n",
"\n",
"dataset_id = 'processed_asset_inventory'\n",
"\n",
"info_url = e.get_download_url(dataset_id=dataset_id, response=\"csv\")\n",
"\n",
"df = pd.read_csv(info_url)\n",
"\n",
"df"
],
"metadata": {
"id": "KEXnYfjPyFO2",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 652
},
"outputId": "ef3bbeba-8739-4686-e4ca-f0d6eb5da78e"
},
"execution_count": 31,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Year RA latitude longitude \\\n",
"0 NaN NaN degrees_north degrees_east \n",
"1 2020.0 AOOS 71.6 -161.5 \n",
"2 2020.0 AOOS 59.0142 -148.6902 \n",
"3 2020.0 AOOS 59.0165 -148.696 \n",
"4 2020.0 AOOS 59.845 -149.466667 \n",
"... ... ... ... ... \n",
"1758 2022.0 SECOORA 27.2089 -80.248 \n",
"1759 2022.0 SECOORA 27.1142 -80.2829 \n",
"1760 2022.0 SECOORA 35.75 -75.33 \n",
"1761 2022.0 SECOORA 36.0013 -75.421 \n",
"1762 2022.0 SECOORA 35.25925 -75.2861 \n",
"\n",
" station_long_name Platform Operational \\\n",
"0 NaN NaN NaN \n",
"1 Chukchi Sea Ecosystem Mooring (CSESM) Array moored_buoy Y \n",
"2 Gulf of Alaska Ecosystem Observatory-GEO1 moored_buoy Y \n",
"3 Gulf of Alaska Ecosystem Observatory-GEO3 moored_buoy Y \n",
"4 Oceanographic Station GAK1 moored_buoy Y \n",
"... ... ... ... \n",
"1758 St. Lucie Estuary - Middle Estuary moored_buoy Y \n",
"1759 St. Lucie Estuary - South Fork 2 moored_buoy Y \n",
"1760 Oregon Inlet wave_buoy Y \n",
"1761 Nags Head wave_buoy Y \n",
"1762 Cape Hatteras East wave_buoy Y \n",
"\n",
" station_deployment RA_Funded Water_temp ... TCO2 pH OmgArag_st Chl \\\n",
"0 NaN NaN NaN ... NaN NaN NaN NaN \n",
"1 2015-09-01 00:00:00 Yp X ... NaN X NaN NaN \n",
"2 2019-07-11 00:00:00 Yp X ... NaN NaN NaN X \n",
"3 2019-07-11 00:00:00 Yp X ... NaN NaN NaN X \n",
"4 1905-06-20 00:00:00 N X ... NaN NaN NaN NaN \n",
"... ... ... ... ... ... ... ... ... \n",
"1758 > 5 yr N X ... NaN NaN NaN X \n",
"1759 > 5 yr N X ... NaN NaN NaN X \n",
"1760 2012-04-08 00:00:00 N NaN ... NaN NaN NaN NaN \n",
"1761 2018-09-07 00:00:00 N NaN ... NaN NaN NaN NaN \n",
"1762 2021-08-02 00:00:00 N NaN ... NaN NaN NaN NaN \n",
"\n",
" Nitrate CDOM Alkalinity Acoustics \\\n",
"0 NaN NaN NaN NaN \n",
"1 X NaN NaN X \n",
"2 NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"... ... ... ... ... \n",
"1758 X NaN NaN NaN \n",
"1759 X NaN NaN NaN \n",
"1760 NaN NaN NaN NaN \n",
"1761 NaN NaN NaN NaN \n",
"1762 NaN NaN NaN NaN \n",
"\n",
" Raw_Vars crs \n",
"0 NaN NaN \n",
"1 sea_water_temperature (35m, 48m, near-bottom),... NaN \n",
"2 Real time mooring: 150kHz ADCP (205m), SBE 37 ... NaN \n",
"3 Real time mooring: GPS, wind_speed, wind_from_... NaN \n",
"4 NOT REAL TIME: sea_water_temperature (30 m, 60... NaN \n",
"... ... .. \n",
"1758 sea_water_temperature, air_temperatue, relativ... NaN \n",
"1759 sea_water_temperature, air_temperatue, relativ... NaN \n",
"1760 sea_surface_wave_significant_height, sea_surfa... NaN \n",
"1761 sea_surface_wave_significant_height, sea_surfa... NaN \n",
"1762 sea_surface_wave_significant_height, sea_surfa... NaN \n",
"\n",
"[1763 rows x 37 columns]"
],
"text/html": [
"\n",
" <div id=\"df-b35ec385-dd60-499d-abe5-3be84e8b80c9\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Year</th>\n",
" <th>RA</th>\n",
" <th>latitude</th>\n",
" <th>longitude</th>\n",
" <th>station_long_name</th>\n",
" <th>Platform</th>\n",
" <th>Operational</th>\n",
" <th>station_deployment</th>\n",
" <th>RA_Funded</th>\n",
" <th>Water_temp</th>\n",
" <th>...</th>\n",
" <th>TCO2</th>\n",
" <th>pH</th>\n",
" <th>OmgArag_st</th>\n",
" <th>Chl</th>\n",
" <th>Nitrate</th>\n",
" <th>CDOM</th>\n",
" <th>Alkalinity</th>\n",
" <th>Acoustics</th>\n",
" <th>Raw_Vars</th>\n",
" <th>crs</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>degrees_north</td>\n",
" <td>degrees_east</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2020.0</td>\n",
" <td>AOOS</td>\n",
" <td>71.6</td>\n",
" <td>-161.5</td>\n",
" <td>Chukchi Sea Ecosystem Mooring (CSESM) Array</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>2015-09-01 00:00:00</td>\n",
" <td>Yp</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>sea_water_temperature (35m, 48m, near-bottom),...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2020.0</td>\n",
" <td>AOOS</td>\n",
" <td>59.0142</td>\n",
" <td>-148.6902</td>\n",
" <td>Gulf of Alaska Ecosystem Observatory-GEO1</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>2019-07-11 00:00:00</td>\n",
" <td>Yp</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Real time mooring: 150kHz ADCP (205m), SBE 37 ...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2020.0</td>\n",
" <td>AOOS</td>\n",
" <td>59.0165</td>\n",
" <td>-148.696</td>\n",
" <td>Gulf of Alaska Ecosystem Observatory-GEO3</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>2019-07-11 00:00:00</td>\n",
" <td>Yp</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Real time mooring: GPS, wind_speed, wind_from_...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2020.0</td>\n",
" <td>AOOS</td>\n",
" <td>59.845</td>\n",
" <td>-149.466667</td>\n",
" <td>Oceanographic Station GAK1</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>1905-06-20 00:00:00</td>\n",
" <td>N</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NOT REAL TIME: sea_water_temperature (30 m, 60...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1758</th>\n",
" <td>2022.0</td>\n",
" <td>SECOORA</td>\n",
" <td>27.2089</td>\n",
" <td>-80.248</td>\n",
" <td>St. Lucie Estuary - Middle Estuary</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>&gt; 5 yr</td>\n",
" <td>N</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>sea_water_temperature, air_temperatue, relativ...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1759</th>\n",
" <td>2022.0</td>\n",
" <td>SECOORA</td>\n",
" <td>27.1142</td>\n",
" <td>-80.2829</td>\n",
" <td>St. Lucie Estuary - South Fork 2</td>\n",
" <td>moored_buoy</td>\n",
" <td>Y</td>\n",
" <td>&gt; 5 yr</td>\n",
" <td>N</td>\n",
" <td>X</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>X</td>\n",
" <td>X</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>sea_water_temperature, air_temperatue, relativ...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1760</th>\n",
" <td>2022.0</td>\n",
" <td>SECOORA</td>\n",
" <td>35.75</td>\n",
" <td>-75.33</td>\n",
" <td>Oregon Inlet</td>\n",
" <td>wave_buoy</td>\n",
" <td>Y</td>\n",
" <td>2012-04-08 00:00:00</td>\n",
" <td>N</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>sea_surface_wave_significant_height, sea_surfa...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1761</th>\n",
" <td>2022.0</td>\n",
" <td>SECOORA</td>\n",
" <td>36.0013</td>\n",
" <td>-75.421</td>\n",
" <td>Nags Head</td>\n",
" <td>wave_buoy</td>\n",
" <td>Y</td>\n",
" <td>2018-09-07 00:00:00</td>\n",
" <td>N</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>sea_surface_wave_significant_height, sea_surfa...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1762</th>\n",
" <td>2022.0</td>\n",
" <td>SECOORA</td>\n",
" <td>35.25925</td>\n",
" <td>-75.2861</td>\n",
" <td>Cape Hatteras East</td>\n",
" <td>wave_buoy</td>\n",
" <td>Y</td>\n",
" <td>2021-08-02 00:00:00</td>\n",
" <td>N</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>sea_surface_wave_significant_height, sea_surfa...</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1763 rows × 37 columns</p>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b35ec385-dd60-499d-abe5-3be84e8b80c9')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-b35ec385-dd60-499d-abe5-3be84e8b80c9 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-b35ec385-dd60-499d-abe5-3be84e8b80c9');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-48d6660b-515c-47e9-a88b-e541fc519ac7\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-48d6660b-515c-47e9-a88b-e541fc519ac7')\"\n",
" title=\"Suggest charts.\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-48d6660b-515c-47e9-a88b-e541fc519ac7 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
]
},
"metadata": {},
"execution_count": 31
}
]
},
{
"cell_type": "markdown",
"source": [
"Collect yearly count of platforms. print to csv to copy into spreadsheet."
],
"metadata": {
"id": "9Y9IfJ1k1LhY"
}
},
{
"cell_type": "code",
"source": [
"df.loc[df['Year']==2022].groupby(by=['Platform']).count()\n",
""
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 800
},
"id": "rvEWmgyfxJo5",
"outputId": "81df81fa-8eb3-4d0d-c275-8540dcd9bbc4"
},
"execution_count": 33,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Year RA latitude longitude \\\n",
"Platform \n",
" upward_sea_water_velocity 1 1 1 1 \n",
"Ffixed 1 1 1 1 \n",
"Moored buoy 9 9 9 9 \n",
"Wave_buoy 1 1 1 1 \n",
"Waverider Buoy 7 7 7 7 \n",
"academic 9 9 9 9 \n",
"fixed 301 301 301 301 \n",
"fixed intake 3 3 3 3 \n",
"fixed intertidal 1 1 1 1 \n",
"fixed pier 16 16 16 16 \n",
"fixed shore platform 26 26 26 26 \n",
"land station 2 2 2 2 \n",
"moored buoy 12 12 12 12 \n",
"moored shellfish raft 1 1 1 1 \n",
"moored_buoy 140 140 140 140 \n",
"offshore_platform 101 101 101 101 \n",
"profiling buoy 7 7 7 7 \n",
"rotating locations in fishpond 1 1 1 1 \n",
"ship 9 9 9 9 \n",
"tide_station 10 10 10 10 \n",
"tower 25 25 25 25 \n",
"wave_buoy 24 24 24 24 \n",
"\n",
" station_long_name Operational \\\n",
"Platform \n",
" upward_sea_water_velocity 1 1 \n",
"Ffixed 1 1 \n",
"Moored buoy 9 9 \n",
"Wave_buoy 1 1 \n",
"Waverider Buoy 7 7 \n",
"academic 9 9 \n",
"fixed 301 301 \n",
"fixed intake 3 3 \n",
"fixed intertidal 1 1 \n",
"fixed pier 16 16 \n",
"fixed shore platform 26 26 \n",
"land station 2 2 \n",
"moored buoy 12 12 \n",
"moored shellfish raft 1 1 \n",
"moored_buoy 140 140 \n",
"offshore_platform 101 101 \n",
"profiling buoy 7 7 \n",
"rotating locations in fishpond 1 1 \n",
"ship 9 9 \n",
"tide_station 10 10 \n",
"tower 25 25 \n",
"wave_buoy 24 24 \n",
"\n",
" station_deployment RA_Funded Water_temp \\\n",
"Platform \n",
" upward_sea_water_velocity 1 1 0 \n",
"Ffixed 1 1 1 \n",
"Moored buoy 9 9 0 \n",
"Wave_buoy 1 1 1 \n",
"Waverider Buoy 7 7 5 \n",
"academic 9 9 9 \n",
"fixed 301 299 144 \n",
"fixed intake 2 3 3 \n",
"fixed intertidal 1 1 1 \n",
"fixed pier 15 15 12 \n",
"fixed shore platform 26 26 26 \n",
"land station 2 2 0 \n",
"moored buoy 12 12 10 \n",
"moored shellfish raft 1 1 1 \n",
"moored_buoy 135 140 124 \n",
"offshore_platform 101 101 100 \n",
"profiling buoy 7 7 7 \n",
"rotating locations in fishpond 1 1 1 \n",
"ship 9 9 9 \n",
"tide_station 10 10 10 \n",
"tower 25 25 13 \n",
"wave_buoy 24 24 18 \n",
"\n",
" Salinity ... TCO2 pH OmgArag_st Chl \\\n",
"Platform ... \n",
" upward_sea_water_velocity 0 ... 0 0 0 0 \n",
"Ffixed 1 ... 0 0 0 0 \n",
"Moored buoy 6 ... 0 1 0 2 \n",
"Wave_buoy 0 ... 0 0 0 0 \n",
"Waverider Buoy 0 ... 0 0 0 0 \n",
"academic 2 ... 0 0 0 0 \n",
"fixed 97 ... 3 41 4 57 \n",
"fixed intake 3 ... 0 0 1 1 \n",
"fixed intertidal 0 ... 0 0 0 1 \n",
"fixed pier 12 ... 1 0 0 12 \n",
"fixed shore platform 24 ... 0 20 5 10 \n",
"land station 0 ... 0 0 0 0 \n",
"moored buoy 10 ... 0 5 0 7 \n",
"moored shellfish raft 1 ... 0 1 0 1 \n",
"moored_buoy 56 ... 0 32 0 56 \n",
"offshore_platform 98 ... 0 0 0 0 \n",
"profiling buoy 7 ... 0 6 0 5 \n",
"rotating locations in fishpond 1 ... 0 0 0 1 \n",
"ship 0 ... 0 0 0 9 \n",
"tide_station 0 ... 0 0 0 0 \n",
"tower 7 ... 0 0 0 2 \n",
"wave_buoy 0 ... 0 0 0 0 \n",
"\n",
" Nitrate CDOM Alkalinity Acoustics \\\n",
"Platform \n",
" upward_sea_water_velocity 0 0 0 0 \n",
"Ffixed 0 0 0 0 \n",
"Moored buoy 0 0 0 0 \n",
"Wave_buoy 0 0 0 0 \n",
"Waverider Buoy 0 0 0 0 \n",
"academic 0 0 0 0 \n",
"fixed 9 1 4 0 \n",
"fixed intake 0 0 1 0 \n",
"fixed intertidal 0 0 0 0 \n",
"fixed pier 0 0 0 0 \n",
"fixed shore platform 0 4 5 0 \n",
"land station 0 0 0 0 \n",
"moored buoy 1 2 0 0 \n",
"moored shellfish raft 0 0 0 0 \n",
"moored_buoy 15 5 0 1 \n",
"offshore_platform 0 0 0 0 \n",
"profiling buoy 0 0 0 0 \n",
"rotating locations in fishpond 0 0 0 0 \n",
"ship 9 0 0 0 \n",
"tide_station 0 0 0 0 \n",
"tower 0 0 0 0 \n",
"wave_buoy 0 0 0 0 \n",
"\n",
" Raw_Vars crs \n",
"Platform \n",
" upward_sea_water_velocity 0 0 \n",
"Ffixed 1 0 \n",
"Moored buoy 9 0 \n",
"Wave_buoy 1 0 \n",
"Waverider Buoy 7 0 \n",
"academic 9 0 \n",
"fixed 298 0 \n",
"fixed intake 3 0 \n",
"fixed intertidal 1 0 \n",
"fixed pier 12 0 \n",
"fixed shore platform 26 0 \n",
"land station 2 0 \n",
"moored buoy 11 0 \n",
"moored shellfish raft 1 0 \n",
"moored_buoy 140 0 \n",
"offshore_platform 101 0 \n",
"profiling buoy 7 0 \n",
"rotating locations in fishpond 1 0 \n",
"ship 9 0 \n",
"tide_station 10 0 \n",
"tower 25 0 \n",
"wave_buoy 24 0 \n",
"\n",
"[22 rows x 36 columns]"
],
"text/html": [
"\n",
" <div id=\"df-ad71ffbc-f41e-48d9-865a-7bd47443d80a\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Year</th>\n",
" <th>RA</th>\n",
" <th>latitude</th>\n",
" <th>longitude</th>\n",
" <th>station_long_name</th>\n",
" <th>Operational</th>\n",
" <th>station_deployment</th>\n",
" <th>RA_Funded</th>\n",
" <th>Water_temp</th>\n",
" <th>Salinity</th>\n",
" <th>...</th>\n",
" <th>TCO2</th>\n",
" <th>pH</th>\n",
" <th>OmgArag_st</th>\n",
" <th>Chl</th>\n",
" <th>Nitrate</th>\n",
" <th>CDOM</th>\n",
" <th>Alkalinity</th>\n",
" <th>Acoustics</th>\n",
" <th>Raw_Vars</th>\n",
" <th>crs</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Platform</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>upward_sea_water_velocity</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Ffixed</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Moored buoy</th>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wave_buoy</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Waverider Buoy</th>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>academic</th>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>2</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fixed</th>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>301</td>\n",
" <td>299</td>\n",
" <td>144</td>\n",
" <td>97</td>\n",
" <td>...</td>\n",
" <td>3</td>\n",
" <td>41</td>\n",
" <td>4</td>\n",
" <td>57</td>\n",
" <td>9</td>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>298</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fixed intake</th>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fixed intertidal</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fixed pier</th>\n",
" <td>16</td>\n",
" <td>16</td>\n",
" <td>16</td>\n",
" <td>16</td>\n",
" <td>16</td>\n",
" <td>16</td>\n",
" <td>15</td>\n",
" <td>15</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>12</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>12</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fixed shore platform</th>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>26</td>\n",
" <td>24</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>20</td>\n",
" <td>5</td>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>26</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>land station</th>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>moored buoy</th>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>11</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>moored shellfish raft</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>moored_buoy</th>\n",
" <td>140</td>\n",
" <td>140</td>\n",
" <td>140</td>\n",
" <td>140</td>\n",
" <td>140</td>\n",
" <td>140</td>\n",
" <td>135</td>\n",
" <td>140</td>\n",
" <td>124</td>\n",
" <td>56</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>32</td>\n",
" <td>0</td>\n",
" <td>56</td>\n",
" <td>15</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>140</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>offshore_platform</th>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>101</td>\n",
" <td>100</td>\n",
" <td>98</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>101</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>profiling buoy</th>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>0</td>\n",
" <td>5</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>rotating locations in fishpond</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ship</th>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tide_station</th>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tower</th>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>25</td>\n",
" <td>13</td>\n",
" <td>7</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>25</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>wave_buoy</th>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>18</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>24</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>22 rows × 36 columns</p>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-ad71ffbc-f41e-48d9-865a-7bd47443d80a')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-ad71ffbc-f41e-48d9-865a-7bd47443d80a button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-ad71ffbc-f41e-48d9-865a-7bd47443d80a');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-25364fc2-197e-4f47-a003-8599810b423a\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-25364fc2-197e-4f47-a003-8599810b423a')\"\n",
" title=\"Suggest charts.\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-25364fc2-197e-4f47-a003-8599810b423a button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
]
},
"metadata": {},
"execution_count": 33
}
]
},
{
"cell_type": "markdown",
"source": [
"Print as csv to copy to google sheets."
],
"metadata": {
"id": "Mjg_UzVc1kMq"
}
},
{
"cell_type": "code",
"source": [
"df.loc[df['Year']==2022].groupby(by=['Platform']).count()['Year'].to_csv()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 53
},
"id": "QBcxCLp21XA4",
"outputId": "133936b2-b8d3-4667-87c7-a6eff467ee41"
},
"execution_count": 34,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'Platform,Year\\n upward_sea_water_velocity,1\\nFfixed,1\\nMoored buoy,9\\nWave_buoy,1\\nWaverider Buoy,7\\nacademic,9\\nfixed,301\\nfixed intake,3\\nfixed intertidal,1\\nfixed pier,16\\nfixed shore platform,26\\nland station,2\\nmoored buoy,12\\nmoored shellfish raft,1\\nmoored_buoy,140\\noffshore_platform,101\\nprofiling buoy,7\\nrotating locations in fishpond,1\\nship,9\\ntide_station,10\\ntower,25\\nwave_buoy,24\\n'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 34
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "H6KWK7C51tHD"
},
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment