@powercalc/power-router 1.0.39 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +26 -26
- package/dist/config/countrydata.json +265 -265
- package/dist/converter.d.ts +8 -8
- package/dist/converter.js +56 -59
- package/dist/converter.js.map +1 -1
- package/dist/genTypes.d.ts +4 -4
- package/dist/genTypes.js +53 -53
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/load.d.ts +7 -7
- package/dist/load.js +31 -31
- package/dist/router/config/countries.json +194 -0
- package/dist/router/config/countrydata.json +266 -0
- package/dist/router/config/types.json +333 -0
- package/dist/router/controllers/LoadAndParse.d.ts +10 -10
- package/dist/router/controllers/LoadAndParse.js +57 -57
- package/dist/router/controllers/Router.d.ts +7 -7
- package/dist/router/controllers/Router.js +105 -105
- package/dist/router/index.d.ts +2 -2
- package/dist/router/index.js +5 -5
- package/dist/router/interfaces/config.d.ts +5 -5
- package/dist/router/interfaces/config.js +2 -2
- package/dist/router/interfaces/entsoe.d.ts +50 -50
- package/dist/router/interfaces/entsoe.js +2 -2
- package/dist/router/interfaces/queryoptions.d.ts +15 -15
- package/dist/router/interfaces/queryoptions.js +15 -15
- package/dist/router/interfaces/types.d.ts +12 -12
- package/dist/router/interfaces/types.js +2 -2
- package/dist/router/services/CommonTimestamps.d.ts +15 -15
- package/dist/router/services/CommonTimestamps.js +185 -173
- package/dist/router/services/CommonTimestamps.js.map +1 -1
- package/dist/router/services/Eurostat.d.ts +10 -10
- package/dist/router/services/Eurostat.js +72 -72
- package/dist/router/services/Eurostat.js.map +1 -1
- package/dist/router/services/LoadService.d.ts +27 -27
- package/dist/router/services/LoadService.js +82 -82
- package/dist/router/services/Loader.d.ts +38 -38
- package/dist/router/services/Loader.js +119 -121
- package/dist/router/services/Loader.js.map +1 -1
- package/dist/router/services/ParseEdifact.d.ts +28 -28
- package/dist/router/services/ParseEdifact.js +159 -159
- package/dist/router/services/ParseInstalled.d.ts +9 -9
- package/dist/router/services/ParseInstalled.js +45 -45
- package/dist/router/services/batch/maxHydrofill.d.ts +10 -10
- package/dist/router/services/batch/maxHydrofill.js +65 -65
- package/package.json +53 -53
- package/src/converter.ts +61 -64
- package/src/router/config/countrydata.json +265 -265
- package/src/router/services/CommonTimestamps.ts +90 -54
- package/src/router/services/Eurostat.ts +3 -3
- package/src/router/services/Loader.ts +2 -5
package/dist/converter.js
CHANGED
|
@@ -1,60 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Convert = void 0;
|
|
4
|
-
const genTypes_1 = require("./genTypes");
|
|
5
|
-
const maxHydrofill_1 = require("./router/services/batch/maxHydrofill");
|
|
6
|
-
const promises_1 = require("node:fs/promises");
|
|
7
|
-
class Convert {
|
|
8
|
-
static async start() {
|
|
9
|
-
const countries = await this.getCountries();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
exports.Convert = Convert;
|
|
59
|
-
Convert.start();
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Convert = void 0;
|
|
4
|
+
const genTypes_1 = require("./genTypes");
|
|
5
|
+
const maxHydrofill_1 = require("./router/services/batch/maxHydrofill");
|
|
6
|
+
const promises_1 = require("node:fs/promises");
|
|
7
|
+
class Convert {
|
|
8
|
+
static async start() {
|
|
9
|
+
const countries = await this.getCountries();
|
|
10
|
+
for (const country of countries) {
|
|
11
|
+
const types = await genTypes_1.GenTypes.getTypes(country.code);
|
|
12
|
+
country.types = types;
|
|
13
|
+
const h = await maxHydrofill_1.Hydrofill.getMaxHydrofill(country.code);
|
|
14
|
+
if (h.max) {
|
|
15
|
+
const GW = Math.round(h.max / 1000) + ' GW';
|
|
16
|
+
country.hydrofill = {
|
|
17
|
+
min: h.min,
|
|
18
|
+
max: h.max
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const gen = await this.getGeneration(country.code);
|
|
22
|
+
const load = await this.getLoad(country.code);
|
|
23
|
+
const price = await this.getPrice(country.code);
|
|
24
|
+
const hydrofill = await this.getHydrofill(country.code);
|
|
25
|
+
}
|
|
26
|
+
console.log(countries);
|
|
27
|
+
(0, promises_1.writeFile)('data/countrydata.json', JSON.stringify(countries, null, 2), 'utf-8');
|
|
28
|
+
}
|
|
29
|
+
static async getCountries() {
|
|
30
|
+
const url = 'https://powercalculator.eu/entsoe/datalists/countries';
|
|
31
|
+
const response = await fetch(url);
|
|
32
|
+
return await response.json();
|
|
33
|
+
}
|
|
34
|
+
static async getGeneration(countryCode) {
|
|
35
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/generation?year=2021&month=9`;
|
|
36
|
+
const response = await fetch(url);
|
|
37
|
+
return await response.json();
|
|
38
|
+
}
|
|
39
|
+
static async getLoad(countryCode) {
|
|
40
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/load?year=2021&month=9`;
|
|
41
|
+
const response = await fetch(url);
|
|
42
|
+
return await response.json();
|
|
43
|
+
}
|
|
44
|
+
static async getPrice(countryCode) {
|
|
45
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/prices?year=2021&month=9`;
|
|
46
|
+
const response = await fetch(url);
|
|
47
|
+
return await response.json();
|
|
48
|
+
}
|
|
49
|
+
static async getHydrofill(countryCode) {
|
|
50
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/hydrofill?year=2021`;
|
|
51
|
+
const response = await fetch(url);
|
|
52
|
+
return await response.json();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Convert = Convert;
|
|
56
|
+
Convert.start();
|
|
60
57
|
//# sourceMappingURL=converter.js.map
|
package/dist/converter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,uEAAiE;AACjE,+CAA6C;AAG7C,MAAa,OAAO;IAChB,MAAM,CAAC,KAAK,CAAC,KAAK;QACd,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;QAC3C,
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../src/converter.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,uEAAiE;AACjE,+CAA6C;AAG7C,MAAa,OAAO;IAChB,MAAM,CAAC,KAAK,CAAC,KAAK;QACd,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;QAC3C,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE;YAC7B,MAAM,KAAK,GAAG,MAAM,mBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACpD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;YACtB,MAAM,CAAC,GAAG,MAAM,wBAAS,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YACvD,IAAI,CAAC,CAAC,GAAG,EAAE;gBACP,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,KAAK,CAAA;gBAC3C,OAAO,CAAC,SAAS,GAAG;oBAChB,GAAG,EAAE,CAAC,CAAC,GAAG;oBACV,GAAG,EAAE,CAAC,CAAC,GAAG;iBACb,CAAA;aACJ;YACD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAClD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC7C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC/C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAC1D;QACD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,IAAA,oBAAS,EAAC,uBAAuB,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAY;QACrB,MAAM,GAAG,GAAG,uDAAuD,CAAC;QACpE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,WAAmB;QAC1C,MAAM,GAAG,GAAG,qCAAqC,WAAW,+BAA+B,CAAC;QAC5F,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,WAAmB;QACpC,MAAM,GAAG,GAAG,qCAAqC,WAAW,yBAAyB,CAAC;QACtF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAmB;QACrC,MAAM,GAAG,GAAG,qCAAqC,WAAW,2BAA2B,CAAC;QACxF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,WAAmB;QACzC,MAAM,GAAG,GAAG,qCAAqC,WAAW,sBAAsB,CAAA;QAClF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;CAEJ;AArDD,0BAqDC;AAED,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/genTypes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class GenTypes {
|
|
2
|
-
static getTypes(country: string): Promise<any[]>;
|
|
3
|
-
static makeGen(gen: any, load: any, price: any): any;
|
|
4
|
-
}
|
|
1
|
+
export declare class GenTypes {
|
|
2
|
+
static getTypes(country: string): Promise<any[]>;
|
|
3
|
+
static makeGen(gen: any, load: any, price: any): any;
|
|
4
|
+
}
|
package/dist/genTypes.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenTypes = void 0;
|
|
4
|
-
const node_zlib_1 = require("node:zlib");
|
|
5
|
-
const load_1 = require("./load");
|
|
6
|
-
const promises_1 = require("node:fs/promises");
|
|
7
|
-
class GenTypes {
|
|
8
|
-
static async getTypes(country) {
|
|
9
|
-
let types = [];
|
|
10
|
-
const minYear = 2015;
|
|
11
|
-
const maxYear = 2023;
|
|
12
|
-
let min;
|
|
13
|
-
let max;
|
|
14
|
-
for (let year = minYear; year <= maxYear; year++) {
|
|
15
|
-
for (let month = 1; month <= 12; month++) {
|
|
16
|
-
const gen = await load_1.Load.getGeneration(country, year, month);
|
|
17
|
-
const price = await load_1.Load.getPrice(country, year, month);
|
|
18
|
-
const load = await load_1.Load.getLoad(country, year, month);
|
|
19
|
-
const all = this.makeGen(gen, load, price);
|
|
20
|
-
const gzipfilename = `data/gzip/${country}-${year}-${month}.json.gzip`;
|
|
21
|
-
const filename = `data/generation/${country}-${year}-${month}.json`;
|
|
22
|
-
const buf = Buffer.from(JSON.stringify(all), 'utf-8');
|
|
23
|
-
(0, node_zlib_1.gzip)(buf, async (_, result) => {
|
|
24
|
-
var _a;
|
|
25
|
-
await (0, promises_1.writeFile)(gzipfilename, result, 'utf-8');
|
|
26
|
-
// console.log(gen.dataset.map((item:any) => item.label))
|
|
27
|
-
types = types.concat(((_a = gen.dataset) === null || _a === void 0 ? void 0 : _a.map((item) => item.psrType)) || []);
|
|
28
|
-
});
|
|
29
|
-
await (0, promises_1.writeFile)(filename, JSON.stringify(all, null, 2), 'utf-8');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return [...new Set(types)].sort();
|
|
33
|
-
}
|
|
34
|
-
static makeGen(gen, load, price) {
|
|
35
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
36
|
-
const all = {};
|
|
37
|
-
if ((_a = gen.dataset) === null || _a === void 0 ? void 0 : _a[0]) {
|
|
38
|
-
all.time = (_d = (_c = (_b = gen.dataset) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.map((item) => item.x);
|
|
39
|
-
gen.dataset.forEach((dataset) => {
|
|
40
|
-
all[dataset.psrType] = dataset.data.map((item) => item.y);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if ((_f = (_e = load === null || load === void 0 ? void 0 : load.dataset) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) {
|
|
44
|
-
all.A05 = load.dataset[0].data.map((item) => item.y);
|
|
45
|
-
}
|
|
46
|
-
if ((_g = price === null || price === void 0 ? void 0 : price.dataset) === null || _g === void 0 ? void 0 : _g[0]) {
|
|
47
|
-
all.price = price.dataset[0].data.map((item) => item.y);
|
|
48
|
-
}
|
|
49
|
-
console.log((_h = all.time) === null || _h === void 0 ? void 0 : _h.length, (_j = all.A05) === null || _j === void 0 ? void 0 : _j.length, (_k = all.price) === null || _k === void 0 ? void 0 : _k.length);
|
|
50
|
-
return all;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.GenTypes = GenTypes;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenTypes = void 0;
|
|
4
|
+
const node_zlib_1 = require("node:zlib");
|
|
5
|
+
const load_1 = require("./load");
|
|
6
|
+
const promises_1 = require("node:fs/promises");
|
|
7
|
+
class GenTypes {
|
|
8
|
+
static async getTypes(country) {
|
|
9
|
+
let types = [];
|
|
10
|
+
const minYear = 2015;
|
|
11
|
+
const maxYear = 2023;
|
|
12
|
+
let min;
|
|
13
|
+
let max;
|
|
14
|
+
for (let year = minYear; year <= maxYear; year++) {
|
|
15
|
+
for (let month = 1; month <= 12; month++) {
|
|
16
|
+
const gen = await load_1.Load.getGeneration(country, year, month);
|
|
17
|
+
const price = await load_1.Load.getPrice(country, year, month);
|
|
18
|
+
const load = await load_1.Load.getLoad(country, year, month);
|
|
19
|
+
const all = this.makeGen(gen, load, price);
|
|
20
|
+
const gzipfilename = `data/gzip/${country}-${year}-${month}.json.gzip`;
|
|
21
|
+
const filename = `data/generation/${country}-${year}-${month}.json`;
|
|
22
|
+
const buf = Buffer.from(JSON.stringify(all), 'utf-8');
|
|
23
|
+
(0, node_zlib_1.gzip)(buf, async (_, result) => {
|
|
24
|
+
var _a;
|
|
25
|
+
await (0, promises_1.writeFile)(gzipfilename, result, 'utf-8');
|
|
26
|
+
// console.log(gen.dataset.map((item:any) => item.label))
|
|
27
|
+
types = types.concat(((_a = gen.dataset) === null || _a === void 0 ? void 0 : _a.map((item) => item.psrType)) || []);
|
|
28
|
+
});
|
|
29
|
+
await (0, promises_1.writeFile)(filename, JSON.stringify(all, null, 2), 'utf-8');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return [...new Set(types)].sort();
|
|
33
|
+
}
|
|
34
|
+
static makeGen(gen, load, price) {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
36
|
+
const all = {};
|
|
37
|
+
if ((_a = gen.dataset) === null || _a === void 0 ? void 0 : _a[0]) {
|
|
38
|
+
all.time = (_d = (_c = (_b = gen.dataset) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.map((item) => item.x);
|
|
39
|
+
gen.dataset.forEach((dataset) => {
|
|
40
|
+
all[dataset.psrType] = dataset.data.map((item) => item.y);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if ((_f = (_e = load === null || load === void 0 ? void 0 : load.dataset) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) {
|
|
44
|
+
all.A05 = load.dataset[0].data.map((item) => item.y);
|
|
45
|
+
}
|
|
46
|
+
if ((_g = price === null || price === void 0 ? void 0 : price.dataset) === null || _g === void 0 ? void 0 : _g[0]) {
|
|
47
|
+
all.price = price.dataset[0].data.map((item) => item.y);
|
|
48
|
+
}
|
|
49
|
+
console.log((_h = all.time) === null || _h === void 0 ? void 0 : _h.length, (_j = all.A05) === null || _j === void 0 ? void 0 : _j.length, (_k = all.price) === null || _k === void 0 ? void 0 : _k.length);
|
|
50
|
+
return all;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.GenTypes = GenTypes;
|
|
54
54
|
//# sourceMappingURL=genTypes.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Config } from './router/interfaces/config';
|
|
2
|
-
export { PowerRouter } from './router/controllers/Router';
|
|
1
|
+
export { Config } from './router/interfaces/config';
|
|
2
|
+
export { PowerRouter } from './router/controllers/Router';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PowerRouter = void 0;
|
|
4
|
-
var Router_1 = require("./router/controllers/Router");
|
|
5
|
-
Object.defineProperty(exports, "PowerRouter", { enumerable: true, get: function () { return Router_1.PowerRouter; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PowerRouter = void 0;
|
|
4
|
+
var Router_1 = require("./router/controllers/Router");
|
|
5
|
+
Object.defineProperty(exports, "PowerRouter", { enumerable: true, get: function () { return Router_1.PowerRouter; } });
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/load.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare class Load {
|
|
2
|
-
static getCountries(): Promise<any>;
|
|
3
|
-
static getGeneration(countryCode: string, year: number, month: number): Promise<any>;
|
|
4
|
-
static getLoad(countryCode: string, year: number, month: number): Promise<any>;
|
|
5
|
-
static getPrice(countryCode: string, year: number, month: number): Promise<any>;
|
|
6
|
-
static getHydrofill(countryCode: string, year: number): Promise<any>;
|
|
7
|
-
}
|
|
1
|
+
export declare class Load {
|
|
2
|
+
static getCountries(): Promise<any>;
|
|
3
|
+
static getGeneration(countryCode: string, year: number, month: number): Promise<any>;
|
|
4
|
+
static getLoad(countryCode: string, year: number, month: number): Promise<any>;
|
|
5
|
+
static getPrice(countryCode: string, year: number, month: number): Promise<any>;
|
|
6
|
+
static getHydrofill(countryCode: string, year: number): Promise<any>;
|
|
7
|
+
}
|
package/dist/load.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Load = void 0;
|
|
4
|
-
class Load {
|
|
5
|
-
static async getCountries() {
|
|
6
|
-
const url = 'https://powercalculator.eu/entsoe/datalists/countries';
|
|
7
|
-
const response = await fetch(url);
|
|
8
|
-
return await response.json();
|
|
9
|
-
}
|
|
10
|
-
static async getGeneration(countryCode, year, month) {
|
|
11
|
-
const url = `https://powercalculator.eu/entsoe/${countryCode}/generation?year=${year}&month=${month}`;
|
|
12
|
-
const response = await fetch(url);
|
|
13
|
-
return await response.json();
|
|
14
|
-
}
|
|
15
|
-
static async getLoad(countryCode, year, month) {
|
|
16
|
-
const url = `https://powercalculator.eu/entsoe/${countryCode}/load?year=${year}&month=${month}`;
|
|
17
|
-
const response = await fetch(url);
|
|
18
|
-
return await response.json();
|
|
19
|
-
}
|
|
20
|
-
static async getPrice(countryCode, year, month) {
|
|
21
|
-
const url = `https://powercalculator.eu/entsoe/${countryCode}/prices?year=${year}&month=${month}`;
|
|
22
|
-
const response = await fetch(url);
|
|
23
|
-
return await response.json();
|
|
24
|
-
}
|
|
25
|
-
static async getHydrofill(countryCode, year) {
|
|
26
|
-
const url = `https://powercalculator.eu/entsoe/${countryCode}/hydrofill?year=${year}`;
|
|
27
|
-
const response = await fetch(url);
|
|
28
|
-
return await response.json();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.Load = Load;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Load = void 0;
|
|
4
|
+
class Load {
|
|
5
|
+
static async getCountries() {
|
|
6
|
+
const url = 'https://powercalculator.eu/entsoe/datalists/countries';
|
|
7
|
+
const response = await fetch(url);
|
|
8
|
+
return await response.json();
|
|
9
|
+
}
|
|
10
|
+
static async getGeneration(countryCode, year, month) {
|
|
11
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/generation?year=${year}&month=${month}`;
|
|
12
|
+
const response = await fetch(url);
|
|
13
|
+
return await response.json();
|
|
14
|
+
}
|
|
15
|
+
static async getLoad(countryCode, year, month) {
|
|
16
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/load?year=${year}&month=${month}`;
|
|
17
|
+
const response = await fetch(url);
|
|
18
|
+
return await response.json();
|
|
19
|
+
}
|
|
20
|
+
static async getPrice(countryCode, year, month) {
|
|
21
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/prices?year=${year}&month=${month}`;
|
|
22
|
+
const response = await fetch(url);
|
|
23
|
+
return await response.json();
|
|
24
|
+
}
|
|
25
|
+
static async getHydrofill(countryCode, year) {
|
|
26
|
+
const url = `https://powercalculator.eu/entsoe/${countryCode}/hydrofill?year=${year}`;
|
|
27
|
+
const response = await fetch(url);
|
|
28
|
+
return await response.json();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Load = Load;
|
|
32
32
|
//# sourceMappingURL=load.js.map
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"code": "10YAT-APG------L",
|
|
4
|
+
"name": "Austria",
|
|
5
|
+
"population": 8955102,
|
|
6
|
+
"short": "AT"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"code": "10YBE----------2",
|
|
10
|
+
"name": "Belgium",
|
|
11
|
+
"population": 11524454,
|
|
12
|
+
"short": "BE"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"code": "10YBA-JPCC-----D",
|
|
16
|
+
"name": "Bosnia and Herzegovina",
|
|
17
|
+
"population": 3280819,
|
|
18
|
+
"short": "BA"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"code": "10YCA-BULGARIA-R",
|
|
22
|
+
"name": "Bulgaria",
|
|
23
|
+
"population": 6951482,
|
|
24
|
+
"short": "BG"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"code": "10YCY-1001A0003J",
|
|
28
|
+
"name": "Cyprus",
|
|
29
|
+
"population": 1207359,
|
|
30
|
+
"short": "CY"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"code": "10YCZ-CEPS-----N",
|
|
34
|
+
"name": "Czech Republic",
|
|
35
|
+
"population": 10708981,
|
|
36
|
+
"short": "CZ"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"code": "10Y1001A1001A65H",
|
|
40
|
+
"name": "Denmark",
|
|
41
|
+
"population": 5793636,
|
|
42
|
+
"short": "DK"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"code": "10Y1001A1001A39I",
|
|
46
|
+
"name": "Estonia",
|
|
47
|
+
"population": 1328976,
|
|
48
|
+
"short": "EE"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"code": "10YFI-1--------U",
|
|
52
|
+
"name": "Finland",
|
|
53
|
+
"population": 5540720,
|
|
54
|
+
"short": "FI"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"code": "10YMK-MEPSO----8",
|
|
58
|
+
"name": "North Macedonia",
|
|
59
|
+
"population": 2084367,
|
|
60
|
+
"short": "MK"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"code": "10YFR-RTE------C",
|
|
64
|
+
"name": "France",
|
|
65
|
+
"population": 67146000,
|
|
66
|
+
"short": "FR"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"code": "10Y1001A1001A83F",
|
|
70
|
+
"name": "Germany",
|
|
71
|
+
"population": 83190556,
|
|
72
|
+
"short": "DE"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"code": "10YGR-HTSO-----Y",
|
|
76
|
+
"name": "Greece",
|
|
77
|
+
"population": 10724599,
|
|
78
|
+
"short": "GR"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"code": "10YHU-MAVIR----U",
|
|
82
|
+
"name": "Hungary",
|
|
83
|
+
"population": 9769526,
|
|
84
|
+
"short": "HU"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"code": "10Y1001A1001A59C",
|
|
88
|
+
"name": "Ireland",
|
|
89
|
+
"population": 4982900,
|
|
90
|
+
"short": "IE"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"code": "10YIT-GRTN-----B",
|
|
94
|
+
"name": "Italy",
|
|
95
|
+
"population": 60390560,
|
|
96
|
+
"short": "IT"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"code": "10YLV-1001A00074",
|
|
100
|
+
"name": "Latvia",
|
|
101
|
+
"population": 1901548,
|
|
102
|
+
"short": "LV"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"code": "10YLT-1001A0008Q",
|
|
106
|
+
"name": "Lithuania",
|
|
107
|
+
"population": 2793471,
|
|
108
|
+
"short": "LT"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"code": "10YLU-CEGEDEL-NQ",
|
|
112
|
+
"name": "Luxembourg",
|
|
113
|
+
"population": 626108,
|
|
114
|
+
"short": "LU"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"code": "10YCS-CG-TSO---S",
|
|
118
|
+
"name": "Montenegro",
|
|
119
|
+
"population": 622359,
|
|
120
|
+
"short": "ME"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"code": "10YGB----------A",
|
|
124
|
+
"name": "United Kingdom",
|
|
125
|
+
"population": 68133400,
|
|
126
|
+
"short": "GB"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"code": "10YNL----------L",
|
|
130
|
+
"name": "Nederlands",
|
|
131
|
+
"population": 17446640,
|
|
132
|
+
"short": "NL"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"code": "10YNO-0--------C",
|
|
136
|
+
"name": "Norway",
|
|
137
|
+
"population": 5330800,
|
|
138
|
+
"short": "NO"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"code": "10YPL-AREA-----S",
|
|
142
|
+
"name": "Poland",
|
|
143
|
+
"population": 38386000,
|
|
144
|
+
"short": "PL"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"code": "10YPT-REN------W",
|
|
148
|
+
"name": "Portugal",
|
|
149
|
+
"population": 10276617,
|
|
150
|
+
"short": "PT"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"code": "10YRO-TEL------P",
|
|
154
|
+
"name": "Romania",
|
|
155
|
+
"population": 19238250,
|
|
156
|
+
"short": "RO"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"code": "10YCS-SERBIATSOV",
|
|
160
|
+
"name": "Serbia",
|
|
161
|
+
"population": 6963764,
|
|
162
|
+
"short": "RS"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"code": "10YSK-SEPS-----K",
|
|
166
|
+
"name": "Slovakia",
|
|
167
|
+
"population": 5459642,
|
|
168
|
+
"short": "SK"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"code": "10YSI-ELES-----O",
|
|
172
|
+
"name": "Slovenia",
|
|
173
|
+
"population": 2094060,
|
|
174
|
+
"short": "SI"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"code": "10YES-REE------0",
|
|
178
|
+
"name": "Spain",
|
|
179
|
+
"population": 46723749,
|
|
180
|
+
"short": "ES"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"code": "10YSE-1--------K",
|
|
184
|
+
"name": "Sweden",
|
|
185
|
+
"population": 10383676,
|
|
186
|
+
"short": "SE"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"code": "10YCH-SWISSGRIDZ",
|
|
190
|
+
"name": "Switzerland",
|
|
191
|
+
"population": 8718853,
|
|
192
|
+
"short": "CH"
|
|
193
|
+
}
|
|
194
|
+
]
|