new Stats(data)
A class to simple statistics and classifications for choropleth maps
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Array.<number> | The data on which to perfom statisitcal operations |
Members
-
<static, constant> METHODS :Object
-
The available methods for generating intervals for a dataset
Type:
- Object
Methods
-
ckmeansClasses(numClasses)
-
Get ckmeans clustered intervals from the data
Parameters:
Name Type Description numClassesnumber The number of classes
Returns:
An Array of numbers starting with the minimum value and incemented to the maximum value by ckmeans clustered intevrals
- Type
- Array.<number>
-
equalIntervalClasses(numClasses)
-
Get equal intervals from the data
Parameters:
Name Type Description numClassesnumber The number of classes
Returns:
An Array of numbers starting with the minimum value and incemented to the maximum value by equal intevrals
- Type
- Array.<number>
-
max()
-
Get the maximum value from the data
Returns:
The maximum value from the data
- Type
- number
-
mean()
-
Get the mean value from the data
Returns:
The mean value from the data
- Type
- number
-
median()
-
Get the median value from the data
Returns:
The median value from the data
- Type
- number
-
min()
-
Get the minimum value from the data
Returns:
The minimum value from the data
- Type
- number
-
std()
-
Get the standard deviation of the data
Returns:
The standard deviation of the data
- Type
- number
-
stdClasses(numClasses)
-
Get standard deviation intervals from the data
Parameters:
Name Type Description numClassesnumber The number of classes (3, 5 or 7 only)
Returns:
An Array of numbers centered around the mean and distributed to the left and right by the standard deviation of the data
- Type
- Array.<number>