Author Topic: Is there a graph of the bitsharestalk.org member count ?  (Read 2150 times)

0 Members and 1 Guest are viewing this topic.

drekrob

  • Guest
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.

drekrob

  • Guest
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

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: speedy
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.

Offline Riverhead


Offline bytemaster

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

drekrob

  • Guest

Left one is registrations per day right one is cumulative.
289 is today 1 is day of first registration.

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: speedy
It would be really interesting to correlate the recent price rise to the forum membership.