analyzers

package
v0.0.0-...-62fa103 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WeekDayString

func WeekDayString(weekDay int) *string

WeekDayString returns the weekDay English string

Types

type Report

type Report struct {
	Analysis []ReportValue `json:"analysis"`
}

func ReportHourly

func ReportHourly(consumptions *parser.Consumptions) Report

ReportHourly makes calculations (Mean) by hour based on the electricity consumption

func ReportWeekDays

func ReportWeekDays(consumptions *parser.Consumptions) Report

ReportWeekDays Analyzes the Consumption done based on weeekdays intervals and returns the consumption avg for each weekDay

type ReportValue

type ReportValue struct {
	Hour       *int     `json:"hour,omitempty"`
	WeekDay    *int     `json:"weekDay,omitempty"`
	WeekString *string  `json:"weekString,omitempty"`
	Mean       *float64 `json:"mean,omitempty"`
}

type ReportWeekDayHourly

type ReportWeekDayHourly struct {
	WeekDay    *int    `json:"weekDay,omitempty"`
	WeekString *string `json:"weekString,omitempty`
	Analysis   Report  `json:"report,omitempty"`
}

func ReportWeekDaysHourly

func ReportWeekDaysHourly(consumptions *parser.Consumptions) []ReportWeekDayHourly

Analyzes the Consumption done based on weeekdays intervals and returns the consumption avg for each weekDay

type ResponseReport

type ResponseReport struct {
	WeekDaysReport     Report                `json:"weekDaysReport"`
	HourlyReport       Report                `json:"hourlyReport"`
	WeekDayHoursReport []ReportWeekDayHourly `json:"weekdayHoursReport"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL