BitShares Forum

Other => Meta => Topic started by: speedy on August 25, 2014, 11:18:56 am

Title: Is there a graph of the bitsharestalk.org member count ?
Post by: speedy on August 25, 2014, 11:18:56 am
It would be really interesting to correlate the recent price rise to the forum membership.
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: drekrob on August 25, 2014, 12:19:39 pm
(http://i.snag.gy/9GsYy.jpg)
Left one is registrations per day right one is cumulative.
289 is today 1 is day of first registration.
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: bytemaster on August 25, 2014, 12:22:53 pm
+5
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: Riverhead on August 25, 2014, 12:24:09 pm
 +5%  Awesome! This community rocks.
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: speedy on August 25, 2014, 01:38:17 pm
That clear bit of acceleration at the end looks very exciting  :D

Is there some url that regenerates a more up-to-date graph? I would like to keep tabs on this.
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: drekrob on August 25, 2014, 02:11:14 pm
This is the node/coffescript i was using to pull data from the forum and create a csv. You need to disable cookies in browser to get an up to date session id you can use. If you want to do it regularly you probably should change the url to sort by date of registration and always just poll the last page or something like that.
Code: [Select]
async = require "async"
cheerio = require "cheerio"

parsePage = (url, target) ->
  setImmediate ->
    request = require("https").get url, (response) ->
      filedata = ""
      response.on "data", (chunk) ->
        filedata += chunk
      response.on "end", ->
        target (cheerio.load filedata)


url = "https://bitsharestalk.org/index.php?PHPSESSID=b330a0f58442be2a1e469f4436e&action=mlist;sort=real_name;start="

dates = []
async.timesSeries 195, (id, cb) ->
  parsePage url+(id*30), ($) ->
    $("tr td:nth-child(7)").each (i, v) ->
      dates.push new Date($(v).text()) / 1000
    cb()
, ->
  max = 0
  dates.forEach (date) ->
     max = i if i > max
  regByDay = {}
  days = dates.map (i) ->
    Math.floor (max-i)/84600
  days.forEach (day) ->
    regByDay[day] = 0 unless regByDay[day]
    regByDay[day]++
  list = ""
  for k of regByDay
    list += k + ";" + regByDay[k] + "\n"
  console.log list
Title: Re: Is there a graph of the bitsharestalk.org member count ?
Post by: drekrob on August 25, 2014, 02:13:41 pm
As you are not interested in unique users you could also just poll the members page once a day and read the number of total members there.