From 2a34ba3b83b9b13b882f33a1eee5b15a2faaffb1 Mon Sep 17 00:00:00 2001 From: Mathew Biddle <8480023+MathewBiddle@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:03:07 -0400 Subject: [PATCH] adding year to asset inventory webpage (#86) --- website/asset_inventory_config.json | 4 ++-- website/create_asset_inventory_page.py | 2 ++ website/templates/asset_inventory_page.html | 14 +++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/website/asset_inventory_config.json b/website/asset_inventory_config.json index ded4dbd..efaaf85 100644 --- a/website/asset_inventory_config.json +++ b/website/asset_inventory_config.json @@ -1,6 +1,6 @@ { - "general_info_text": "Browse the IOOS Asset Inventory.", - "general_title": "Browse IOOS asset inventory", + "general_info_text": "IOOS asset inventory.", + "general_title": "IOOS asset inventory", "githubpage": "https://ioos.github.io/ioos_metrics/browse", "githubrepo": "https://github.com/ioos/ioos_metrics/", "google_analytics": "https://tag_url.google.co", diff --git a/website/create_asset_inventory_page.py b/website/create_asset_inventory_page.py index 9743ae0..5648d72 100644 --- a/website/create_asset_inventory_page.py +++ b/website/create_asset_inventory_page.py @@ -120,6 +120,7 @@ def map_plot(gdf): popup=folium.features.GeoJsonPopup( fields=[ "RA", + "Year", "latitude", "longitude", "station_long_name", @@ -192,6 +193,7 @@ def main(org_config): configs = { "table": gdf.to_html(table_id="table", index=False, columns=columns), "figure": fig, + "year": gdf['Year'].unique()[0] } write_templates(configs, org_config) diff --git a/website/templates/asset_inventory_page.html b/website/templates/asset_inventory_page.html index 9bb3d87..7e6dcb1 100644 --- a/website/templates/asset_inventory_page.html +++ b/website/templates/asset_inventory_page.html @@ -51,14 +51,13 @@

NOAA Integrated Ocean Observing System Metrics

-

{{org_config.general_title}} data on ERDDAP. -

+

{{org_config.general_title}}

-

A brief description of the IOOS Asset Inventory:

+

A brief description of the IOOS asset inventory:

    -
  1. The IOOS Asset Inventory contains stationary observing systems that are/were operating at any time during the - calendar year (Jan 1 - Dec 31).
  2. +
  3. The IOOS asset inventory contains stationary observing systems that are/were operating at any time during the + calendar year (CY) (Jan 1 - Dec 31).
  4. Stationary observing systems that are exposed through one or more web services implemented by the RA. The asset must be discoverable through the IOOS Catalog. This includes: @@ -78,13 +77,18 @@

    A brief description of the IOOS Asset Inventory:

Definitions for each field can be found at the bottom of this page.

+

You can browse the entire IOOS asset inventory collection on ERDDAP.

+
+

Map of CY {{configs.year}} assets:

+
{{configs.figure}}
+

Table of CY {{configs.year}} assets:

{{configs.table}} {% raw %}