Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to view heat map of all available data in search view #545

Open
banesullivan opened this issue Oct 21, 2021 · 0 comments
Open

Comments

@banesullivan
Copy link
Contributor

A user may want to know where data exist before performing a search. At present, a user can go to the rgd/statistics view to see a heatmap of all the available data.

Screen Shot 2021-10-20 at 11 34 59 PM

I propose adding a widget in the GeoJS map (bottom left corner) in the base search map (in django-rgd/rgd/templates/rgd/_include/search_map.html) that is essentially a checkbox to show a heatmap of available data.

This will require an async call to an endpoint in RGD to gather the points for this heatmap (note that the current rgd/statistics view adds these points in the context of the page). The new widget would have a callback that is essentially the JS code in django-rgd/rgd/templates/rgd/statistics.html that uses a new endpoint to fetch those points.

To implement the new endpoint for gathering the heatmap, we should add a new api/rgd/statistics endpoint that is essentially the same as StatisticsView.get_context_data() but in RetrieveAPIView form.

Please wait until #539 lands to follow the conventions laid out there (basically just subclassing BaseRestViewMixin and RetrieveAPIView)

After all of this, we should refactor the StatisticsView view and its template to utilize these changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants