About this call
Histogram is a variant of summary where field values are summarized within ranges, as specified by breaks. The resulting histogram is returned as a list with one more element than the number of breaks. Breaks=1,2,10 would return values from 0-1,1-2,2-10,10+. This function only works with numeric field values. This call returns real-time data.
Format
http://api.chartbeat.com/live/histogram/?host=[host]&keys=[keys]&breaks=[breaks]&apikey=[apikey]
- host - Required. The domain name to get histogram data about.
- apikey - Required. An api key generated here that gives access to this call.
- keys - Required. A comma separated list of keys. The keys represent what data to return. Learn more about keys here.
- breaks - Required. How to break the histogram data.
- path - Optional. Give a specific path. If not given, data is from all paths. (Example, the path of http://chartbeat.com/signup/ is /signup/)
- jsonp - Optional. Give the name of a function to wrap the return data in. Learn more here
Example
http://api.chartbeat.com/live/histogram/?host=chartbeat.com&keys=R,W,I&breaks=1,5,10&apikey=abc123
Example return:
{
"I": {
"data": {
"nzObservations": 103.0,
"max": 2.0,
"sum": 103.0,
"min": 0.0,
"histogram": [122.0,
0.0,
0.0,
0.0
],
"sumOfSquares": 103.0,
"observations": 122.0
},
"type": "numeric"
},
"R": {
"data": {
"nzObservations": 11.0,
"max": 2.0,
"sum": 11.0,
"min": 0.0,
"histogram": [122.0,
0.0,
0.0,
0.0
],
"sumOfSquares": 11.0,
"observations": 122.0
},
"type": "numeric"
},
"W": {
"data": {
"nzObservations": 8.0,
"max": 2.0,
"sum": 8.0,
"min": 0.0,
"histogram": [122.0,
0.0,
0.0,
0.0
],
"sumOfSquares": 8.0,
"observations": 122.0
},
"type": "numeric"
}
}
Return variables
Returns a list of histogram objects.
For a list of what the short variable letters stand for, please refer to this list.
Comments (0)
You don't have permission to comment on this page.