For the time being
views/day is coming straight from the API.
views_per_day there is the sum of all views (as determined by unique IP visits within a reasonable interval) on all questions (including deleted, closed, migrated, etc.) over the number of days the site has existed (as determined by the creation date of the oldest question).
This formula has been tweaked in the face of site closure (Gadgets) and the fact that now that we have a bunch of sites, we're going to have a bunch of weird dates on questions due to migrations.
Now, a site's
views_per_day is calculated as follows:
- Vn = sum of view counts of all questions created after the site (regardless of where they were created originally)
- F(q) = (q's view count) * (number of days the site has existed) / (number of days q has existed)
- Vu = sum of F(q) for all questions created before the site
- views_per_day = (Vn + Vu) / (number of days the site has existed)
This isn't perfect, but we don't track individual view events (we'd probably need a dedicated DB server for that on SO, just incrementing is already kind of painful without some tricks) so I think its OK given the data.
The whole scheme has some nice properties:
- migrated questions are reflected in the
views_per_day, just ignoring them seems very wrong
- new sites don't get huge view boosts from being seeded with SE 1.0 sites
- questions that were asked on another site while the destination site existed, and then migrated, are counted immediately (as if they were asked on the correct site to begin with)
- newer questions have a larger impact than older ones
- so a hot new question asked a day before the site was created would be reflected almost immediately, while an old one will be counted eventually
- all migrated questions are "eased in," so
views_per_day doesn't jump sporadically
views_per_day should still be taken with a grain of salt.