0.0.51 • Published 26 days ago
co2-data v0.0.51
co2-data
Small library that extracts the average carbon intensity from json requests from the Electricity Map API.
This project reads the api responses and consolidates the results in a single lightweight file that is exported.
24kb / 5kb gzip
Getting started
- Install the library using
npm install co2-data
oryarn add co2-data
- Import the function you want to use:
import {
co2Data, // Raw javascript array with the country iso code and the average carbon intensity
getFactor, // Function to get the average carbon intensity by country code
getCountries // List of country codes and sub-codes
} from 'co2-data';
getFactor(co2Data, 'CL'); // Average for Chile: 343.27340406847736
getCountries(); // Array with the ISO code and the name of the countries [{code: 'CL', 'Chile'},...]
Credits
0.0.51
26 days ago
0.0.50
2 months ago
0.0.49
2 months ago
0.0.48
2 months ago
0.0.44
4 months ago
0.0.45
4 months ago
0.0.46
4 months ago
0.0.47
4 months ago
0.0.42
5 months ago
0.0.43
5 months ago
0.0.40
7 months ago
0.0.41
6 months ago
0.0.37
9 months ago
0.0.38
8 months ago
0.0.39
7 months ago
0.0.34
9 months ago
0.0.35
9 months ago
0.0.36
9 months ago
0.0.33
1 year ago
0.0.32
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.28
2 years ago
0.0.29
2 years ago
0.0.26
2 years ago
0.0.27
2 years ago
0.0.24
2 years ago
0.0.25
2 years ago
0.0.20
2 years ago
0.0.21
2 years ago
0.0.22
2 years ago
0.0.23
2 years ago
0.0.19
2 years ago
0.0.17
3 years ago
0.0.18
3 years ago
0.0.16
3 years ago
0.0.15
3 years ago
0.0.14
3 years ago
0.0.13
3 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago