fix(fires): stop discarding 96.8% of FIRMS detections - #333
Open
xer0decibel wants to merge 1 commit into
Open
Conversation
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>
|
@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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.