noaa

package
v0.0.0-...-2aaaadd Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheDir    string
	IgnoreCache bool
)

Functions

func PreloadDailyRecords

func PreloadDailyRecords(stationIds []string) error

func PreloadHourlyRecords

func PreloadHourlyRecords(stationId string, startDate, endDate time.Time) error

Types

type DailyRecord

type DailyRecord struct {
	StationId     string
	Date          time.Time
	Elements      map[string]ElementRecord
	HourlyRecords []HourlyRecord
}

func DailyRecords

func DailyRecords(stationId string, startDate, endDate *time.Time) ([]DailyRecord, error)

func HourlyRecords

func HourlyRecords(stationId string, startDate, endDate time.Time, loc *time.Location) ([]DailyRecord, error)

type ElementRecord

type ElementRecord struct {
	Element string
	Value   int
}

type HourlyRecord

type HourlyRecord struct {
	StationId   string
	StationName string
	Time        time.Time
	ReportType  string
	Temp        int
	Prcp        int
}

type Station

type Station struct {
	Id    string
	Lat   float64
	Lon   float64
	Elev  float64
	State string
	Name  string
	GSN   string
	HCN   string
	WMO   string
}

func Stations

func Stations() ([]Station, error)

Jump to

Keyboard shortcuts

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