Live statistics: Trump vs. Clinton according to comments in “askreddit”

 

Reddit entries are organized into areas of interest called “subreddits”. “askreddit” is one of them.

Public comments posted in “askreddit” are collected and sent through REST API (POST https://api.rtstatistics.com/dataset/{id}/items) from a server. rtstatistics.com does the number crunching to generate the statistics. This page queries the statistics through REST API (GET https://api.rtstatistics.com/statistics/{id}/detail). The delay from the event gets received to updated statistics can be queried is typically less than 1 second.

Charts on this page use c3.js+d3.js for drawing the charts, and cjtsd-js is used for transforming the query results into the format that c3.js and Google Charts require.

Source code of this demo can be found here.

You can adjust the refresh interval of these charts manually. During refreshes, if new statistics are fetched from the server, the charts will reflect the changes. If you don’t touch it for a few minutes, the interval will be automatically increased until reaching 60 seconds.

Refresh interval (seconds):     

 

Trump vs. Clinton: number of comments mentioned per 1 hour (UTC)

Latest hourly statistics:

This chart shows in the last 72 hours how many comments have “Trump” mentioned, how many have “Clinton” mentioned, and how many have both of them mentioned. It also shows the percentage of those comments in all comments posted.

The chart is drawn with c3.js and displays UTC time.

 

Total number of comments per 1 hour (UTC)

Latest hourly statistics:

This chart shows total number of comments posted per 1 hour in the last 72 hours.

The chart is drawn with c3.js and displays UTC time.

 

Total number of distinct comments per 1 hour (UTC)

Latest hourly statistics:

This chart shows total number of distinct comment content posted per 1 hour in the last 72 hours. For each hour, usually the number of distinct comments is smaller than the number of total comments.

The chart is drawn with c3.js and displays UTC time.

 

Other resources