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

Standard duration units #275

Closed
rantahar opened this issue Feb 12, 2023 · 3 comments
Closed

Standard duration units #275

rantahar opened this issue Feb 12, 2023 · 3 comments
Assignees
Labels
question Further information is requested v1.2

Comments

@rantahar
Copy link
Collaborator

rantahar commented Feb 12, 2023

How should we standardize duration units?

The mHealth total sleep time measure includes a value and a unit. The units can range from picoseconds to years. For total sleep time anything from minute to years could make sense.

Options:

  • Require a unit column and handle it in aggregation functions
  • Require all rows to use the same unit and record it in a column. Aggregations check that the unit is the same.
  • Don't store the unit, assume it's always the same. User handles units.

Maybe I would go with the second. It's relatively simple while still helping the user.

@rantahar
Copy link
Collaborator Author

The mHealth reader should normalize the durations to a single unit for each file read.

@rantahar
Copy link
Collaborator Author

In preprocessing we get duration columns as TimeDelta. These come directly from subtracting DateTime objects. Using them here as well would make sense.

@rantahar rantahar added question Further information is requested v1.2 labels May 24, 2023
@rantahar rantahar self-assigned this May 24, 2023
@rantahar
Copy link
Collaborator Author

Solved in PR #300

@rantahar rantahar closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v1.2
Projects
None yet
Development

No branches or pull requests

1 participant