Skip to content

Commit f43d1c7

Browse files
committed
Add feed publisher thumbnails
1 parent 005b706 commit f43d1c7

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

publishers/met_office_global_spot/bootstrap_met_office_global_spot.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@
3333
GLOBAL_SPOT_API_CONTEXT = "/sitespecific/v0"
3434
GLOBAL_SPOT_BASE_URL = "https://data.hub.api.metoffice.gov.uk/sitespecific/v0"
3535
GLOBAL_SPOT_DEFAULT_HOURLY_PATH = "/point/hourly"
36+
GLOBAL_SPOT_THUMBNAIL_DATA_URI = (
37+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E"
38+
"%3Crect width='320' height='200' fill='%23082f49'/%3E"
39+
"%3Cpath d='M0 138 C44 112 82 160 128 132 S210 92 320 126 L320 200 L0 200 Z' fill='%230f766e'/%3E"
40+
"%3Cpath d='M0 158 C58 128 104 178 166 144 S258 118 320 146' fill='none' stroke='%235eead4' stroke-width='3' opacity='.75'/%3E"
41+
"%3Ccircle cx='238' cy='58' r='26' fill='%23fef3c7'/%3E"
42+
"%3Cpath d='M70 66 h86 a26 26 0 0 0 -44 -18 a35 35 0 0 0 -66 11 a22 22 0 0 0 24 7z' fill='%23e0f2fe'/%3E"
43+
"%3Cpath d='M68 96 h178' stroke='%2393c5fd' stroke-width='4' stroke-linecap='round' stroke-dasharray='12 9'/%3E"
44+
"%3Ctext x='160' y='178' text-anchor='middle' font-family='Arial,sans-serif' font-size='19' font-weight='700' fill='%23f8fafc'%3EGlobal Spot Forecast%3C/text%3E"
45+
"%3C/svg%3E"
46+
)
3647

3748

