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.
- Station list
- Weather data
- Forecast
Make sure to have go (1.9+) installed, then do:
go get -u github.com/murilobsd/cptec
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
Released under the BSD license.