parse

package
v0.0.0-...-bf0b380 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetWeatherDebug

func SetWeatherDebug(enabled bool)

func WriteJSON

func WriteJSON()

WriteJSON Takes in all the data and writes it to a json file

Types

type MonthWeather

type MonthWeather struct {
	Good float64 `json:"g"`
	Bad  float64 `json:"b"`
	// contains filtered or unexported fields
}

MonthWeather All the data for the entire month is condensed down to MonthWeather

type Node

type Node struct {
	ShortZip    []int         `json:"z,omitempty"`
	City        string        `json:"c,omitempty"`
	State       string        `json:"s,omitempty"`
	Approximate bool          `json:"a,omitempty"`
	Weather     *SmallWeather `json:"w,omitempty"`
	// contains filtered or unexported fields
}

Node A spot on the final map that is exported to a json file

type SearchLocation

type SearchLocation struct {
	Zip            string `json:"z"`
	Name           string `json:"n"`
	ZipPopulation  int    `json:"p"`
	CityPopulation int    `json:"c"`
}

type SmallWeather

type SmallWeather struct {
	Months   *[24]int `json:"m,omitempty"`
	RawScore int      `json:"r"`
	Score    int      `json:"p"`
	// contains filtered or unexported fields
}

type Station

type Station struct {
	Weather TotalWeather `json:"w"`
	// contains filtered or unexported fields
}

Station Contains one station with weather and location

type TotalWeather

type TotalWeather struct {
	Months map[string]MonthWeather `json:"m"`
	// contains filtered or unexported fields
}

TotalWeather All the weather for a year

type USMap

type USMap struct {
	Top    [][2]int               `json:"t"`
	Bottom [][2]int               `json:"b"`
	Map    [mapRows][mapCols]Node `json:"m"`
}

USMap Returns the top best and worst places as well as all the data in the map

func BuildMap

func BuildMap() (USMap, error)

BuildMap Takes in the zip code map and the weather map and combines them

type ZipCodes

type ZipCodes struct {
	CityState string   `json:"c"`
	Zip       []string `json:"z"`
}

ZipCodes Has a name and all zip codes corresponding to it in an array

Jump to

Keyboard shortcuts

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