Skip to content

Hotspot report script#35

Open
rawcomposition wants to merge 1 commit intomainfrom
hotspot-reports
Open

Hotspot report script#35
rawcomposition wants to merge 1 commit intomainfrom
hotspot-reports

Conversation

@rawcomposition
Copy link
Owner

@rawcomposition rawcomposition commented Mar 4, 2026

Note

Medium Risk
Adds a new data-ingestion/reporting script that downloads large datasets from the eBird API and writes to a local DuckDB file; primary risk is operational (API usage, disk writes, and native DuckDB bindings/spatial extension availability). No runtime app logic appears changed beyond dependency/script additions.

Overview
Adds a new global-hotspot-report CLI script that fetches all countries and hotspots from the eBird API (using EBIRD_API_KEY), persists them to exports/hotspots.duckdb via DuckDB + the spatial extension, and generates three CSV exports: a full global list, exact coordinate overlaps (selecting a “recipient” by checklist count), and same-name hotspots clustered within 500m.

Updates dependencies to include @duckdb/node-api (and lockfile entries for platform bindings) and wires the script into package.json.

Written by Cursor Bugbot for commit 3fcf217. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Free Tier Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

// Build a lookup of all involved hotspots
type HotspotInfo = { locId: string; locName: string; lat: number; lng: number; checklists: number };
const hotspotMap = new Map<string, HotspotInfo>();
const columnNames = pairsReader.columnNames();
Copy link

Choose a reason for hiding this comment

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

Unused variable columnNames is dead code

Low Severity

The variable columnNames is assigned from pairsReader.columnNames() but is never read or referenced anywhere in the function. This is a dead store that adds unnecessary clutter.

Fix in Cursor Fix in Web

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