Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: check_status on June 03, 2012, 02:47:17 PM



Title: What is this data?
Post by: check_status on June 03, 2012, 02:47:17 PM
I retrieved data from here: http://p2pool.info/stats
Feel free to answer any questions or correct any incorrect assumptions.

What is this format known as?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

The red highlighted item below is the title of this data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

These red highlighted items are start and end brackets that contain all of the data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

What is the red data below? Hashrate? Users?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

What is the red data below? Date/timestamp?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}


Title: Re: What is this data?
Post by: yogi on June 03, 2012, 03:39:41 PM
http://www.json.org/ (http://www.json.org/)


Title: Re: What is this data?
Post by: check_status on June 03, 2012, 05:31:24 PM
Quote from: yogi
http://www.json.org/

That was the first place I went to. The site is OK if you already have some kowledge, but the site sucks if you don't know any terms or structure, you don't know where to look to develop understanding.

http://www.youtube.com/watch?v=rncW-74VL7U
This video is 10x better when you don't have a clue.

What is this format known as?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is a JSON Object with an Array.

The red highlighted item below is the title of this data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is a property; It's used to locate specific data you're interested in calling up.

These red highlighted items are start and end brackets that contain all of the data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

Correct. (Yay me!)

What is the red data below? Hashrate? Users?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

What is the red data below? Date/timestamp?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is the data you will display or use to develop other information.


Title: Re: What is this data?
Post by: grue on June 03, 2012, 07:40:44 PM
Quote from: yogi
http://www.json.org/

That was the first place I went to. The site is OK if you already have some kowledge, but the site sucks if you don't know any terms or structure, you don't know where to look to develop understanding.

http://www.youtube.com/watch?v=rncW-74VL7U
This video is 10x better when you don't have a clue.

What is this format known as?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is a JSON Object with an Array.

The red highlighted item below is the title of this data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is a property; It's used to locate specific data you're interested in calling up.

These red highlighted items are start and end brackets that contain all of the data.
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

Correct. (Yay me!)

What is the red data below? Hashrate? Users?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

What is the red data below? Date/timestamp?
{"rates":[[1312037400000,2],[Lots more stuff],[1338722700000,196]],"maxRate":468.2700000000,"maxUsers":244}

This is the data you will display or use to develop other information.
wait what? are you answering your own questions?


Title: Re: What is this data?
Post by: check_status on June 03, 2012, 07:55:51 PM
When I asked the questions, I didn't know the answers, but had been hunting them out. I got frustrated in my search and made the post. Sharing sometimes turns on my 'Aha lightbulb'.  :D
There are still some unanswered questions.  ;D


Title: Re: What is this data?
Post by: unfinishe on June 03, 2012, 08:49:54 PM
Ok, so I think I figured out what the data is supposed to represent. By looking at the Javascript on the page, (in http://p2pool.info/scripts/p2pool.js (http://p2pool.info/scripts/p2pool.js), starting at line 422), you can see that it's calling /stats, and then using those results to set-up the chart on the front page. Basically, it's just a historical list of hash rates.

So, for each one of the entries (say [1338722700000,196]), the first value is a UNIX timestamp including milliseconds (so 1338722700000 translates to today), and the second is the hash rate in GH/s.