Skip to content

Add FIRMS data source#523

Open
othmaneechc wants to merge 2 commits intoallenai:masterfrom
othmaneechc:othmane/firms-datasource
Open

Add FIRMS data source#523
othmaneechc wants to merge 2 commits intoallenai:masterfrom
othmaneechc:othmane/firms-datasource

Conversation

@othmaneechc
Copy link

@othmaneechc othmaneechc commented Feb 23, 2026

Added FIRMS data source implementation for wildfire detection.

@othmaneechc othmaneechc changed the title Add firms data source with unit tests Add FIRMS data source Feb 23, 2026
Copy link
Collaborator

@favyen2 favyen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks for adding this data source! Just had one question about representing this as one item per window vs a couple of alternative approaches.

Copy link
Collaborator

@APatrickJ APatrickJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I have a few comments as well.

@othmaneechc othmaneechc force-pushed the othmane/firms-datasource branch from d7b646b to b2bdbf8 Compare February 25, 2026 17:07
Copy link
Collaborator

@favyen2 favyen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Had two more comments but otherwise it looks good!

logger.debug("Requesting FIRMS CSV: %s", url)
response = session.get(url, timeout=self.timeout.total_seconds())
response.raise_for_status()
features.extend(self._parse_csv_features(response.text, item.bbox))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we aren't using item.source, and item.bbox is redundant since we can use item.geometry.shp.bounds (maybe raise error if item.geometry.projection != WGS84_PROJECTION). So I think it would make sense to use the base Item class instead of defining FIRMSItem. Several data sources use Item directly and others only define subclasses when it's needed to store additional information.

assert groups[0][0][0].name == groups[1][0][0].name


def test_get_items_splits_spatial_bins() -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting it to select all the grid cells (spatial bins) intersecting the window rather than snapping to one of them. Would this cause it to miss the wildfire detections that intersect the window but fall into the other spatial bin?

@allenai allenai deleted a comment from claude bot Mar 2, 2026
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.

3 participants