covid

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

func (*Date) MarshalCSV

func (date *Date) MarshalCSV() (string, error)

Convert the internal date as CSV string

func (*Date) String

func (date *Date) String() string

func (*Date) UnmarshalCSV

func (date *Date) UnmarshalCSV(csv string) (err error)

Convert the CSV string as internal date

type Infection

type Infection struct {
	Country          string `csv:"location"`
	Date             Date   `csv:"date"`
	Cases            uint   `csv:"total_cases"`
	Deaths           uint   `csv:"total_deaths"`
	Tests            uint   `csv:"total_tests"`
	TotalCasesPerMil uint   `csv:"total_cases_per_million"`
}

func (Infection) ToVector

func (i Infection) ToVector() (model.Vector, error)

type Infections

type Infections []Infection

func Parse

func Parse(file []byte) Infections

func (Infections) ToCollection

func (i Infections) ToCollection() (map[string]map[string]oremi.Collection, error)

Jump to

Keyboard shortcuts

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