>>49923989I poll the Twitch API for the streams of about 200 channels every 5 minutes (this is how frequently the Twitch API updates numbers), log the number of viewers each time, and at the end of the stream I use the trapezoidal rule between each datapoint weighted by the time between each datapoint (this allows averages to still be somewhat accurately obtained even when the Twitch API fails and a datapoint is missed) to determine the average viewers of the stream. Here's an excerpt of the code used to determine averages prepared to run with Vei's data from yesterday and report it:
https://rentry.org/tvozeIf you want to run it just hit F12 in your browser and paste it in the console. TwitchTracker and StreamsCharts use some unknown method to calculate averages that's apparently different from mine, this is just the best way I can figure to do it without resorting to some kind of weird spline bullshit or something. Hope this clears things up a bit.