question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DataViz] Bins for histograms

See original GitHub issue

Hey there 👋🏼

A lot of our users are starting to use Grist for generating reports for cabinet members (yay Grist ! 🥳 )

However, a fairly standard dataviz capability that is currently missing when making a histogram widget is the ability to define bins for the data to be grouped into before aggregating.

As of now, a workaround is to define a new “group” formula column and then use this column when making the histogram but imo that is not satisfying for two reasons :

  1. this requires users to “code” which is not easy for some of them + feels hacky)
  2. the order in which the bins are shown in the histogram is not easy to handle (for example, the following bins are sorted alphabetically but are not in the correct order : "[10-500]", "[10,000-100,000]", "[500-10,000]")

WDYT ? 🤔

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anaisconcecommented, Nov 4, 2022

Ah, yes! There is currently a way to do it with “natural sort.” When sorting a text column, there’s a “…” menu next to the column in the creator panel that has an option for natural sort.

But even with that, I can see the issue your team is running into. Adding the comma separator in the number is producing the wrong result. I propose fixing how natural sort handles numbers with comma separators in text columns.

I made a quick video re: what I mean for clarity.

https://user-images.githubusercontent.com/69366135/199968304-4cba50dd-b09b-4881-a633-356632049320.mp4

@berhalak may have some extra guidance about this?

1reaction
anaisconcecommented, Oct 27, 2022

Interesting! Would it also be useful to see the bins as rows in the aggregated table from which chart is generated?

That’s why I started thinking of summary tables first. If I understood correctly with the “hacky” method, that’s what the formula was essentially doing, right? Using a formula to categorize records into bins, then then aggregate the data by bin? Being able to do it from either the chart or the summary table UI makes sense, though the two are linked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Histogram | Data Viz Project
A histogram is a chart that groups numeric data into bins, displaying the bins as segmented columns. They're used to depict the distribution...
Read more >
Play with your histogram bin size
A histogram takes as input a numeric variable and cuts it into several bins. The number of observations in each bin is represented...
Read more >
Communicating data effectively with data visualizations— ...
A histogram is a visual representation (bars) of the distribution of data (usually continuous). It uses spacings called “bins” to count the ...
Read more >
A Complete Guide to Histograms
Histograms are a common chart type used to look at distributions of numeric variables. Check out this guide to learn how to use...
Read more >
Histogram or Bins | #Tableau #Tutorial for Beginners - YouTube
... video I have explained about " Histogram / Bins " in Tableau. ... #Tutorial for Beginners | Session 37 @laksmiles31 #data #...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found