statCount
The statCount function creates a new plotting context with new dataset which contains the "count" statistic calculated on sample of a single categorical variable x. It counts the number of observations in each category. It's weighted, it means the weighted count for each category is calculated (each element within a category is counted along with its weight).
Arguments
X
Type of x categories
x
Required
Iterable Column String
The x argument is used to provide the sample (or its x-part) on which the statistic is computed.
weights
Optional
Iterable Column String
The weights argument is used to provide the weights of sample elements.
Statistic properties
In this context, there are the following statistical properties that can be used to create mappings, customize tooltips, etc.
Stat.x
Column<X>
The Stat.x contains categories.
Stat.count
Column<Int>
The Stat.count contains number of observations in this category
Stat.countWeighted
Column<Double>
The Stat.countWeighted contains weighted count (sum of weights in this category). Without weights its values matches Stat.count values.