https://github.com/murilobsd/cptec
:sunny: Go library for parsing the INPE/CPTEC weather data :umbrella:
https://github.com/murilobsd/cptec
brazil cptec golang inpe scraping weather
Last synced: 3 months ago
JSON representation
:sunny: Go library for parsing the INPE/CPTEC weather data :umbrella:
- Host: GitHub
- URL: https://github.com/murilobsd/cptec
- Owner: murilobsd
- License: bsd-3-clause
- Created: 2018-10-08T19:08:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-09T22:04:53.000Z (over 6 years ago)
- Last Synced: 2024-12-28T17:16:26.272Z (5 months ago)
- Topics: brazil, cptec, golang, inpe, scraping, weather
- Language: HTML
- Homepage: https://murilobsd.github.io/cptec/
- Size: 221 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
> Weather data for geekers
[](https://godoc.org/github.com/murilobsd/cptec) [](https://goreportcard.com/report/github.com/murilobsd/cptec) [](https://coveralls.io/github/murilobsd/cptec?branch=master) [](https://travis-ci.org/murilobsd/cptec)
[](https://raw.githubusercontent.com/murilobsd/cptec/master/LICENSE)[`Go Cptec`](https://github.com/murilobsd/cptec) is an [INPE/CPTEC](https://www.cptec.inpe.br/) weather data parser. The data range from weather stations, given (temperature, rain, etc.), alerts, forecast.
> The project has no link with [INPE/CPTEC](https://www.cptec.inpe.br/).
# Table of Contents
- [Features](#features)
- [Installing](#installing)
- [Usage](#usage)
- [License](#License)## Features
- Station list
- Weather data
- Forecast## Installing
### From source (always latest)
Make sure to have [go](https://golang.org/) (1.9+) installed, then do:
```bash
go get -u github.com/murilobsd/cptec
```## Usage
Get stations:
```go
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) license.