Binning 2 numeric attributes, on both X and Y axis?

CODAP Forums CODAP Help Forum Binning 2 numeric attributes, on both X and Y axis?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5819 Score: 0
    Jacob Sagrans
    Participant

    Is there a way to bin 2 numeric attributes in a graph in CODAP, on both the X and Y axes? I see I can treat one axis as categorical data and then bin the other axis, but I’d like to be able to bin both and not have a separate category for every number on one axis. Thanks!

    #5820
    Bill Finzer
    Keymaster

    Answer: CODAP graphs can only bin one numerical axis. But you can create bins formulaically for a second numeric attribute as shown here. This document randomly generated values for Height and Weight and a slider named interval to control the bin width for a third attribute named Weight_binned. The formula for Weight_binned is

    floor(Weight/interval)*interval+" to " +ceil(Weight/interval)*interval
    

    The enclosed screenshot shows the result plot with both numeric attributes binned.

    #5822
    Jacob Sagrans
    Participant

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.