Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daily averages use UTC day boundaries #2

Open
jonathancallahan opened this issue Jun 8, 2023 · 3 comments
Open

daily averages use UTC day boundaries #2

jonathancallahan opened this issue Jun 8, 2023 · 3 comments

Comments

@jonathancallahan
Copy link

jonathancallahan commented Jun 8, 2023

Asking for a friend ...

We are working with data provided by someone else who used sensorToolkit to aggregate their sub-hourly air quality data into daily averages. The shared with us the daily average .csv files they say were created by sensorToolkit. These .csv files look like this:

2021-08-20T00:00:00+00:00,,,,,,
2021-08-21T00:00:00+00:00,20.853773662022178,Degrees (Centigrade),61.128749938238236,Percent (Relative Humidity),33.94285714285714,Micrograms per Cubic Meter
2021-08-22T00:00:00+00:00,20.87606973087087,Degrees (Centigrade),62.22907382740694,Percent (Relative Humidity),15.859294117647059,Micrograms per Cubic Meter
2021-08-23T00:00:00+00:00,22.036475363231848,Degrees (Centigrade),58.012639749617804,Percent (Relative Humidity),15.41559523809524,Micrograms per Cubic Meter

The day boundary datestamp specifies midnight UTC but the data are from California.

One of three things is happening:

  1. daily averages were calculated in the UTC timezone and the timestamps are correct
  2. averages were calculated in the “America/Los_Angeles” timezone and the timestamps are incorrect
  3. averages were calculated using “Local Standard Time” (PST all year-round) and the timestamps are given as UTC because no LST timezone exists.

I reviewed the documentation at https://sensortoolkit.readthedocs.io/en/latest/index.html but was unable to find anything describing the timestamps used for daily averages.

It would be nice if sensorToolkit allowed for averaging according to either "clock" time or "LST" and included the correct timezone name or UTC offset in the generated daily-average .csv files.

@menaka-kumar
Copy link
Collaborator

Hi Jonathan,

Thanks for your question. Sensortoolkit converts time to UTC timezone and displays this in graphs as well. In a new update I will update the documentation to clear up this issue. Thanks for your suggestion to allow the user to choose UTC or LST and I will try to work on this improvement.

@jonathancallahan
Copy link
Author

Thanks for responding. From your answer, I understand that daily averages are calculated using hours 0-23 in UTC. So these daily averages will not correspond to local-time daily averages. Is that correct?

@menaka-kumar
Copy link
Collaborator

Yes, daily averages are calculated using hours 0-23 in UTC. So, if I understand what you are asking, the daily averages calculated are also in UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants