Weather data for geekers
Go Cptec
is an INPE/CPTEC weather data parser. The data range from weather stations, given (temperature, rain, etc.), alerts, forecast.
The project has no link with INPE/CPTEC.
Table of Contents
Features
- Station list
- Weather data
- Forecast
Installing
From source (always latest)
Make sure to have go (1.9+) installed, then do:
go get -u github.com/murilobsd/cptec
Usage
Get stations:
cptec := cptec.New(nil)
stations, err := cptec.Station.GetAll()
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
for _, station := range stations {
fmt.Println(station)
}
# Output
# ID: 32549 - UF: TO - Locality: UHE Isamu Ikeda Montante
# ID: 32619 - UF: TO - Locality: Xambioa
License
Released under the BSD license.