3849
def _load_config() -> dict:
@@ -177,6 +188,15 @@ def _system_sml(location: dict) -> dict:
177188
{"role": "http://dbpedia.org/resource/Web_page", "name": "Site-Specific Forecast Overview", "link": {"href": SITE_SPECIFIC_OVERVIEW, "type": "text/html"}},
178189
{"role": "http://dbpedia.org/resource/Web_page", "name": "Forecast point query", "description": "Configured hourly Global Spot forecast query for this point. The exact endpoint path may be overridden at runtime.", "link": {"href": _forecast_url(location), "type": "application/json"}},
179190
{"role": "http://dbpedia.org/resource/Web_page", "name": "Weather DataHub Glossary", "link": {"href": MET_OFFICE_GLOSSARY, "type": "text/html"}},
191+
{
192+
"role": "http://dbpedia.org/resource/Photograph",
193+
"name": "Representative Global Spot Forecast Thumbnail",
194+
"description": (
195+
"Original OS4CSAPI SVG thumbnail for a Met Office Global Spot virtual forecast point. "
196+
"This represents forecast data, not a physical deployed sensor."
197+
),
198+
"link": {"href": GLOBAL_SPOT_THUMBNAIL_DATA_URI, "type": "image/svg+xml"},
199+
},
180200
],
181201
"characteristics": [{"label": "Forecast Point Properties", "characteristics": [
182202
{"type": "Text", "name": "curated_location_id", "label": "Curated Forecast Point ID", "value": location["id"]},

publishers/opensky/bootstrap_opensky.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@
6666
OPENSKY_ABOUT = "https://opensky-network.org/about/about-us"
6767
OPENSKY_STATE_VECTORS_DOC = "https://openskynetwork.github.io/opensky-api/index.html#state-vectors"
6868
OPENSKY_AUTH_TOKEN_URL = "https://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token"
69+
OPENSKY_THUMBNAIL_DATA_URI = (
70+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E"
71+
"%3Crect width='320' height='200' fill='%230f172a'/%3E"
72+
"%3Cpath d='M42 150 C95 92 220 92 278 150' fill='none' stroke='%2338bdf8' stroke-width='4' stroke-dasharray='10 8'/%3E"
73+
"%3Cpath d='M72 132 C122 96 198 96 248 132' fill='none' stroke='%237dd3fc' stroke-width='3' stroke-dasharray='7 7'/%3E"
74+
"%3Ccircle cx='160' cy='150' r='8' fill='%23f8fafc'/%3E"
75+
"%3Cpath d='M160 52 l78 31 -64 10 -18 46 -16 -49 -58 -12z' fill='%23e0f2fe' stroke='%230ea5e9' stroke-width='3'/%3E"
76+
"%3Ctext x='160' y='178' text-anchor='middle' font-family='Arial,sans-serif' font-size='20' font-weight='700' fill='%23f8fafc'%3EOpenSky ADS-B Feed%3C/text%3E"
77+
"%3C/svg%3E"
78+
)
6979

7080
# ── Contact ──────────────────────────────────────────────────────────────
7181
OPENSKY_CONTACT_ORG = "The OpenSky Network Association"
@@ -339,6 +349,15 @@ def _system_sml(config: dict) -> dict:
339349
"description": "Operator/about page for the OpenSky Network Association.",
340350
"link": {"href": OPENSKY_ABOUT, "type": "text/html"},
341351
},
352+
{
353+
"role": "http://dbpedia.org/resource/Photograph",
354+
"name": "Representative OpenSky ADS-B Feed Thumbnail",
355+
"description": (
356+
"Original OS4CSAPI SVG thumbnail representing the OpenSky ADS-B feed adapter. "
357+
"This is not a station-specific photograph or an aircraft-specific observation."
358+
),
359+
"link": {"href": OPENSKY_THUMBNAIL_DATA_URI, "type": "image/svg+xml"},
360+
},
342361
],
343362
"characteristics": [
344363
{

publishers/usgs_eq/bootstrap_usgs_eq.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@
7272
USGS_EQ_LIFECYCLE = "https://earthquake.usgs.gov/earthquakes/feed/policy.php"
7373
USGS_EQ_EVENT_TERMS = "https://earthquake.usgs.gov/data/comcat/data-eventterms.php"
7474
USGS_EQ_FDSN_EVENT_API = "https://earthquake.usgs.gov/fdsnws/event/1/"
75+
USGS_EQ_THUMBNAIL_DATA_URI = (
76+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E"
77+
"%3Crect width='320' height='200' fill='%2318120f'/%3E"
78+
"%3Cpath d='M0 142 L42 142 L56 116 L70 164 L88 72 L106 152 L124 132 L142 142 L320 142' fill='none' stroke='%23f97316' stroke-width='5'/%3E"
79+
"%3Ccircle cx='92' cy='142' r='46' fill='none' stroke='%23fed7aa' stroke-width='3' opacity='.75'/%3E"
80+
"%3Ccircle cx='92' cy='142' r='78' fill='none' stroke='%23fdba74' stroke-width='2' opacity='.45'/%3E"
81+
"%3Ccircle cx='92' cy='142' r='110' fill='none' stroke='%23fb923c' stroke-width='2' opacity='.25'/%3E"
82+
"%3Ctext x='160' y='48' text-anchor='middle' font-family='Arial,sans-serif' font-size='22' font-weight='700' fill='%23fff7ed'%3EUSGS Earthquake Feed%3C/text%3E"
83+
"%3Ctext x='160' y='178' text-anchor='middle' font-family='Arial,sans-serif' font-size='14' fill='%23fed7aa'%3Eevent stream thumbnail%3C/text%3E"
84+
"%3C/svg%3E"
85+
)
7586

7687
USGS_EQ_FEED_VARIANTS = {
7788
"all_hour": "All earthquakes, past hour",
@@ -227,6 +238,14 @@ def _system_sml(config: dict) -> dict:
227238
{"name": "ComCat Documentation", "description": "Catalog and product documentation", "link": {"href": USGS_EQ_GLOSSARY}},
228239
{"name": "Event Terms", "description": "Official field semantics", "link": {"href": USGS_EQ_EVENT_TERMS}},
229240
{"name": "FDSN Event API", "description": "Official query interface for targeted retrieval and future backfill", "link": {"href": USGS_EQ_FDSN_EVENT_API}},
241+
{
242+
"name": "Representative Earthquake Feed Thumbnail",
243+
"description": (
244+
"Original OS4CSAPI SVG thumbnail representing the USGS earthquake event feed adapter. "
245+
"This is not an event-specific image."
246+
),
247+
"link": {"href": USGS_EQ_THUMBNAIL_DATA_URI, "type": "image/svg+xml"},
248+
},
230249
],
231250
"characteristics": [
232251
{

0 commit comments

Comments
 (0)