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.

A way to use argmin/argmax inside encoding

See original GitHub issue

Argmin/argmax won’t work in encoding as it involves two fields. We need better syntax for this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
kanitwcommented, Mar 29, 2019

lol you beat me to it. 😃

I’ve vl.argmin('Acceleration').field('Horsepower') in the comment box right here. :p

2reactions
jheercommented, Mar 29, 2019

I guess one idea would be to have argmin and argmax exist as operations with different semantics, such that vl.argmin('Acceleration').field('Horsepower') makes sense in a way that vl.sum('foo').field('foo') does not. I think that a separate argmin/argmax design would be easy enough to add to the Vega-Lite API, too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

argmax aggregation and select n biggest values in altair
What I would like is : use the argmax aggregation to take the latest population value rather than the biggest. If I use...
Read more >
numpy.argmax() in Python - GeeksforGeeks
argmax () function returns indices of the max element of the array in a particular axis. Syntax : numpy.argmax(array, axis = None, out...
Read more >
Aggregation | Vega-Lite
The argmax and argmin operation can be specified in an encoding field definition by setting aggregate to an object with argmax/min describing the...
Read more >
Using Numpy's argmax() - KDnuggets
A simple overview of using an often-misunderstood yet useful function in Python: Numpy's argmax(). Read the what, the how, and the why of...
Read more >
How does NumPy.argmax () work with Examples - eduCBA
Numpy.argmax() function is used in the Python coding language in order for the system to return the indices of the elements which phase...
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