Compositions · Preview · requirements · design · tasks

Felt reports - Requirements

Problem

Someone has just felt shaking, or has heard that others did, and opens GeoNet. They

want two things quickly: confirmation that other people felt it too, and a sense of

how strong it was where people were. The beta home page answers this inside a

combined quakes-and-felt-reports table. This slice isolates the felt reports half so

it can be reviewed, and reused on its own.

Felt reports are public submissions, not instrument measurements. The design must

not blur that line.

In scope

intensity reported.

Out of scope

Data

Source: https://api.geonet.org.nz/intensity?type=reported, a GeoJSON

FeatureCollection covering the last hour.

FieldSourceNotes
Per-intensity report countstop-level count_mmiFalls back to summing features[].properties.count_mmi
Total reportsderivedSum of counts for MMI 3 and above
Places reportingfeatures.lengthEach feature is a location cluster
Strongest reported intensityderivedHighest MMI with a non-zero count

Requirements

1. R1 Show one row per intensity level from Extreme (MMI 8) down to Weak

(MMI 3), in that order, with the GeoNet label and a colour swatch.

2. R2 Rows with zero reports stay visible and de-emphasised, so the intensity

scale still reads as a scale.

3. R3 Exclude unnoticeable reports (MMI 2 and below) from the total, matching

the behaviour of the GeoNet home page.

4. R4 Fold MMI 9 and above into the Extreme row, matching the home page clamp.

5. R5 Show total reports, places reporting, and strongest intensity as a

summary above the table.

6. R6 Use live API data on the default preview; use inlined fixture data on a

state preview, with no network call.

7. R7 Announce the outcome once through a polite live region, including a

distinct message for the empty case.

8. R8 Never rely on colour alone to convey intensity (see

a11y-content.md).

9. R9 Link to felt.geonet.org.nz using the beta hero callout pattern.

10. R10 Reuse the beta felttable / geonet-table markup so the fragment can be

lifted into a Go template unchanged.

States

StateTriggerExpected
LoadingInitial render before fetch resolvesTable present with em-dash placeholders; status reads "Loading felt reports…"
PopulatedLive fetch returns reportsCounts filled, summary filled, status names totals and places
Emptyempty fixture, or a quiet hourAll rows zero and de-emphasised; status reads "No felt reports in the last hour"; strongest reads "None"
Overflowoverflow fixtureFive-figure counts do not break the table or the summary layout
Extremeextreme fixtureMMI 9 folded into Extreme; strongest reads "Extreme (MMI 8)"
ErrorFetch rejects or non-2xxStatus explains the failure in the error style; placeholders remain

Acceptance

npm run build emits the live preview and all three fixture previews

Aggregation verified against the live endpoint and all three fixtures

MMI 9 clamp verified (extreme fixture totals 591, matching count)

Illegal stacks fail the build rather than rendering

Reviewed on the preview URL by a second person