From 65a6cab5bb8f29708fe0c5f096fe1df488f2fea5 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Sat, 28 Dec 2024 23:16:12 +0000 Subject: [PATCH 1/3] fix truncate uk90 data > 4y --- rcpchgrowth/chart_functions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rcpchgrowth/chart_functions.py b/rcpchgrowth/chart_functions.py index 0ce22f3..5072962 100644 --- a/rcpchgrowth/chart_functions.py +++ b/rcpchgrowth/chart_functions.py @@ -26,6 +26,7 @@ TURNERS, UK_WHO, UK_WHO_REFERENCES, + UK_WHO_CHILD, WHO, WHO_REFERENCES ) @@ -352,8 +353,8 @@ def create_uk_who_chart( except: lms_array_for_measurement = [] - # truncate the who_child data to stop at 4y - if len(lms_array_for_measurement) > 0: + # truncate the who_child data to stop at 4y in the WHO child reference. Must not do this for the UK90 reference + if len(lms_array_for_measurement) > 0 and reference == UK_WHO_CHILD: lms_array_for_measurement = [obj for obj in lms_array_for_measurement if obj["decimal_age"] <= 4.0] for centile_index, centile_sds in enumerate(centile_sds_collection): From c56c4d23246f7c0a23ba3e9d595511702387b836 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Sat, 28 Dec 2024 23:33:35 +0000 Subject: [PATCH 2/3] fix absent female bmi who data --- .../data_tables/who_2007_children.json | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) diff --git a/rcpchgrowth/data_tables/who_2007_children.json b/rcpchgrowth/data_tables/who_2007_children.json index b9b8a66..d8f26a3 100644 --- a/rcpchgrowth/data_tables/who_2007_children.json +++ b/rcpchgrowth/data_tables/who_2007_children.json @@ -3769,841 +3769,1009 @@ ], "female":[ { + "decimal_age": 5.08, "L": -0.8886, "M": 15.2441, "S": 0.09692 }, { + "decimal_age": 5.17, "L": -0.9068, "M": 15.2434, "S": 0.09738 }, { + "decimal_age": 5.25, "L": -0.9248, "M": 15.2433, "S": 0.09783 }, { + "decimal_age": 5.33, "L": -0.9427, "M": 15.2438, "S": 0.09829 }, { + "decimal_age": 5.42, "L": -0.9605, "M": 15.2448, "S": 0.09875 }, { + "decimal_age": 5.5, "L": -0.978, "M": 15.2464, "S": 0.0992 }, { + "decimal_age": 5.58, "L": -0.9954, "M": 15.2487, "S": 0.09966 }, { + "decimal_age": 5.67, "L": -1.0126, "M": 15.2516, "S": 0.10012 }, { + "decimal_age": 5.75, "L": -1.0296, "M": 15.2551, "S": 0.10058 }, { + "decimal_age": 5.83, "L": -1.0464, "M": 15.2592, "S": 0.10104 }, { + "decimal_age": 5.92, "L": -1.063, "M": 15.2641, "S": 0.10149 }, { + "decimal_age": 6, "L": -1.0794, "M": 15.2697, "S": 0.10195 }, { + "decimal_age": 6.08, "L": -1.0956, "M": 15.276, "S": 0.10241 }, { + "decimal_age": 6.17, "L": -1.1115, "M": 15.2831, "S": 0.10287 }, { + "decimal_age": 6.25, "L": -1.1272, "M": 15.2911, "S": 0.10333 }, { + "decimal_age": 6.33, "L": -1.1427, "M": 15.2998, "S": 0.10379 }, { + "decimal_age": 6.42, "L": -1.1579, "M": 15.3095, "S": 0.10425 }, { + "decimal_age": 6.5, "L": -1.1728, "M": 15.32, "S": 0.10471 }, { + "decimal_age": 6.58, "L": -1.1875, "M": 15.3314, "S": 0.10517 }, { + "decimal_age": 6.67, "L": -1.2019, "M": 15.3439, "S": 0.10562 }, { + "decimal_age": 6.75, "L": -1.216, "M": 15.3572, "S": 0.10608 }, { + "decimal_age": 6.83, "L": -1.2298, "M": 15.3717, "S": 0.10654 }, { + "decimal_age": 6.92, "L": -1.2433, "M": 15.3871, "S": 0.107 }, { + "decimal_age": 7, "L": -1.2565, "M": 15.4036, "S": 0.10746 }, { + "decimal_age": 7.08, "L": -1.2693, "M": 15.4211, "S": 0.10792 }, { + "decimal_age": 7.17, "L": -1.2819, "M": 15.4397, "S": 0.10837 }, { + "decimal_age": 7.25, "L": -1.2941, "M": 15.4593, "S": 0.10883 }, { + "decimal_age": 7.33, "L": -1.306, "M": 15.4798, "S": 0.10929 }, { + "decimal_age": 7.42, "L": -1.3175, "M": 15.5014, "S": 0.10974 }, { + "decimal_age": 7.5, "L": -1.3287, "M": 15.524, "S": 0.1102 }, { + "decimal_age": 7.58, "L": -1.3395, "M": 15.5476, "S": 0.11065 }, { + "decimal_age": 7.67, "L": -1.3499, "M": 15.5723, "S": 0.1111 }, { + "decimal_age": 7.75, "L": -1.36, "M": 15.5979, "S": 0.11156 }, { + "decimal_age": 7.83, "L": -1.3697, "M": 15.6246, "S": 0.11201 }, { + "decimal_age": 7.92, "L": -1.379, "M": 15.6523, "S": 0.11246 }, { + "decimal_age": 8, "L": -1.388, "M": 15.681, "S": 0.11291 }, { + "decimal_age": 8.08, "L": -1.3966, "M": 15.7107, "S": 0.11335 }, { + "decimal_age": 8.17, "L": -1.4047, "M": 15.7415, "S": 0.1138 }, { + "decimal_age": 8.25, "L": -1.4125, "M": 15.7732, "S": 0.11424 }, { + "decimal_age": 8.33, "L": -1.4199, "M": 15.8058, "S": 0.11469 }, { + "decimal_age": 8.42, "L": -1.427, "M": 15.8394, "S": 0.11513 }, { + "decimal_age": 8.5, "L": -1.4336, "M": 15.8738, "S": 0.11557 }, { + "decimal_age": 8.58, "L": -1.4398, "M": 15.909, "S": 0.11601 }, { + "decimal_age": 8.67, "L": -1.4456, "M": 15.9451, "S": 0.11644 }, { + "decimal_age": 8.75, "L": -1.4511, "M": 15.9818, "S": 0.11688 }, { + "decimal_age": 8.83, "L": -1.4561, "M": 16.0194, "S": 0.11731 }, { + "decimal_age": 8.92, "L": -1.4607, "M": 16.0575, "S": 0.11774 }, { + "decimal_age": 9, "L": -1.465, "M": 16.0964, "S": 0.11816 }, { + "decimal_age": 9.08, "L": -1.4688, "M": 16.1358, "S": 0.11859 }, { + "decimal_age": 9.17, "L": -1.4723, "M": 16.1759, "S": 0.11901 }, { + "decimal_age": 9.25, "L": -1.4753, "M": 16.2166, "S": 0.11943 }, { + "decimal_age": 9.33, "L": -1.478, "M": 16.258, "S": 0.11985 }, { + "decimal_age": 9.42, "L": -1.4803, "M": 16.2999, "S": 0.12026 }, { + "decimal_age": 9.5, "L": -1.4823, "M": 16.3425, "S": 0.12067 }, { + "decimal_age": 9.58, "L": -1.4838, "M": 16.3858, "S": 0.12108 }, { + "decimal_age": 9.67, "L": -1.485, "M": 16.4298, "S": 0.12148 }, { + "decimal_age": 9.75, "L": -1.4859, "M": 16.4746, "S": 0.12188 }, { + "decimal_age": 9.83, "L": -1.4864, "M": 16.52, "S": 0.12228 }, { + "decimal_age": 9.92, "L": -1.4866, "M": 16.5663, "S": 0.12268 }, { + "decimal_age": 10, "L": -1.4864, "M": 16.6133, "S": 0.12307 }, { + "decimal_age": 10.08, "L": -1.4859, "M": 16.6612, "S": 0.12346 }, { + "decimal_age": 10.17, "L": -1.4851, "M": 16.71, "S": 0.12384 }, { + "decimal_age": 10.25, "L": -1.4839, "M": 16.7595, "S": 0.12422 }, { + "decimal_age": 10.33, "L": -1.4825, "M": 16.81, "S": 0.1246 }, { + "decimal_age": 10.42, "L": -1.4807, "M": 16.8614, "S": 0.12497 }, { + "decimal_age": 10.5, "L": -1.4787, "M": 16.9136, "S": 0.12534 }, { + "decimal_age": 10.58, "L": -1.4763, "M": 16.9667, "S": 0.12571 }, { + "decimal_age": 10.67, "L": -1.4737, "M": 17.0208, "S": 0.12607 }, { + "decimal_age": 10.75, "L": -1.4708, "M": 17.0757, "S": 0.12643 }, { + "decimal_age": 10.83, "L": -1.4677, "M": 17.1316, "S": 0.12678 }, { + "decimal_age": 10.92, "L": -1.4642, "M": 17.1883, "S": 0.12713 }, { + "decimal_age": 11, "L": -1.4606, "M": 17.2459, "S": 0.12748 }, { + "decimal_age": 11.08, "L": -1.4567, "M": 17.3044, "S": 0.12782 }, { + "decimal_age": 11.17, "L": -1.4526, "M": 17.3637, "S": 0.12816 }, { + "decimal_age": 11.25, "L": -1.4482, "M": 17.4238, "S": 0.12849 }, { + "decimal_age": 11.33, "L": -1.4436, "M": 17.4847, "S": 0.12882 }, { + "decimal_age": 11.42, "L": -1.4389, "M": 17.5464, "S": 0.12914 }, { + "decimal_age": 11.5, "L": -1.4339, "M": 17.6088, "S": 0.12946 }, { + "decimal_age": 11.58, "L": -1.4288, "M": 17.6719, "S": 0.12978 }, { + "decimal_age": 11.67, "L": -1.4235, "M": 17.7357, "S": 0.13009 }, { + "decimal_age": 11.75, "L": -1.418, "M": 17.8001, "S": 0.1304 }, { + "decimal_age": 11.83, "L": -1.4123, "M": 17.8651, "S": 0.1307 }, { + "decimal_age": 11.92, "L": -1.4065, "M": 17.9306, "S": 0.13099 }, { + "decimal_age": 12, "L": -1.4006, "M": 17.9966, "S": 0.13129 }, { + "decimal_age": 12.08, "L": -1.3945, "M": 18.063, "S": 0.13158 }, { + "decimal_age": 12.17, "L": -1.3883, "M": 18.1297, "S": 0.13186 }, { + "decimal_age": 12.25, "L": -1.3819, "M": 18.1967, "S": 0.13214 }, { + "decimal_age": 12.33, "L": -1.3755, "M": 18.2639, "S": 0.13241 }, { + "decimal_age": 12.42, "L": -1.3689, "M": 18.3312, "S": 0.13268 }, { + "decimal_age": 12.5, "L": -1.3621, "M": 18.3986, "S": 0.13295 }, { + "decimal_age": 12.58, "L": -1.3553, "M": 18.466, "S": 0.13321 }, { + "decimal_age": 12.67, "L": -1.3483, "M": 18.5333, "S": 0.13347 }, { + "decimal_age": 12.75, "L": -1.3413, "M": 18.6006, "S": 0.13372 }, { + "decimal_age": 12.83, "L": -1.3341, "M": 18.6677, "S": 0.13397 }, { + "decimal_age": 12.92, "L": -1.3269, "M": 18.7346, "S": 0.13421 }, { + "decimal_age": 13, "L": -1.3195, "M": 18.8012, "S": 0.13445 }, { + "decimal_age": 13.08, "L": -1.3121, "M": 18.8675, "S": 0.13469 }, { + "decimal_age": 13.17, "L": -1.3046, "M": 18.9335, "S": 0.13492 }, { + "decimal_age": 13.25, "L": -1.297, "M": 18.9991, "S": 0.13514 }, { + "decimal_age": 13.33, "L": -1.2894, "M": 19.0642, "S": 0.13537 }, { + "decimal_age": 13.42, "L": -1.2816, "M": 19.1289, "S": 0.13559 }, { + "decimal_age": 13.5, "L": -1.2739, "M": 19.1931, "S": 0.1358 }, { + "decimal_age": 13.58, "L": -1.2661, "M": 19.2567, "S": 0.13601 }, { + "decimal_age": 13.67, "L": -1.2583, "M": 19.3197, "S": 0.13622 }, { + "decimal_age": 13.75, "L": -1.2504, "M": 19.382, "S": 0.13642 }, { + "decimal_age": 13.83, "L": -1.2425, "M": 19.4437, "S": 0.13662 }, { + "decimal_age": 13.92, "L": -1.2345, "M": 19.5045, "S": 0.13681 }, { + "decimal_age": 14, "L": -1.2266, "M": 19.5647, "S": 0.137 }, { + "decimal_age": 14.08, "L": -1.2186, "M": 19.624, "S": 0.13719 }, { + "decimal_age": 14.17, "L": -1.2107, "M": 19.6824, "S": 0.13738 }, { + "decimal_age": 14.25, "L": -1.2027, "M": 19.74, "S": 0.13756 }, { + "decimal_age": 14.33, "L": -1.1947, "M": 19.7966, "S": 0.13774 }, { + "decimal_age": 14.42, "L": -1.1867, "M": 19.8523, "S": 0.13791 }, { + "decimal_age": 14.5, "L": -1.1788, "M": 19.907, "S": 0.13808 }, { + "decimal_age": 14.58, "L": -1.1708, "M": 19.9607, "S": 0.13825 }, { + "decimal_age": 14.67, "L": -1.1629, "M": 20.0133, "S": 0.13841 }, { + "decimal_age": 14.75, "L": -1.1549, "M": 20.0648, "S": 0.13858 }, { + "decimal_age": 14.83, "L": -1.147, "M": 20.1152, "S": 0.13873 }, { + "decimal_age": 14.92, "L": -1.139, "M": 20.1644, "S": 0.13889 }, { + "decimal_age": 15, "L": -1.1311, "M": 20.2125, "S": 0.13904 }, { + "decimal_age": 15.08, "L": -1.1232, "M": 20.2595, "S": 0.1392 }, { + "decimal_age": 15.17, "L": -1.1153, "M": 20.3053, "S": 0.13934 }, { + "decimal_age": 15.25, "L": -1.1074, "M": 20.3499, "S": 0.13949 }, { + "decimal_age": 15.33, "L": -1.0996, "M": 20.3934, "S": 0.13963 }, { + "decimal_age": 15.42, "L": -1.0917, "M": 20.4357, "S": 0.13977 }, { + "decimal_age": 15.5, "L": -1.0838, "M": 20.4769, "S": 0.13991 }, { + "decimal_age": 15.58, "L": -1.076, "M": 20.517, "S": 0.14005 }, { + "decimal_age": 15.67, "L": -1.0681, "M": 20.556, "S": 0.14018 }, { + "decimal_age": 15.75, "L": -1.0603, "M": 20.5938, "S": 0.14031 }, { + "decimal_age": 15.83, "L": -1.0525, "M": 20.6306, "S": 0.14044 }, { + "decimal_age": 15.92, "L": -1.0447, "M": 20.6663, "S": 0.14057 }, { + "decimal_age": 16, "L": -1.0368, "M": 20.7008, "S": 0.1407 }, { + "decimal_age": 16.08, "L": -1.029, "M": 20.7344, "S": 0.14082 }, { + "decimal_age": 16.17, "L": -1.0212, "M": 20.7668, "S": 0.14094 }, { + "decimal_age": 16.25, "L": -1.0134, "M": 20.7982, "S": 0.14106 }, { + "decimal_age": 16.33, "L": -1.0055, "M": 20.8286, "S": 0.14118 }, { + "decimal_age": 16.42, "L": -0.9977, "M": 20.858, "S": 0.1413 }, { + "decimal_age": 16.5, "L": -0.9898, "M": 20.8863, "S": 0.14142 }, { + "decimal_age": 16.58, "L": -0.9819, "M": 20.9137, "S": 0.14153 }, { + "decimal_age": 16.67, "L": -0.974, "M": 20.9401, "S": 0.14164 }, { + "decimal_age": 16.75, "L": -0.9661, "M": 20.9656, "S": 0.14176 }, { + "decimal_age": 16.83, "L": -0.9582, "M": 20.9901, "S": 0.14187 }, { + "decimal_age": 16.92, "L": -0.9503, "M": 21.0138, "S": 0.14198 }, { + "decimal_age": 17, "L": -0.9423, "M": 21.0367, "S": 0.14208 }, { + "decimal_age": 17.08, "L": -0.9344, "M": 21.0587, "S": 0.14219 }, { + "decimal_age": 17.17, "L": -0.9264, "M": 21.0801, "S": 0.1423 }, { + "decimal_age": 17.25, "L": -0.9184, "M": 21.1007, "S": 0.1424 }, { + "decimal_age": 17.33, "L": -0.9104, "M": 21.1206, "S": 0.1425 }, { + "decimal_age": 17.42, "L": -0.9024, "M": 21.1399, "S": 0.14261 }, { + "decimal_age": 17.5, "L": -0.8944, "M": 21.1586, "S": 0.14271 }, { + "decimal_age": 17.58, "L": -0.8863, "M": 21.1768, "S": 0.14281 }, { + "decimal_age": 17.67, "L": -0.8783, "M": 21.1944, "S": 0.14291 }, { + "decimal_age": 17.75, "L": -0.8703, "M": 21.2116, "S": 0.14301 }, { + "decimal_age": 17.83, "L": -0.8623, "M": 21.2282, "S": 0.14311 }, { + "decimal_age": 17.92, "L": -0.8542, "M": 21.2444, "S": 0.1432 }, { + "decimal_age": 18, "L": -0.8462, "M": 21.2603, "S": 0.1433 }, { + "decimal_age": 18.08, "L": -0.8382, "M": 21.2757, "S": 0.1434 }, { + "decimal_age": 18.17, "L": -0.8301, "M": 21.2908, "S": 0.14349 }, { + "decimal_age": 18.25, "L": -0.8221, "M": 21.3055, "S": 0.14359 }, { + "decimal_age": 18.33, "L": -0.814, "M": 21.32, "S": 0.14368 }, { + "decimal_age": 18.42, "L": -0.806, "M": 21.3341, "S": 0.14377 }, { + "decimal_age": 18.5, "L": -0.798, "M": 21.348, "S": 0.14386 }, { + "decimal_age": 18.58, "L": -0.7899, "M": 21.3617, "S": 0.14396 }, { + "decimal_age": 18.67, "L": -0.7819, "M": 21.3752, "S": 0.14405 }, { + "decimal_age": 18.75, "L": -0.7738, "M": 21.3884, "S": 0.14414 }, { + "decimal_age": 18.83, "L": -0.7658, "M": 21.4014, "S": 0.14423 }, { + "decimal_age": 18.92, "L": -0.7577, "M": 21.4143, "S": 0.14432 }, { + "decimal_age": 19, "L": -0.7496, "M": 21.4269, "S": 0.14441 From d7f6e38e15fc14edd6b740d0bbbef53447b53276 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Sat, 28 Dec 2024 23:38:31 +0000 Subject: [PATCH 3/3] bump patch --- .bumpversion.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c918603..189f7ef 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.3.1 +current_version = 4.3.2 tag = False commit = True diff --git a/setup.py b/setup.py index b85ee1e..b823b85 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="rcpchgrowth", - version="4.3.1", + version="4.3.2", description="SDS and Centile calculations for UK Growth Data", long_description=long_description, url="https://github.com/rcpch/digital-growth-charts/blob/master/README.md",