God’s Eye View: a globe, AI interaction and honest data boundaries
Read God’s Eye View’s earthquake normalizer: empty, malformed and filtered are different results
Inspect the exact snapshot validator and label cohort with eighteen isolated tests, including strict numbers, duplicate identity and M2.5 filtering.
What you will learn
- Validate the whole snapshot before replacing state
- Filtering is not the same as validation
- Source records and label selection have different contracts
Before you start
- Basic JavaScript and JSON
- Understanding of coordinates and source timestamps
Explain how source records, validation, layer presentation and optional AI interaction differ, using synthetic examples.
Key takeaways
- An accepted empty snapshot is different from malformed input.
- Magnitude filtering happens within a broader validation contract.
- Label limits must not be interpreted as source counts.
Validate the whole snapshot before replacing state
normalizeEarthquakeSnapshot returns null when features is not an array or when a structural check fails. A valid empty feature list instead returns an empty array. The source adapter throws for malformed data, so callers can distinguish failure from an accepted empty observation.
Coordinates are longitude, latitude and optional depth in kilometres. Longitude and latitude must be finite numbers within their ranges; numeric strings are not silently coerced. Optional depth must also be finite when supplied. One malformed feature rejects the snapshot rather than quietly yielding a partial replacement.
Filtering is not the same as validation
Missing magnitudes and values below 2.5 are skipped because they cannot establish membership in the displayed subset. A magnitude above ten or a nonfinite value rejects the snapshot. A supplied geometry type must be Point, while an absent type is accepted by this implementation; do not call it a complete GeoJSON schema validator.
Included records need unique stable IDs. An absent ID gets an index-based event identifier, which can collide with another explicit identifier and reject the snapshot. Place and time may remain unknown. mapAnalystRecord also preserves unknown numeric fields as null instead of converting numeric strings into measurements.
Source records and label selection have different contracts
The label cohort copies and sorts entries by priority, then identity, and clamps the requested size to at most 96. This is a display budget, not a limit on how many earthquakes exist. An ambient label is noninteractive, while other layer interactions have separate ownership.
Eighteen executed cases run the exact AST-selected normalizer, analyst mapper and cohort function with synthetic inputs. They cover empty versus invalid, ranges, threshold, missing fields, duplicates, fallback collisions and stable nonmutating selection. Cesium, the live source, browser rendering and application lifecycle were not executed.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Test valid empty and malformed snapshots separately.
- 2
Check coordinate order and strict numeric types.
- 3
Include duplicate and fallback-ID collisions.
- 4
Verify cohort limits without changing the input list.
Copy-ready example
{
"features": [
{
"id": "synthetic-event",
"geometry": {
"type": "Point",
"coordinates": [
10,
20,
5
]
},
"properties": {
"mag": 3,
"place": "Synthetic learning event",
"time": 100
}
}
]
}Frequently asked questions
Are numeric coordinate strings accepted?
No. The normalizer uses finite-number checks without coercing them.
Does the 96-label cap mean only 96 events were fetched?
No. It bounds the ambient label cohort, not the feed’s event population.
Sources
- God’s Eye View / src/layers/earthquakes/model.jsSource checked 2026-09-14
- God’s Eye View / src/layers/earthquakes/source.jsSource checked 2026-09-14
- God’s Eye View / docs/CURRENT-STATE.mdSource checked 2026-09-14