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

integers vs decimals and units #60

Open
diatomsRcool opened this issue Jan 22, 2025 · 4 comments
Open

integers vs decimals and units #60

diatomsRcool opened this issue Jan 22, 2025 · 4 comments

Comments

@diatomsRcool
Copy link
Contributor

In the Observation element do we need to worry about integers vs decimals? We might need integers for things like scores that are always a whole number. Do we want to force a "0.0" here? Does it matter? Should the attribute be value_number instead?
What about units? Some variables, like ratios and percentages don't have units. Do we need a separate attribute for numbers that don't have units? How do we require units where we need to and not where we don't?

@bfurner
Copy link
Collaborator

bfurner commented Jan 22, 2025

It is a good point. I suggest that we add a value_integer attribute to the Quantity class to handle cases where the value is an integer as placing integers into a decimal with a .0 at the end implies a level of precision that isn't necessarily there.

Percentages will have UCUM units (i.e. %). I wonder how many ratios may already be represented in UCUM. Now, for cases where there are no units supplied by the source and we're not sure, there may need to be flavors of null added to the enum for units (e.g. 'Unknown', 'Not applicable')

@diatomsRcool
Copy link
Contributor Author

I would say go ahead and add value_integer. Also, missing units can possibly be handled the same way N3C handled them via their "data rescue" methods.

@bfurner
Copy link
Collaborator

bfurner commented Jan 23, 2025

will do, thanks

@bfurner
Copy link
Collaborator

bfurner commented Jan 23, 2025

OK, I merged PR #66 to address this. Feel free to close if you feel this is resolved.

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