Documentation
¶
Overview ¶
Package histogram provides visualization of activity patterns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHistogram ¶
GenerateHistogram creates a visual representation of user activity.
Types ¶
type ActivityHistogram ¶
type ActivityHistogram struct {
HourlyActivity map[int]int
Username string
Timezone string
QuietHours []int
UTCOffset int
WorkStart int
WorkEnd int
LunchStart float64
LunchEnd float64
}
ActivityHistogram represents activity data with visual representation.
type LunchBreak ¶
type LunchBreak struct {
Start float64 `json:"start"`
End float64 `json:"end"`
Confidence float64 `json:"confidence"`
}
LunchBreak represents lunch break times.
type OrgActivity ¶
OrgActivity represents activity for an organization.
type PeakProductivity ¶
type PeakProductivity struct {
Start float64 `json:"start"`
End float64 `json:"end"`
Count int `json:"count"`
}
PeakProductivity represents peak productivity hours.
type Result ¶
type Result struct {
HalfHourlyActivityUTC map[float64]int `json:"-"`
HourlyOrganizationActivity map[int]map[string]int `json:"hourly_organization_activity,omitempty"`
TopOrganizations []OrgActivity `json:"top_organizations"`
QuietHoursUTC []int `json:"quiet_hours_utc"`
SleepBucketsUTC []float64 `json:"sleep_buckets_utc,omitempty"`
SleepRangesLocal []SleepRange `json:"sleep_ranges_local,omitempty"`
PeakProductivityUTC PeakProductivity `json:"peak_productivity_utc,omitempty"`
PeakProductivityLocal PeakProductivity `json:"peak_productivity_local,omitempty"`
LunchHoursUTC LunchBreak `json:"lunch_hours_utc,omitempty"`
LunchHoursLocal LunchBreak `json:"lunch_hours_local,omitempty"`
}
Result represents timezone detection results - imported type needed for histogram.
type SleepRange ¶ added in v1.1.0
type SleepRange struct {
Start float64 `json:"start"`
End float64 `json:"end"`
Duration float64 `json:"duration"`
}
SleepRange represents a continuous rest/sleep period.
Click to show internal directories.
Click to hide internal directories.