Class: StarsStatisticalModel
A class representing the statistical data of the star ratings of reviews.
Constructors
constructor
• new StarsStatisticalModel(mean
, median
, standardDeviation
, lowerQuartile
, upperQuartile
, interquartileRange
)
Creates a new StarsStatisticalModel instance.
Parameters
Name | Type | Description |
---|---|---|
mean | number | The mean (average) of the star ratings. |
median | number | The median (middle value) of the star ratings. |
standardDeviation | number | The standard deviation of the star ratings. |
lowerQuartile | number | The lower quartile (Q1) of the star ratings. |
upperQuartile | number | The upper quartile (Q3) of the star ratings. |
interquartileRange | number | The interquartile range (IQR) of the star ratings. |
Defined in
components/StarsStatisticalModel.tsx:22
Properties
interquartileRange
• interquartileRange: number
Defined in
components/StarsStatisticalModel.tsx:10
lowerQuartile
• lowerQuartile: number
Defined in
components/StarsStatisticalModel.tsx:8
mean
• mean: number
Defined in
components/StarsStatisticalModel.tsx:5
median
• median: number
Defined in
components/StarsStatisticalModel.tsx:6
standardDeviation
• standardDeviation: number
Defined in
components/StarsStatisticalModel.tsx:7
upperQuartile
• upperQuartile: number
Defined in
components/StarsStatisticalModel.tsx:9
Methods
toJSONString
▸ toJSONString(): string
Converts the StarsStatisticalModel instance to a JSON string.
Returns
string
A JSON string representing the instance.
Defined in
components/StarsStatisticalModel.tsx:43
fromJSONString
▸ Static
fromJSONString(jsonString
): StarsStatisticalModel
Creates a new StarsStatisticalModel instance from a JSON string.
Parameters
Name | Type | Description |
---|---|---|
jsonString | string | A JSON string representing a StarsStatisticalModel instance. |
Returns
A new StarsStatisticalModel instance.