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

Change maxPplDensity, minPplDensity and pplDensity datatype #58

Open
bigludo7 opened this issue Nov 19, 2024 · 2 comments
Open

Change maxPplDensity, minPplDensity and pplDensity datatype #58

bigludo7 opened this issue Nov 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@bigludo7
Copy link
Collaborator

Problem description
In current API specification we specified that maxPplDensity, minPplDensity or pplDensity are defined as number with format Double.

It means that result could look like:

          "populationDensityData": {
            "dataType": "DENSITY_ESTIMATION",
            "maxPplDensity": 1717.986420914645,
            "minPplDensity": 447.54571167219166,
            "pplDensity": 1717.986420914645
          }

This is a bit odd to project to have 1717.986420914645 people. 1718 is probably better.
Should we change this 3 attributes 'format' to integer?

Possible evolution

Alternative solution

Additional context

@bigludo7 bigludo7 added the enhancement New feature or request label Nov 19, 2024
@sachinvodafone
Copy link
Collaborator

Thanks @bigludo7 for bringing this up. I also aligned with you , for most users, understanding 'people per square kilometer' does not require precision beyond whole numbers, as fractional people are not meaningful in our API context .So yes, better to have integer in this case.

@gregory1g
Copy link
Collaborator

Technically, "double" does not enforce anyone to return exact math result like "1717.986420914645" in the API.
One still can return "1717" or even "1700" if the accuracy is +/- 50ppl/km2 (rounding must also match accuracy).
But, yes, integer would be a better type here.

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

No branches or pull requests

3 participants