Skip to content

fix(fires): stop discarding 96.8% of FIRMS detections - #333

Open
xer0decibel wants to merge 1 commit into
simplifaisoul:masterfrom
xer0decibel:fix/firms-sampling
Open

fix(fires): stop discarding 96.8% of FIRMS detections#333
xer0decibel wants to merge 1 commit into
simplifaisoul:masterfrom
xer0decibel:fix/firms-sampling

Conversation

@xer0decibel

Copy link
Copy Markdown

The CSV parser capped output at 2,000 points by keeping every Nth row. The global 24h feed carries ~61,500 detections, so it kept every 31st — and kept them by position in the file, which is arbitrary, giving any individual fire roughly a three-in-a-hundred chance of appearing. Fires that plainly existed were simply absent from the map, and it read as a data problem rather than a parser one.

Nothing is sampled now. Rows are sent column-oriented instead of one object per detection, which is what makes that affordable: the same 61,500 are 7.7MB as objects against 2.1MB this way, ~0.6MB gzipped. lib/fires expands them back on the client, and its tests pin the column order — a mismatch would not throw, it would read longitude as latitude and scatter every fire into the sea.

Also wrapped in cachedSource. The fetch pulls 4.8MB and parses 61,500 rows, which took ~19s cold and repeated on every miss; now only the first caller pays and a failed refresh serves the last good index rather than emptying the map.

The CSV parser capped output at 2,000 points by keeping every Nth row. The
global 24h feed carries ~61,500 detections, so it kept every 31st — and kept
them by position in the file, which is arbitrary, giving any individual fire
roughly a three-in-a-hundred chance of appearing. Fires that plainly existed
were simply absent from the map, and it read as a data problem rather than a
parser one.

Nothing is sampled now. Rows are sent column-oriented instead of one object
per detection, which is what makes that affordable: the same 61,500 are 7.7MB
as objects against 2.1MB this way, ~0.6MB gzipped. lib/fires expands them back
on the client, and its tests pin the column order — a mismatch would not
throw, it would read longitude as latitude and scatter every fire into the sea.

Also wrapped in cachedSource. The fetch pulls 4.8MB and parses 61,500 rows,
which took ~19s cold and repeated on every miss; now only the first caller pays
and a failed refresh serves the last good index rather than emptying the map.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

@xer0decibel is attempting to deploy a commit to the Developing Osiris' projects Team on Vercel.

A member of the Team first needs to authorize it.

xer0decibel added a commit to xer0decibel/osiris that referenced this pull request Sep 9, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant