Skip to content

Commit

Permalink
fix issue where wem and au is using 30m to calculate intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
chienleng committed Feb 7, 2025
1 parent d17093b commit fefd3be
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions data/calculate-carbon-intensity.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ function calAverage(isEnergyType, isWemOrAu, dataset) {

if (!isEnergyType) {
ei = ei * 1000

if (isWemOrAu) {
ei = ei * 2
}
}

return ei
Expand Down Expand Up @@ -63,8 +59,6 @@ export default function({
return data[domain.id] || 0
}
}

// else return 0
return 0
}

Expand Down Expand Up @@ -132,10 +126,6 @@ export default function({

if (!isEnergyType) {
ei = ei * 1000

if (isWemOrAu) {
ei = ei * 2
}
}

const isValidEI = Number.isFinite(ei)
Expand Down
4 changes: 0 additions & 4 deletions pages/energy/_region/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,6 @@ export default {
this.setEmissionsVolumePrefix('')
this.setEmissionsVolumeDisplayPrefix(SI.BASE)
this.isWemOrAu = this.regionId === 'wem' || this.regionId === 'au'
if (this.sWemOrAu && !this.isEnergyType) {
this.setInterval('30m')
}
this.doGetRegionDataByRangeInterval({
region: this.regionId,
range: this.range,
Expand Down

0 comments on commit fefd3be

Please sign in to comment.