🎮 Backend data collector for SGDQ-Stats
- NodeJS
- node-scheduler for scheduling
- scrape-it for scraping donation page
- tmi.js for Twitch.tv data
- forever for managing all the scripts and restarting them if anything crashes.
- Firebase for backend storage
- Google Compute Engine as the hardware running the scripts
- Google Cloud Storage as the cache location for the JSON dataset
- All Twitch data is acquired with tmi.js. Viewership data is gained by polling the API every minute. The collector listens in on the chat and reports messages per minute, as well as emote data (by referencing the Twitch global emote list).
- Twitter data is collected by listening to a Twitter stream with the terms
sgdq
,summergamesdonequick
,sgdq2016
,#sgdq2016
. - Donations / Donator data is scraped from the SGDQ Donation Tracker.
These scripts collect data for the data visualizations done in SGDQ-Stats.
data
=> Holds collection of data points<epoch time>
=> Entrym
=> Total donations ($)d
=> Total num donatorsv
=> Number of Twitch viewers
games
=> Holds collection of games<epoch time>
=> Start time of gametitle
=> Name of gamerunner
=> Name of speed runnerduration
=> Planned duration of game's runstart_time
=> Start time of game's run in epoch time (Redundant...)
stats
avg_donation
=> Average donation amount ($)games_played
=> Number of games played so far in the marathonmax_donation
=> Largest donation ammount ($)num_donators
=> Number of individual donations (not a perfect 1-to-1 map, but close enough)total_chats
=> Total number of chat messages sent in the Twitch Chattotal_donations
=> Sum of all donations ($)total_emotes
=> Total number of emotes sent in the Twitch Chattotal_tweets
=> Total number of Tweets sent related to SGDQ
extras
=> Interesting, but less useful stats<epoch time>
=> Entryc
=> Number of Twitch chats sente
=> Number of Twitch emotes sentt
=> Number of SGDQ-related Tweets sent