Adding a bin shorthand
See original GitHub issueWould it be possible to add a shorthand syntax for binning? The exact proposal would be to to allow to replace
alt.Chart(cars).mark_bar().encode(
x=alt.X("Horsepower", bin=True),
y="count()"
)
by
alt.Chart(cars).mark_bar().encode(
x="bin(Horsepower)",
y="count()"
)
After reading through #763 I understand that changes in this direction are not trivial, but I would suppose that just allowing this simple substitution would not break the conceptual model, as one would still have to use alt.X
to customize the binning. However, for the default case this substitution should correspond to what is already being done for aggregations.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
What does BIN stand for? - Abbreviations.com
What does BIN mean? This page is about the various possible meanings of the acronym, abbreviation, shorthand or slang term: BIN.
Read more >BIN - Urban Dictionary
BIN. Acronym for “Bank Identification Number.” It is the first 6 digits of a credit or debit card. It is useful for scammers...
Read more >BIN - What does BIN stand for? The Free Dictionary
BIN, Barcode Index Number (Barcode of Life Data System) ; BIN, Buffer Index Number ; BIN, Buy It Now ; BIN, Binary File....
Read more >Copy a section - Shorthand Support
Shorthand's copy functionality enables you to duplicate any section of a story. The copied section can be used in your current story, or...
Read more >Shorthand for "import or install"? - python - Stack Overflow
#!/usr/bin/python3 try: import tornado except ImportError: print("Import not ... ...also, invoking a shell (as os.system() does) is adding ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not much, if at all. We don’t do any direct property access in Altair’s docs or examples, so I think it’s a pretty minor incompatibility all told. And my take is it’s well worth the benefit of being able to do this:
instead of this:
Prototype & more discussion in #1629