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 - New Buildings Issue #24

Closed seattle-benchmarking closed 2 years ago

seattle-benchmarking commented 2 years ago

Can call this a nice to have. There is a flaw in the original design of the ENERGY USE TRENDS graph. Buildings that are built after the first year of data (2015) show up as an error Not enough data available even when they have data for every year they've existed. See id = 50254 as an example. This building has four years of site_eui_wn data but since it wasn't built or reporting data back to 2015 it throws an error.

image

┆Issue is synchronized with this Asana task

tomay commented 2 years ago

I've applied a fix here that gets available years from a given buildings data instead of from seattle.json, but I'm leaving this open for additional testing.

I do leave the original variable avail_years in place, in case it is used elsewhere. I only get previousYear from from the building data, right before passing to the shift template. Existing check to see that selected_year !== previousYear is left as is, as is the no_year flag

seattle-benchmarking commented 2 years ago

@tomay I did a bunch of testing on this. It seems to be performing quite well. The only odd behavior is sometimes the error message doesn't make sense. See id = 50662 as an example.

The building has 2020 data but shows this error:

image

And since 2020 is the first year of data for this building, selecting a different year isn't possible.

We might just need a different error message that is more generic.

tomay commented 2 years ago

There was already an error message for an invalid range of data. I extended this to include the case where there is only a single year of data

image

tomay commented 2 years ago

Note: previously, they were trapping errors for buildings which were missing data at the beginning of the range (with an error like above - "No data available for the year 2015".

This is no longer applicable, since we are taking whatever range of data is available. I haven't removed that completely, but instead worked around it

seattle-benchmarking commented 2 years ago

Thanks for the update. This looks good to me.