Species map trip dates frequency view - #63
Open
nleiby wants to merge 11 commits into
Open
Conversation
The map only plotted locations with a report in the last 30 days, so a hotspot where the species is reliable during the trip's months showed nothing at all out of season. Trip dates mode plots hotspots ranked by frequency for those months instead, shaded by how often the species is reported and ringed where the hotspot is already saved. Recent sightings remains available from a toggle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Recent sightings mix eBird hotspots with birders' private locations, which can't be visited or saved to a trip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Controls now sit where the trip map puts them. Closing the info card no longer closes the map, so a dedicated close control replaces it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Saved hotspots were filtered out entirely in trip dates mode: the region ranking returns the top 500 hotspots statewide, which rarely includes a given trip's hotspots. They are now fetched by id and drawn as the same star marker the trip map uses, tinted by frequency. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Marker clicks opened the hotspot modal and then immediately closed it, because the outside-click guard did not recognise map markers. Saved hotspots with no frequency data fell back to a color outside the scale. The info card moves to the top left and its close control becomes a back arrow, so one affordance leaves the map instead of two. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sortBy=frequency returned 500 hotspots all at exactly 100% with sample sizes near 20 checklists, so every dot saturated. Rank by best instead, which weights sample size, and stretch the color thresholds so the ramp covers the range those results actually occupy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Persisting it meant coming back to a near-empty map with no visible cause. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Saved hotspots became markers, so the layer no longer carries isSaved and the paint expressions keyed off it never matched; the legend advertised a ring and a no-data swatch that could not appear. Filtering personal locations inside useFetchSpeciesObs also leaked the map preference into the species page's recent-hotspot scope, so it now happens on the layer. Drops the duplicate Escape handler and skips the saved-hotspot query outside trip dates mode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A saved hotspot drew at full strength in recent sightings even when the species had not been reported there in 30 days, which read as a sighting. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Selecting a saved hotspot on the species map covered its star with a halo dot. Saved hotspots already have a marker, so highlight that instead, keep them out of the observation layer that drew a second dot underneath, and clear the fade while selected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nleiby
commented
Sep 1, 2026
| ...(locationIds ? { locationIds } : { region: trip?.region, limit: HOTSPOT_LIMIT }), | ||
| months, | ||
| sortBy: "frequency", | ||
| sortBy: "best", |
Author
There was a problem hiding this comment.
Sorting by frequency seems to return less useful results: 100% of 19 checklists seems less useful for planning than 85% of 500. The species detail page also seems to default to it, so this makes the map agree with the list.
rawcomposition
commented
Sep 1, 2026
Owner
Thanks for this. I'll take some time to digest what you've come up with and figure out if or what UI tweaks I want to make before merging. |
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 freeto 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.
Situation: The species map plots eBird reports from the last 30 days ("where has this been seen lately"), not "where will I find it on my trip". Out of season, those diverge, and the recent view isn't useful for trip planning. A reliable hotspot during the trip dates shows nothing if nobody has seen the species lately.
This PR tries to address this. It:
Example species highlighting this situation: it hasn't been seen lately, but is relatively common during a November trip:
Menu item now reads "show on map" instead of specifying "recent"
Map now has selector for recent vs. trip dates. Hotspots on trip dates are colored by frequency. Species name/map description card is moved to side, and the X/close button changed to a back arrow. X was misleading, and made me think it would close the card, not leave the map.
Added a "show only saved hotspots"/"show all hotspots" toggle button to simplify view for trip planning:
No sightings in the last 30 days for this species, so a blank map except for faded saved hotspots:
Recent sightings for a species that has observations in the last 30 days- same as present, except saved hotspots marked:
