mattal999 Posted April 20, 2010 Share Posted April 20, 2010 Ok so I have an interesting question for all you coders out there... What I want to do is make a list of the most popular "pages" (for simplicity's sake lets call them pages even though they are files). We have 5 pages. Each page is accessed using an id appended to the url. The table structure for each page: id | content | views 1 | this is page 1 | 5 2 | this is page 2 | 4 3 | this is page 3 | 7 4 | this is page 4 | 2 5 | this is page 5 | 1 Now what I want to do, is make a system that calculates the most popular and least popular. Now I know that this can be done using the total views ordered descending, but this would not take current "trends" into account. I want to order the most popular pages over the most recent time period. I have a simple system at the moment which takes views on today, yesterday and the day before and calculates a moving average on the fly (its not actually an average, just a total of the 3 days), which works ok, but fails if there are no views in the past 3 days. Does anyone have an idea how I could make a more complicated system that would serve purpose. If you still don't get it, then look at Spotify. They have a popularity meter for each one of their songs, which shows what songs are "trending" and what songs are not. This is exactly what I want. My inner mathematician tells me that this is going to involve some sort of weighting, and i'm up for trying anything. Thanks in advance, and if there is anything you need me to explain in more detail then just post a reply and i'll see what I can do. Quote Link to comment Share on other sites More sharing options...
mattal999 Posted April 21, 2010 Author Share Posted April 21, 2010 Well I'm just giving this a 18 hour bump. Still need help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.