CenterForTheBuiltEnvironment / clima

The CBE Clima Tool is a web-based application built to support the need of architects and engineers interested in climate-adapted design. It allows users to analyze the climate data of more than 27,500 locations worldwide using the data contained in EPW files.
https://clima.cbe.berkeley.edu
MIT License
61 stars 21 forks source link

[Need clarification] #184 Inconsistent filtering behaviour in Outdoor comfort tab (2/2) #195

Closed phuongdoan13 closed 1 year ago

phuongdoan13 commented 1 year ago

What I have done

What I have not done

Clarification requirement [Important]

Regarding the percentage display of the thermal stress distribution chart, I'm not sure which scenario that I need to implement.

Let consider a specific month (say Jan, doesn't really matter).

Initally, there are 10 categories with the counts like this: [10, 10, 10, ..., 10] (in total 100). Then, I do an hour filter, and the counts change like this [3, 0, 1,..., 1] (in total 10).

My question is: WHAT IS THE DENOMINATOR?

Two Scenarios:

  1. Denominator of 10 (as it is implemented below): the stacked bar chart for the month will be 100%, because each category will be 30%, 0%, 10%,..., 10% respectively, adding up to 100%. image
  2. Denominator of 100: the stacked bar for the month will not be a 100%, because each category will be 3%, 0%..., 1% respectively. I need help for this.
FedericoTartarini commented 1 year ago

Please open a separate issue about the tooltips. Do not worry too much about how it will render on small screens since most people are using the application from their laptop or desktop computer not from their phones.

You should divide the number by 10 in the above-mentioned example since you should report the percentage in the selected time range. This will have the same behaviour of the natural ventilation tab. Have a look at the chart at the bottom of the page after you apply a filter. The chart displays for which percentage of the selected time natural ventilation can be used.

phuongdoan13 commented 1 year ago

Hi Federico, if the denominator is 10, that means my code is correct.

FedericoTartarini commented 1 year ago

Great, I will then now merge it.