Documentation ¶
Index ¶
- Constants
- func FStrToSlices(s string) ([]time.Time, []float64)
- func FcumulatedVar(data []IndexesSeries) ([]float64, error)
- func FgetMonthlyVariationsByDate(data []IndexesSeries, date time.Time) (float64, error)
- func FgetMonthlyVariationsInRange(data []IndexesSeries, startDate, endDate time.Time) []float64
- func FprintFormattedOutPut(data []IndexesSeries)
- func FprintFormattedOutPut02(data []IndexesSeries)
- func ReadCSVtoSlices(s string) [][]string
- type IndexValues
- type IndexesSeries
Constants ¶
const ( LayoutYYYYMMDD = "2006/02/01" LayoutDDMMYYYY = "02/01/2006" LayoutDDMMYYYYfull = "02/01/2006 15:04:05 -03" Layout = "22 Jan 2006 15:04:05" )
const ( Layout20060127 = "2006/01/27" Layout27012006 = "27/01/2006" Layout27012006full = "27/01/2006 15:04:03 time.UTC" Layout012006 = "01/2006" )
Variables ¶
This section is empty.
Functions ¶
func FStrToSlices ¶
FStrToSlices takes a slice of strings and returns two slices of different types
func FcumulatedVar ¶
func FcumulatedVar(data []IndexesSeries) ([]float64, error)
FcumulatedVar returns the cumulated variations at an interval
func FgetMonthlyVariationsByDate ¶
func FgetMonthlyVariationsByDate(data []IndexesSeries, date time.Time) (float64, error)
FgetMonthlyVariationsByDate returns the monthly variation by date
func FgetMonthlyVariationsInRange ¶
func FgetMonthlyVariationsInRange(data []IndexesSeries, startDate, endDate time.Time) []float64
FgetMonthlyVariationsInRange returns the variation in an interval of dates
func FprintFormattedOutPut ¶
func FprintFormattedOutPut(data []IndexesSeries)
FprintFormattedOutPut prints the formatted output using text/tabwriter
func FprintFormattedOutPut02 ¶
func FprintFormattedOutPut02(data []IndexesSeries)
FprintFormattedOutPut prints the formatted output without tabwriter
func ReadCSVtoSlices ¶
Types ¶
type IndexValues ¶
func FopenCSVfile ¶
func FopenCSVfile(s string) ([]IndexValues, error)
FopenCSVfile opens the CSV file and returns ...
type IndexesSeries ¶
func FFilterAndPrintWhitinInterval ¶
func FFilterAndPrintWhitinInterval(data []IndexesSeries, startDate, endDate time.Time) ([]IndexesSeries, error)
FFilterAndPrintWhitinInterval returns the filtered data whitin an interval
func FgetMonthlyVariation ¶
func FgetMonthlyVariation(data []IndexesSeries, date time.Time) (IndexesSeries, error)
FgetMonthlyVariation returns the date and the variation at a specific date
func FreadCSVdata ¶
func FreadCSVdata(s string) ([]IndexesSeries, error)
FreadCSVdata opens and put the CSV file's content into a struct using a bufio.NewReader
func FreadCSVtoStruct ¶
func FreadCSVtoStruct(s string) []IndexesSeries
FreadCSVtoStructs reads a CSV file into a struct