Skip to content

Commit

Permalink
generate emissionsFactors table mvp
Browse files Browse the repository at this point in the history
  • Loading branch information
SimasG committed Jan 8, 2023
1 parent 9094788 commit 3e501e0
Show file tree
Hide file tree
Showing 6 changed files with 13,002 additions and 9 deletions.
12,996 changes: 12,995 additions & 1 deletion data/GasUsed.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions dist/calculateEmissionsFactor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/calculateEmissionsFactor.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"scripts": {
"run-index": "tsc && node ./dist/index",
"generateData": "tsc && node ./dist/scripts/generateData",
"run-tx": "tsc && node ./dist/getTransactions"
"run-tx": "tsc && node ./dist/getTransactions",
"generateEmissionsFactorTable": "tsc && node ./dist/scripts/generateEmissionsFactorTable"
}
}
2 changes: 1 addition & 1 deletion src/calculateEmissionsFactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ export const calculateEmissionsFactor = (
const emissionsGCO2 = dayEnergyUsedKWh * gCO2PerKWh;
// emissionsFactor (gCO2/gas)
const emissionsFactor = emissionsGCO2 / dayGasUsed;
console.log("emissionsFactor:", emissionsFactor);
return emissionsFactor;
};
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"strict": true /* Enable all strict type-checking options. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"resolveJsonModule": true
},
"include": ["src/**/*", "src/scripts/**/*"]
}

0 comments on commit 3e501e0

Please sign in to comment.