Now I want to sum all contributions of each user and sort them and show some of the most active users. I want to do this all with liquid tags however I am a little confused and cant figure it out. Can someone expert with data files help me?
do you know the number of users? are they the same? just a few of them?
it looks like a lot of work no matter what, I don’t have any help for you unfortunately, but you could also output that file as json and work with it in JS instead of liquid, that is probably where I would start - I would think this type of thing would be easier in JS than liquid.
I think my confusion is because of the lack of supporting associative arrays in liquid language. Am I right? If it was supported, it would have been very easy to do this job. I may go for a plugin to do this. I don’t want to do it with js.
If you use group_by you can group on the user field and then could calculate the sum by iterating that way for each user but I cannot think of how best to order that newly calculated information so that you can output the top users.
How are you generating this contributions data file anyways?