GeoHazardWatch

Page Actions


Using FeedManager

FeedManager is the runtime of the feeds addon — it pulls structured data from external feeds (earthquake catalogs, alert feeds, any JSON/GeoJSON endpoint) on a schedule and makes the records available on your pages, without creating one page per record. The data lives in a record store and refreshes on its own; your page just displays the latest.

The feeds addon is disabled by default. An administrator must enable it and configure at least one source before anything renders.

Enabling (administrators)

Add flat config keys to the instance's custom configuration (or via the admin configuration UI):

ngdpbase.addons.feeds.enabled: true
ngdpbase.addons.feeds.sources.usgs-quakes.adapter: geojson
ngdpbase.addons.feeds.sources.usgs-quakes.url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson
ngdpbase.addons.feeds.sources.usgs-quakes.type: Event
ngdpbase.addons.feeds.sources.usgs-quakes.intervalMinutes: 30

Each source needs adapter, url, and type. Optional: intervalMinutes or dailyAt (schedule), recordIdField, itemsPath and map (field mapping for rest-json).

Available adapters today: geojson (GeoJSON FeatureCollections), rest-json (generic JSON endpoints), and xml (generic XML documents — attributes are addressed as element.@attribute, element text as element.#text). More formats (RSS/Atom, CSV) are planned.

Showing feed data on a page

A table of records — DataFeedPlugin

[{DataFeed source='usgs-quakes'}] renders the source's records as a sortable table. Useful parameters:

  • columns='place,magnitude,depth_km' — pick which record fields to show
  • sort='magnitude-desc' — sort by a field
  • max='10' — cap the row count (default 20)
  • format='list' — a simple bullet list of record names instead of a table
  • badge='color' — render listed columns as colored pills (built-in styles for GREEN / YELLOW / ORANGE / RED values)
  • link='volcano=https://example.org/v/:gvp' — make a column a link, filling :placeholders from the record's other fields (use :name style — curly braces cannot appear inside a plugin tag)
  • exclude='summary~VAAC:|VA ADVISORY' — drop records whose named field matches the pattern (see below)
  • empty='...' — the message shown when the feed currently has nothing to display

Example:

[{DataFeed source='usgs-quakes' columns='place,magnitude' sort='magnitude-desc' max='10'}]

Hiding unwanted records — exclude

exclude='field~pattern' removes records whose field matches pattern. Matching ignores upper/lower case, and the pattern is a regular expression, so | means "or":

[{DataFeed source='volcano-news' exclude='summary~VAAC:|VA ADVISORY|DTG:'}]

That example drops re-published aviation bulletins from a general news feed, leaving the original reporting.

Two things to know:

  • One rule per plugin call. To filter on two different fields, use two separate [{DataFeed}] tags.
  • A malformed rule filters nothing rather than showing an error — so if exclude= seems to be doing nothing, check the field~pattern spelling first. There must be a ~, with a field name before it and a pattern after it.

A map of records — format='map'

When records carry coordinates, format='map' plots them on an interactive map instead of a table:

[{DataFeed source='firms-viirs' format='map' columns='frp,confidence,acq_date'}]

  • The plugin looks for fields named latitude and longitude. If the feed names them differently, say so: lat='lat' lon='lon'.
  • Records missing usable coordinates are quietly skipped — they are not an error, and the rest still plot.
  • sizeBy='frp' scales each marker by a numeric field, so bigger values draw bigger circles. Without it every marker is the same size.
  • columns= controls what appears in a marker's popup, exactly as it controls table columns.
  • The map shows up to 500 records (rather than the usual 20); max= still applies if you want fewer.
  • height='600' sets the map height in pixels (default 450), and lat0 / lon0 / zoom set the starting view (default: the whole world).

When a feed has nothing to show

A feed with no records is normal, not a fault — an alerts feed is empty precisely when there is nothing to alert about. The plugin says so in plain language:

No records are currently available for this feed.

Use empty= when the page can say something more useful than the generic wording:

[{DataFeed source='tsunami-alerts' empty='No tsunami messages are currently active for the US.'}]

Two situations are not treated as an empty feed, and empty= deliberately does not cover them:

  • No source given — the plugin call is incomplete.
  • The feeds addon is not enabled — nothing was fetched at all.

Both show a short diagnostic instead, because they mean the page is broken rather than quiet. Hiding them behind reassuring wording would let a page announce "nothing is currently active" when in fact nothing was ever checked.

A scrolling one-liner — MarqueePlugin

The latest records can run as a banner without any feed-specific plugin:

[{MarqueePlugin fetch='FeedManager.toMarqueeText(source=usgs-quakes,max=5)'}]

Good to know

  • Records refresh on the configured schedule with automatic back-off when the upstream feed is down; a stale feed logs a warning for the administrator.
  • Feed records also appear in the platform catalog as CreativeWorks, so other features can discover them.
  • Feed data is display-only on pages — editing a page never edits the upstream records.

See Plugins for the complete plugin list.

No pages currently refer to this page.

No footnotes on this page.

No comments yet.