Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jalle19/nordpool-influxdb
A collection of scripts for storing Nordpool price data in InfluxDB
https://github.com/jalle19/nordpool-influxdb
Last synced: 3 months ago
JSON representation
A collection of scripts for storing Nordpool price data in InfluxDB
- Host: GitHub
- URL: https://github.com/jalle19/nordpool-influxdb
- Owner: Jalle19
- License: gpl-3.0
- Created: 2020-02-16T17:53:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T07:37:49.000Z (12 months ago)
- Last Synced: 2024-04-15T00:14:32.766Z (9 months ago)
- Language: JavaScript
- Size: 70.3 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nordpool-influxdb
A collection of scripts for storing Nordpool price data in InfluxDB
This repository contains a collection of scripts for storing Nordpool price data in InfluxDB:
* one that fetches price data from Nordpool and outputs it as JSON
* one that reads JSON and stores it in InfluxDB## Usage
### fetch-prices-json.js
```bash
AREA=FI CURRENCY=EUR node scripts/fetch-prices-json.js > nordpool.json
```The JSON is an array of objects like this:
```json
{
"area": "FI",
"date": 1581890400000,
"value": 8.39
}
```### update-influxdb.js
```
INFLUX_HOST=10.110.1.6 INFLUX_DATABASE=nordpool INFLUX_USERNAME=nordpool INFLUX_PASSWORD=nordpool node scripts/update-influxdb.js < nordpool.json
```You can combine both scripts like this:
```bash
AREA=FI CURRENCY=EUR node scripts/fetch-prices-json.js | INFLUX_HOST=10.110.1.6 INFLUX_DATABASE=nordpool INFLUX_USERNAME=nordpool INFLUX_PASSWORD=nordpool node scripts/update-influxdb.js
```This can be useful when running from cron.
## License
GNU GENERAL PUBLIC LICENSE Version 3