Mattc1221 opened a new pull request, #23551: URL: https://github.com/apache/superset/pull/23551
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> Adds the heatmap layer from deck.gl [here](https://deck.gl/docs/api-reference/aggregation-layers/heatmap-layer). **_Rationale_**: Superset already has supported functionality for other deck.gl visualization layers (e.g. Arc, Geojson, Grid, Hex, Path, Polygon, Scatter, Screengrid). Since Superset already contains the logic to handle deck.gl layers, it is straightforward and easy to maintain to add new deck.gl layers. By expanding the range of available deck.gl visualization layers, users will have more options to choose from when creating their visualizations. This will allow them to tailor their visualizations to their specific needs and explore their data in different ways. It will also allow Superset to better compete with other data visualization tools on the market that offer a wider range of visualization options. Overall, I think adding more deck.gl layers to Superset is a great idea and has the potential to significantly improve the user experience and the insights that users can gain from their data. **_Design Decisions_** The addition of the Heatmap layer follows the structure of existing deck.gl layers to maintain readability and consistency within the codebase. Structure: The directory `superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Heatmap/` contains the front end structure for the heat map - `controlPanel` configures the form to grab relevant information specified by the user to create and tune the heatmap. - `Heatmap.jsx` contains functions that define the Heatmap Layer, control the tooltip when hover the chart, and to get relevant data - `index.js` serves as the wrapper for the heatmap component and provides a metadata function to grab information to descrive what this visualization is/does The Back End code for this feature follows the back end code for other deck.gl visualizations as well, providing functions to structure queried data for the Heatmap component. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> New visualization recording: https://user-images.githubusercontent.com/36670322/229327601-22f81978-174e-41c0-8f8f-6cf7ea66691d.mov ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Start Superset 2. Click on the `Charts` tab at the top of the screen 3. Click the `+ Chart` button at the top right 4. Load a dataset with geo-positional data (longitude/latitude) 5. Search the charts for `Deck.gl Heatmap` or click on the `Map` chart category 6. Select `deck.gl Heatmap` and hit `Create New Chart` 7. Update the `Longitude & Latitude` field to the correct columns 8. Select a `Weight` function 9. Select `Create Chart` 10. There should now be a heat map layer present on the screen - Note: the underlying map component may not be visible if the MAP_BOX_API_KEY is not set. To set it follow the instructions [here](https://superset.apache.org/docs/frequently-asked-questions/#why-is-the-map-not-visible-in-the-geospatial-visualization) 11. Change the options in the control panel, check that the information tooltips are correct/make sense for each field 12. Check that when hovering a point on the map, the latitude/longitude shows up correctly ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [X] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
