Replies: 7 comments
-
@jayenne could you elaborate more on this? In what way you want to receive this data? Some pseudo-code will be very helpful. |
Beta Was this translation helpful? Give feedback.
-
I can currently sort my reactions by weight and by score using the data in the totals and counters tables but to 'compare' them I would need to normalise the data sets (represent each number as a percentage of the given set's min - max number range)... function normalize($value, $min, $max) {
$normalized = ($value - $min) / ($max - $min);
return $normalized;
} So each reaction's 'normalized' number will need to be recalculated every time a new min or max number is set (the goal posts are changed). *A recalculation is not required if a newly added reaction falls within the current min or max, but that just a conditional for optimising if the renormalization is necassary. as weight and count are non-relational numbers you will need You could then take it further and consider storing these normalisations as dated records then reacting additional *then periodically calculate and store the periodical The possibilities for normalisations are big but the trends are huge. this of couse, could/should be an entirly new package that can be configured to work on any numerical data, independednt of loravel-love. *I think I've talked you (& myself) out of it being part or laravel-love no haven't I? lol |
Beta Was this translation helpful? Give feedback.
-
That's interesting idea, but it's very complex and optional. It requires a lot of research work to be done before adding it to the core build. I'm not against this feature, but not ready to dive into it at this moment of time. You could try to use reaction events to implement it in your own application or create separate analytics package 😉 |
Beta Was this translation helpful? Give feedback.
-
I think it quickly evolved in to a seperate package that listend to laravel-love's events didn't it? :D |
Beta Was this translation helpful? Give feedback.
-
Yes, I think separate package is a good idea to start with. If you'll have any issues or suggestions - I'm always open to discussions. |
Beta Was this translation helpful? Give feedback.
-
You can reach me here or in Discord: http://discord.gg/dSyyNrg |
Beta Was this translation helpful? Give feedback.
-
This issue related to an old one #3 |
Beta Was this translation helpful? Give feedback.
-
Hi Anton,
I'm sure it's not in the primary foucs of the package but would it be useful to include a normalized number in the totals table?
This way we can augment the data in more visually creative ways incuding size, position, colours, charts etc.
example use:
colour the reaction icons according to it's total count or weight.
create a reaction icon cloud using to total count or weight.
*obviously this could be achieved in the controller but for paginated results it would require all the heavy lifting the totals table is design to eliminate.
Beta Was this translation helpful? Give feedback.
All reactions