Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All help posts
View post
Save
<img src="/uploads/upload/image/5200/direct/1571198977533-1571198977533.png" alt="Horizontal bar chart showing logarithmic binning of numeric data. Seven ranges are displayed from single value '1' (1%) up to '100 to 249' (3%), with the largest concentrations in mid-ranges: '10 to 24' at 30% and '25 to 49' at 26%. Total sample size N=100." style="width: 250px;" class="fr-fic fr-dib"> Protobi automatically bins numeric variables into ranges when you create a project and you can edit the bins to reflect your analysis goals. <img src="/uploads/upload/image/5200/direct/1571199075347-1571199075347.png" alt="Protobi data view showing question Q3 with automatic binning applied. The question asks 'Thinking about your Condition Y patients, how many of those are currently receiving a GA (gamma antagonist)?' Five ranges are displayed from '1 to 20' (64%) down to '81 to 100' (3%), with Mean of 21.4 and N=100." style="width: 400px;" class="fr-fic fr-dib"> ## "Round by..." dialogue Press the context menu icon and select "Round by...". <img src="/uploads/upload/image/5200/direct/1571199101505-1571199101505.png" alt="Context menu dropdown showing various data manipulation options. The 'Round by...' option is highlighted with a blue tooltip stating 'Select ranges to bin numeric variables'. Menu shows keyboard shortcuts like 'E B' for Round by, 'E F' for Format, and 'E R' for Recode." style="width: 354px;" class="fr-fic fr-dib"> This dialogue will pop up: <img src="/uploads/upload/image/5200/direct/1664221032734-1664221032734.png" alt="Round by dialog box with header showing 'Round by' title and 'E B' keyboard shortcut. The dialog prompts 'Enter a bin size for rounding' with four radio button options: None (selected), Auto, Log, and Custom (with input field showing '25')." style="width: 355px;" class="fr-fic fr-dib"> You can group data into the following options: - Auto — Auto-rounds based on the standard deviation - Log — Uses logarithmic ranges - Custom - Linear bins — Specify your desired equal bin size, e.g. 25 - Custom bins — Enter an array of cut-points, e.g. \[10,25,50\] ## Auto bins The setting "Auto" chooses a linear range with bin sizes automatically selected to generate a reasonable number of ranges given the standard deviation, with boundaries that snap to nice multiples of 5 or 10. ## Log bins Logarithmic ranges choose bin sizes that neatly map to multiples of 10, 25, and 50, resulting in small ranges for small numbers and bigger ranges for bigger numbers. <img src="/uploads/upload/image/5200/direct/1571199551705-1571199551705.png" alt="Bar chart showing logarithmic binning result for Q3. Seven ranges are displayed using logarithmic scaling from '1' (1%) through '100 to 249' (3%), with highest concentration in middle ranges '10 to 24' (30%) and '25 to 49' (26%). Mean=21.4, N=100." style="width: 400px;" class="fr-fic fr-dib"> Log ranges generally make sense for unbounded numbers and absolute counts, such as income, number of customers, or patient volume. ## Linear bins Here we set "Round by" to Custom: 10 <img src="/uploads/upload/image/5200/direct/1664221062062-1664221062062.png" alt="Round by dialog showing Custom option selected with value '10' entered in the text input field. This setting will create linear bins of equal width (10 units each)." style="width: 345px;" class="fr-fic fr-dib"> which generates ranges of equal width: <img src="/uploads/upload/image/5200/direct/1571199588193-1571199588193.png" alt="Bar chart showing linear binning result with equal-width ranges of 10 units. Eight ranges are displayed from '1 to 10' (44%) through '91 to 100' (3%), demonstrating consistent bin size throughout. Mean=21.4, N=100." style="width: 400px;" class="fr-fic fr-dib"> Linear ranges are inclusive of the upper bounds, and exclusive of lower bounds, and rounded to reasonable precision for display. So in above example, the range "21 to 30" really represents "20 < Q3 <= 30". ## Custom bins It's possible to choose arbitrary ranges by specifying a list of cut-points, separated by commas. Here we set "Round by" to **10,25,50**: <img src="/uploads/upload/image/5200/direct/1664221090285-1664221090285.png" alt="Round by dialog with Custom option selected and '10,25,50' entered as comma-separated cut-points. This will create custom bins with boundaries at 10, 25, and 50." style="width: 360px;" class="fr-fic fr-dib"> This generates bins that include the upper bounds: <img src="/uploads/upload/image/5200/direct/1561566495177-numerics-custom%20(1).png" alt="Bar chart showing custom binning result using cut-points 10, 25, and 50. Four ranges are displayed: '≤ 10' (7.0%), '11 to 25' (27.2%), '26 to 50' (48.8%), and '> 50' (17.0%). The question asks about percent of purchases made online. Mean=34.7." style="width: 400px;" class="fr-fic fr-dib"> To specify bins that do not include the upper bound use a closing parenthesis instead of a bracket e.g. **\[0,10,25,50)** <img src="/uploads/upload/image/5200/direct/1571199739757-1571199739757.png" alt="Bar chart showing custom binning with notation [0,10,25,50) where parenthesis indicates upper bound is exclusive. Four ranges displayed: '< 10' (35%), '10 to 24' (30%), '25 to 49' (26%), and '≥ 50' (9%). Question asks about GA treatment for Condition Y patients. Mean=21.4, N=100." style="width: 400px;" class="fr-fic fr-dib"> ## Remove decimals from bins Custom bin ranges might show decimal places. For Q1 we want to see respondents in the following value bins: 0, 1, 2, 3-5, 6-9, and 10+. We set the custom bins: \[0,1,2,5,9,100\]. For the ranges (e.g. 3-5) specify the upper limit only. This results in some ranges showing decimals: <img src="/uploads/upload/image/5200/direct/1659982515585-1659982515585.png" alt="Bar chart showing custom bins with unwanted decimal places. Six ranges are displayed with decimals: '≤ 0' (5%), '0.1 to 1' (9%), '1.1 to 2' (11%), '2.1 to 5' (27%), '6 to 9' (9%), and '10 to 100' (39%). Question Q1 asks about Condition X patients receiving GA. N=100." style="width: 400px;" class="fr-fic fr-dib"> ### **Add the "epsilon" attribute** One option to remove decimals is to add the "epsilon" attribute to the element's JSON. In mathematics epsilon represents an arbitrarily small quantity. Setting "epsilon" to 1 will remove any decimals from the binned ranges. <img src="/uploads/upload/image/5200/direct/1629476252700-1629476252700.png" alt="JSON editor dialog showing element properties for Q1. The code shows the 'epsilon' attribute highlighted on line 63 with value set to 1. This epsilon setting controls decimal display in binned ranges. Other visible properties include key, title, color, type, chartOptions, roundby array with values [0,1,2,5,9,100], and displayKey." style="width: 522px;" class="fr-fic fr-dib"> The result: <img src="/uploads/upload/image/5200/direct/1659982579597-1659982579597.png" alt="Bar chart showing custom bins after applying epsilon=1 to remove decimals. Six clean ranges without decimals: '≤ 0' (5%), '1' (9%), '2' (11%), '3 to 5' (27%), '6 to 9' (9%), and '10 to 100' (39%). Question Q1 about Condition X patients. N=100." style="width: 400px;" class="fr-fic fr-dib"> ### **Specify** **format** Another option is to specify formats for each bin. This will give you greater control of how the bins are labeled, since format will take any string of characters. From the [context menu](https://help.protobi.com/newusers/basic-navigation-in-protobi#Context%20menu-8) choose "[Format..](/edit-access/formatting)." and enter the desired format for each data cut-point. In addition to adding format, un-check "Group unformatted values". <img src="/uploads/upload/image/5200/direct/1585678638753-1585678638753.png" alt="Format dialog showing a table with Value and Format columns. Six data values (0, 1, 2, 5, 9, 100) are mapped to custom format labels ('0', '1', '2', '3-5', '6-9', '10+'). The checkbox 'Group unformatted values into [other]' is unchecked. Additional columns for Mean, Sort as, Sort last, Hide, and Remove are visible." style="text-align: center;" class="fr-fic fr-dib"> This is the result after specifying format: <img src="/uploads/upload/image/5200/direct/1585678766495-1585678766494.png" alt="Bar chart showing custom bins with format labels applied. Six cleanly formatted ranges: '0' (5.0%), '1' (9.0%), '2' (12.0%), '3-5' (26.0%), '6-9' (9.0%), and '10+' (39.0%). Question Q1 about Condition X patients receiving GA treatment. N=100." style="text-align: center; width: 400px;" class="fr-fic fr-dib">
Publishing
Date
Status
Published
Draft
Slug
edit
Content
Thumbnail
Categories
Manage
New to Protobi?
Charts
Making Changes
Intermediate topics for editors
Frequently Asked Questions
SERMO Topics
Tutorial Pages
Internal Docs
Data Processing
Videos
Obsolete
GSG Admin
SERMO Admin
GSG Topics
How to...
Basics for viewers
Basics for editors
For project admins
Advanced topics
Assessments
Articles (in-progress)
New and updated articles
Process data in Protobi
superseded
Text open-end questions
Troubleshooting
Tracking studies
Organizing the view
API References
Tools
AI Database
Checking AI...
Convert to MD
Danger zone
Delete