I've looking for info on how to order or filter hierarchically this viz on Altair without luck. I mean, order the bar, from the value with more counts to the one with less. Also, filter the first ten so I get a better graph. Do you guys have any idea of how can I get that outcome?
Here's my code:
alt.Chart(df).mark_bar().encode(
x = alt.X('count()'),
y = alt.Y('proveedor_nombre:N')
)
And here's my outcome (I cut it since it's too big for this):
I thank you guys in advance.
You can do this following the Top K Items example in the Altair documentation, with a Window Transform followed by a Filter Transform: