Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmasse-itix/ego2mix
This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid
https://github.com/nmasse-itix/ego2mix
electricity-grid rte smartcity
Last synced: 3 days ago
JSON representation
This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid
- Host: GitHub
- URL: https://github.com/nmasse-itix/ego2mix
- Owner: nmasse-itix
- License: mit
- Created: 2022-10-28T20:04:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T20:46:05.000Z (about 2 years ago)
- Last Synced: 2024-01-29T21:16:21.460Z (11 months ago)
- Topics: electricity-grid, rte, smartcity
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ego2mix
This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid.
## Usage
```go
package mainimport (
"fmt"ego2mix "github.com/nmasse-itix/ego2mix"
)func main() {
client := ego2mix.NewEco2mixClient("", nil)
records, err := client.FetchNationalRealTimeData(1) // we want only the last result
if err != nil {
panic(err)
}
fmt.Printf("Intensité carbone à %s en France: %d gCO2eq / kWh\n", records[0].DateHeure, records[0].TauxCo2)
}
```