Summary
Overview
Two-dimensional binning with hexagonally-arranged bins of (x,y) inputs. Useful in Spotfire for simplifying an (x,y) scatter plot with a large number of points. Returns the count of the incoming points in these bins. Additionally if an optional value column is also provided, it also returns the mean value in the bins. The results can be used in a Spotfire scatter plot visualization that serves as a heat map of the density of points. Also if the optional 3rd value is used, a Spotfire scatter plot visualization can be constructed for the mean value across cells. This data function serves as a wrapper for the functionality contained in the hexbin R package.
Please see the data function script for complete documentation. The data function is in the .sfd file and also embedded in the .dxp file.
The .dxp file contains an example showing one way to use and wire up this data function.
Input Parameters
Name | Type | Structure | Required | Description |
x | numeric | column | yes | x-coordinate of input |
y | numeric | column | yes | y-coordinate of input |
value | numeric | column | no (default value=NA) | ptional value column ("z axis") |
Nxbins | integer | value | no (default value=40) | Approx number of bins to divide range into |
verbose | integer | value | no (default value=0) | 1=more output sent to message; 0=less output |
Output Parameters
Name | Structure | Description |
---|---|---|
hexbinResult | table with 4 columns | |
x (numeric) | x-coordinate of this hexbin | |
y (numeric) | y-coordinate of this hexbin | |
count (integer) | count of incoming points in this bin | |
meanvalue (numeric) | mean of the value parameter in this bin; NA | |
message | string value | Informational output for a Spotfire text-area label |
The screen shots that follow show example visualizations made using the output of this data function
See also this article.
Release 1.1.0
Published: November 2023
Changes to previous release:
- Extra documentation added to the script
Hexbin Data Function for Spotfire® v1
Published: May 2016