I am collecting the rainfall hourly. If i want to have a daily sum, the sum is not ok.
If i want to sum up 0.28+0.56+0.56 the bar chart displays 0.28.
Does somebody has an idea?

5 commentaires

Max Heiken
Max Heiken le 13 Juil 2021
Sorry for the question, but is this even MATLAB?
And would you mind sharing a snippet of your data?
Rudolf Dudek
Rudolf Dudek le 13 Juil 2021
this is thingsspeak, i attached the data export from my feed
Christopher Stapels
Christopher Stapels le 13 Juil 2021
Modifié(e) : Christopher Stapels le 13 Juil 2021
Would you consider creating a custom visualization where you read the channel data and perform a sum yourself? Ill look into the problem you stated above for the automatic sum setting.
Rudolf Dudek
Rudolf Dudek le 17 Juil 2021
Thanks a lot, i keep you updated
Rudolf Dudek
Rudolf Dudek le 4 Nov 2021
@Christopher Stapels since i changed all seconds in timestamp to be 0, the sum up looks ok.
Before the change the seconds range was from 2 to 20 seconds.

Connectez-vous pour commenter.

 Réponse acceptée

Christopher Stapels
Christopher Stapels le 13 Juil 2021

0 votes

I tried this in one of my channels and it seems to work fine. I wonder if there is something different about your data. Can you share the data used to geenrate those plots? Here is the data I used:
myTimes Var1
____________________ ____
11-Jul-2021 08:38:10 0.28
11-Jul-2021 09:38:10 0.56
11-Jul-2021 10:38:10 0.56
13-Jul-2021 10:38:10 0.28

6 commentaires

Rudolf Dudek
Rudolf Dudek le 14 Juil 2021
thanks for your answer, the data is here: https://de.mathworks.com/matlabcentral/answers/uploaded_files/682953/snipplet-field8.csv
Christopher Stapels
Christopher Stapels le 22 Juil 2021
Modifié(e) : Christopher Stapels le 22 Juil 2021
I'm sorry I am not able to reproduce your example.
I imported your data to my channel and my result does not match yours. I did not use your time zone but I don't see how that would produce the results you saw. Calculations are all done and UTC, the time zone just effects the display labels.
I do see zeros in your data, These may be NaN values before you download them. Would it be possible for you to share your channel ID? If it is a public channel, I can have a look at the data.
For later viewers of this post, that channel that I linked will not keep the data indefinitely, nor will it stay public.
Rudolf Dudek
Rudolf Dudek le 3 Août 2021
Sorry for the delay, here's the public link:
https://thingspeak.com/channels/1306999/charts/8?bgcolor=%23ffffff&color=%231A2C42&days=7&dynamic=true&round=2&sum=daily&type=column
Rudolf Dudek
Rudolf Dudek le 14 Juil 2022
After dealing with a daily total in a chart again, I have now found the "error image" in the totaling. - its the offset parameter which does the trick.
If you set the offset (timezone) in the chart or in the api call, the daily total will be calculated correctly. Unfortunately you can't set this in the standard channel view - so I suspect that this could really be a bug.
Christopher Stapels
Christopher Stapels le 20 Juil 2022
Thanks. Everytime we review precedence issues for parameters (timezone versus average, etc), we come up with edge cases and opposing scenarios. Ill submit it to our tracking system for review however. We appreciate your vigilance on the issue.
Rudolf Dudek
Rudolf Dudek le 20 Juil 2022
Thanks a lot.

Connectez-vous pour commenter.

Plus de réponses (1)

Vinod
Vinod le 13 Juil 2021

0 votes

My suspicion is that the field has a bunch of 'NaN's in them. Can you download the data for the channel from th "Import/Export" tab of the channel and confirm there are no NaN's or blank slots in the data?

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Visualize Data dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by