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

WHO weight percentiles data not properly plotted in weight graph #722

Closed
P9k opened this issue Oct 15, 2023 · 7 comments
Closed

WHO weight percentiles data not properly plotted in weight graph #722

P9k opened this issue Oct 15, 2023 · 7 comments

Comments

@P9k
Copy link

P9k commented Oct 15, 2023

I love the new feature of plotting the WHO weight percentiles together with the measured baby weights! :-)

Unfortunately, the percentile curves do not properly plot for me in the weight graph, but all show the value "0".

The curves and their data are there in principle (I can see this when hovering over a curve), but are all plotted on top of each other along the x-axis.

2023-10-15-WHO-Weight-1

2023-10-15-WHO-Weight-2

In case that's relevant: I am on Babybuddy version 2.1.2 and use Firefox to browse the Babybuddy website.

@cdubz
Copy link
Member

cdubz commented Oct 16, 2023

Huh, weird. The data also seems to be missing entirely from the demo instance... was this working for you in any prior version?

@cdubz cdubz added the bug Reports of unexpected problems or errors label Oct 16, 2023
@P9k
Copy link
Author

P9k commented Oct 16, 2023

I did not test it in any previous version

I got aware of this feature after upgrading to 2.1.2 and checking the changelogs.

@cdubz
Copy link
Member

cdubz commented Oct 16, 2023

Hm, ok. It seems the migration is running but the WHO data is not being inserted for some reason... on a fresh install it doesn't seem to happen but it has happened to you and happened in the demo instance. What version were you on prior to updating to 2.1.2?

I'm not sure what is causing this yet but this should workaround the issue by re-running the migration and hopefully actually inserting the data (it worked in the demo, anyway). Run these commands from within the app environment:

python manage.py migrate core 0029_alter_pumping_options_remove_pumping_time_and_more
python manage.py migrate

@barakplasma any ideas what might be happening here? 🕵️

@barakplasma
Copy link
Contributor

Check the y axis, his data looks like the y value is six thousand grams for example, rather than six kg. I think it's a scaling issue for his particular data

@P9k
Copy link
Author

P9k commented Oct 16, 2023

Check the y axis, his data looks like the y value is six thousand grams for example, rather than six kg. I think it's a scaling issue for his particular data

That's probably it! I am entering the weight in units of gram as this is what our scale shows. I just checked and noticed that in the documentation the weight appears to be entered in kilograms (https://docs.baby-buddy.net/user-guide/adding-entries/#weight).

Considering this, the easiest fix for me is probably to convert all my entries to kg, right?

@barakplasma
Copy link
Contributor

barakplasma commented Oct 17, 2023

Yeah, babies are weighed in kg rather than grams in most places. Converting your data to kg with an sql query would be easiest. It's a known issue intentional decision though that baby buddy is unit less, what you did is fine for most of the system, just not this graph

@cdubz
Copy link
Member

cdubz commented Oct 17, 2023

Not really a known issue but an intentional decision 😉 I am leaning more towards using define units though. See also #689 —little more complex as it deals with food but illustrates there is indeed a lot of support for units generally.

@cdubz cdubz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2023
@cdubz cdubz removed the bug Reports of unexpected problems or errors label Oct 17, 2023
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

3 participants