Calculates the percentage of times a track is skipped when played

Computes the ratio between skip count and total plays, providing insight into how frequently the user chooses to skip a particular track when it comes up in their listening session.

Returns formatted percentage string ready for UI display.

export const calculateSkipRatio = (track: SkippedTrack): string => {
const skipCount = track.skipCount || 0;
const notSkippedCount = track.notSkippedCount || 0;
const totalPlays = skipCount + notSkippedCount;

if (totalPlays === 0) return "0%";

const ratio = (skipCount / totalPlays) * 100;
return `${ratio.toFixed(0)}%`;
};