Jump to content
  • Hexbin Data Function for Spotfire®


    The Hexbin data function within Spotfire offers a method of binning two-dimensional data into hexagonally-arranged bins based on (x, y) inputs.

    Please download the Hexbin Data Function for Spotfire® from the exchange. 
     

    Details about the data function

    Description

    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 (located here).

    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) Optional value column ("z-axis")
    Nxbins integer value no (default value=40) Approx number of bins to divide the 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)
    y (numeric)
    count (integer)
    meanvalue (numeric)

    x-coordinate of this hexbin
    y-coordinate of this hexbin
    count of incoming points in this bin
    mean of the value parameter in this bin; NA
    message string value Informational output for a Spotfire text-area label


    The screenshots that follow show example visualizations made using the output of this data function

    untitled_9.thumb.png.bbea25903e61b2d4c499aa8b51413d96.png

     untitled_2_3.thumb.png.271bba464378a8c934535a789978b50c.png
     

    More Resources


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...