GreenInfo-Network / seattle-building-dashboard

Energy benchmarking for Seattle
https://greeninfo-network.github.io/seattle-building-dashboard/
ISC License
1 stars 0 forks source link

Energy use trends (shift) #9

Closed danrademacher closed 2 years ago

danrademacher commented 2 years ago

New design: image

Currently looks like: image

Minimal changes:

┆Issue is synchronized with this Asana task

tomay commented 2 years ago

Do they want to drop the labels ("Building Type Average", "WASH MUTUAL TOWER (1201 THIRD AVE)" shown on the far right here?

They are not in the design, but that could just be an oversight

image

danrademacher commented 2 years ago

@tsinn can you weigh in on those labels?

tsinn commented 2 years ago

Sorry - I think it's helpful to include just like you've done, Tom. Looks good!

tomay commented 2 years ago

I think they are calculating percent change wrong here:

image

    const previousValue = yearData[0].val;
    const selectedValue = yearData[1].val;
    return ((selectedValue - previousValue) / selectedValue) * 100;

They are dividing the difference by the current value, not the initial value

The formula should be: ( current_value - initial_value ) / initial_value * 100

danrademacher commented 2 years ago

Simple real-life example from last comment

(3-2)/3 = 33% vs (3-2)/2=50%