Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 4 hours 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-09T22:04:53.000Z (over 5 years ago)
- Last Synced: 2024-06-20T14:23:40.733Z (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
[![GoDoc](https://godoc.org/github.com/murilobsd/cptec?status.svg)](https://godoc.org/github.com/murilobsd/cptec) [![Go Report Card](https://goreportcard.com/badge/github.com/murilobsd/cptec)](https://goreportcard.com/report/github.com/murilobsd/cptec) [![Coverage Status](https://coveralls.io/repos/github/murilobsd/cptec/badge.svg?branch=master)](https://coveralls.io/github/murilobsd/cptec?branch=master) [![Build Status](https://travis-ci.org/murilobsd/cptec.svg?branch=master)](https://travis-ci.org/murilobsd/cptec)
[![License](https://img.shields.io/badge/license-BSD-green.svg)](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.