ia.BreaksCalculator Class
Calculates breaks for various types of classification.
Constructor
ia.BreaksCalculator
-
data
Parameters:
-
dataNumberThe data array.
Item Index
Methods
Properties
Methods
_quantileFunc
-
numberOfClasses -
a
Classifies a set of data values into classes with an equal number of units in each class.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification.
-
aNumberThe array of numbers to use - this.stats.sorted or this.stats.unique.
Returns:
addFunction
-
classifierName -
fnc
Adds a function. The function receives the number of classes as a parameter and must return the calculated breaks.
Parameters:
-
classifierNameStringThe name of the classifier.
-
fncFunctionThe function.
continuous
-
numberOfClasses
Classifies a set of data values by continuous values.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification which is irrelevant in this case.
Returns:
equalIntervals
-
numberOfClasses
Classifies a set of data values by setting the value ranges in each class to be equal in size.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification.
Returns:
getBreaks
-
numberOfClasses -
name
Classifies a set of data values by setting the value ranges in each class to be equal in size.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification.
-
nameStringThe name of the classification to use.
Returns:
getData
()
Number
Gets the data.
Returns:
natural
-
numberOfClasses
Classifies a set of data values into classes with a variable
number of values in each class. Class breaks are placed where
there are gaps between clusters of values using Jenks natural
breaks classification. Uses the continuous array of the
data object for optimization.
Further information on Jenks classification can be found in: Jenks, George F. 1967. "The Data Model Concept in Statistical Mapping", International Yearbook of Cartography 7: 186-190.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification.
Returns:
quantiles
-
numberOfClasses
Classifies a set of data values into classes with an equal number of units in each class.
Parameters:
-
numberOfClassesNumberThe number of classes to use in the classification.
Returns:
setData
-
value
Sets the data.
Parameters:
-
valueNumberThe data.
standardDeviation
-
numberOfStandardDeviations
Classifies a set of data values by finding the mean value,
and then placing class breaks above and below the mean at
intervals of generally 0.25, 0.5 or 1 standard deviation.
Makes use of the sdSize property to
determine the size of the standard deviation
The standard deviation classifier differs from other classifiers in that the number of standard deviations above and below the mean are specified rather than the number of classes.
Parameters:
-
numberOfStandardDeviationsNumberThe number of standard deviations above and below the mean.
Returns:
Properties
errorMessage
String
The error message that appears when a calculator breaks and defaults to equal interval.
Default: "Legend error defaulting to equal interval."
sdSize
Number
The size of the interval to use for standard deviation calculators.
Default: 1