growthcharts 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,121 @@
1
+ Sex,Length,L,M,S,P3,P5,P10,P25,P50,P75,P90,P95,P97
2
+ 1,45,1.44903689,2.289757735,0.149236691,1.597028518,1.690593749,1.830303285,2.053702326,2.289757735,2.515338948,2.710846705,2.824861387,2.89780918
3
+ 1,45.5,1.31794165,2.38617219,0.144790131,1.702957417,1.792954672,1.928805392,2.149314246,2.38617219,2.615766477,2.817044967,2.935328776,3.011338317
4
+ 1,46.5,1.041730589,2.587097922,0.1365472,1.918742401,2.00306056,2.132607345,2.34835311,2.587097922,2.824925474,3.038262787,3.165635227,3.248240003
5
+ 1,47.5,0.756615683,2.797952593,0.129156077,2.139283471,2.219514291,2.344442385,2.556834051,2.797952593,3.044241159,3.270147404,3.407200737,3.49693518
6
+ 1,48.5,0.472617587,3.017679791,0.122589498,2.364025965,2.441421905,2.563170915,2.773593907,3.017679791,3.272646214,3.511467362,3.65864093,3.755928383
7
+ 1,49.5,0.197455933,3.245225583,0.116802688,2.59243106,2.667982282,2.78776291,2.997514515,3.245225583,3.509103506,3.761071952,3.918675144,4.023835077
8
+ 1,50.5,-0.063272822,3.479567767,0.111734963,2.823966844,2.89846365,3.017289051,3.227549277,3.479567767,3.752613117,4.01788174,4.18611338,4.299368538
9
+ 1,51.5,-0.305663778,3.719739648,0.107316407,3.058104103,3.132186651,3.250908274,3.462735881,3.719739648,4.002224198,4.280884515,4.459845507,4.581326217
10
+ 1,52.5,-0.527210764,3.964838222,0.10347453,3.294322225,3.368517223,3.487856107,3.702195087,3.964838222,4.257039544,4.549132322,4.738836361,4.868585555
11
+ 1,53.5,-0.726356263,4.214033476,0.100139369,3.532109837,3.606859589,3.727435106,3.94512977,4.214033476,4.516224426,4.821741654,5.022119957,5.160094928
12
+ 1,54.5,-0.902380499,4.466562625,0.097246097,3.770975175,3.846657516,3.969008144,4.190815779,4.466562625,4.779002851,5.097890522,5.308799266,5.454877316
13
+ 1,55.5,-1.055126826,4.721730669,0.09473644,4.010448329,4.087392272,4.211993219,4.43859789,4.721730669,5.044659815,5.376817878,5.598043337,5.752026649
14
+ 1,56.5,-1.184933443,4.978903744,0.092558749,4.250088071,4.328584525,4.455860069,4.687882702,4.978903744,5.312536448,5.65782066,5.889087035,6.050711037
15
+ 1,57.5,-1.292531809,5.237504753,0.09066765,4.489485537,4.569794994,4.700127546,4.938133749,5.237504753,5.582026947,5.940251499,6.181229894,6.350173518
16
+ 1,58.5,-1.378973111,5.497008915,0.089023438,4.728267233,4.810625098,4.94436155,5.188867126,5.497008915,5.85257519,6.22351642,6.473835067,6.649732739
17
+ 1,59.5,-1.445563111,5.756939907,0.087591418,4.966096999,5.050717205,5.188173227,5.439647821,5.756939907,6.123671792,6.507072866,6.766328167,6.94878282
18
+ 1,60.5,-1.49380121,6.016866693,0.086341291,5.202677038,5.289754427,5.431217262,5.690086611,6.016866693,6.394851791,6.790428163,7.058196003,7.246792315
19
+ 1,61.5,-1.525332827,6.276400575,0.085246598,5.437748497,5.527460202,5.673190232,5.939837222,6.276400575,6.66569255,7.073138226,7.348985362,7.543302768
20
+ 1,62.5,-1.541839648,6.535195541,0.084284401,5.671089001,5.763595946,5.91382859,6.18859526,6.535195541,6.935815081,7.354807872,7.638300762,7.837923511
21
+ 1,63.5,-1.545098045,6.792942366,0.083434649,5.902515543,5.997962236,6.152907479,6.436093976,6.792942366,7.204878803,7.635088323,7.925804423,8.130333399
22
+ 1,64.5,-1.536863318,7.049370425,0.08268004,6.131880558,6.230395557,6.390238592,6.682104069,7.049370425,7.472584314,7.9136782,8.211213607,8.420274027
23
+ 1,65.5,-1.518786093,7.304248994,0.082005843,6.359068402,6.460765369,6.625668165,6.926433317,7.304248994,7.738675499,8.190324128,8.494298133,8.707543698
24
+ 1,66.5,-1.49249029,7.557381995,0.081399411,6.583997561,6.688974915,6.859075839,7.168922842,7.557381995,8.002934684,8.46481824,8.774880112,8.991998822
25
+ 1,67.5,-1.459487925,7.808610136,0.080850107,6.806616368,6.914957848,7.090372671,7.409447317,7.808610136,8.26518536,8.736998815,9.052831095,9.27354736
26
+ 1,68.5,-1.421167427,8.057810266,0.08034908,7.026901165,7.138676485,7.319499566,7.647913807,8.057810266,8.525291839,9.006749431,9.328070124,9.552145587
27
+ 1,69.5,-1.378835366,8.304892397,0.079888977,7.244856495,7.360121388,7.54642602,7.884259416,8.304892397,8.783156413,9.273996989,9.600562566,9.827797569
28
+ 1,70.5,-1.333634661,8.549802669,0.079463915,7.460510099,7.579307642,7.771148283,8.118452209,8.549802669,9.038722435,9.53871203,9.870316803,10.10054839
29
+ 1,71.5,-1.286605147,8.792519752,0.079069193,7.67391364,7.796274848,7.993688292,8.350488663,8.792519752,9.291970609,9.800906186,10.13738322,10.37048464
30
+ 1,72.5,-1.238665517,9.033054944,0.07870118,7.885140184,8.011085035,8.214092237,8.580393153,9.033054944,9.542918966,10.06063106,10.40185184,10.63773097
31
+ 1,73.5,-1.19066716,9.271448675,0.078357096,8.094284811,8.223822595,8.432429492,8.808215482,9.271448675,9.791619211,10.31797568,10.66385133,10.90245061
32
+ 1,74.5,-1.143316882,9.507773605,0.078035021,8.301459453,8.434590571,8.648791006,9.034032141,9.507773605,10.03815952,10.57306631,10.92354547,11.16483888
33
+ 1,75.5,-1.097263403,9.742129356,0.077733651,8.506795026,8.643511567,8.863288423,9.257942887,9.742129356,10.28265908,10.82606321,11.18113275,11.42512564
34
+ 1,76.5,-1.053083813,9.974642178,0.077452242,8.710439238,8.850725924,9.076052776,9.480070094,9.974642178,10.52526749,11.07715916,11.43684424,11.68357247
35
+ 1,77.5,-1.011294273,10.20546331,0.077190512,8.912555531,9.056390619,9.287233301,9.700557381,10.20546331,10.76616287,11.32657755,11.69094178,11.94047127
36
+ 1,78.5,-0.972360231,10.43476723,0.076948562,9.113322086,9.260678201,9.496996252,9.91956818,10.43476723,11.00554988,11.57457043,11.94371638,12.19614287
37
+ 1,79.5,-0.936705887,10.66274993,0.076726804,9.312930869,9.463775754,9.705523721,10.13728428,10.66274993,11.24365775,11.8214166,12.19548652,12.45093578
38
+ 1,80.5,-0.904722736,10.88962699,0.076525901,9.511586717,9.665883884,9.913012453,10.35390433,10.88962699,11.48073815,12.06741962,12.44659654,12.70522492
39
+ 1,81.5,-0.876777097,11.11563177,0.076346711,9.709506461,9.867215725,10.11967266,10.5696423,11.11563177,11.71706321,12.31290587,12.69741505,12.9594104
40
+ 1,82.5,-0.853216568,11.34101346,0.076190236,9.90691806,10.06799596,10.32572684,10.78472594,11.34101346,11.95292329,12.55822265,12.94833337,13.21391629
41
+ 1,83.5,-0.834375406,11.56603512,0.076057579,10.10405976,10.26845983,10.53140858,10.99939524,11.56603512,12.18862496,12.8037362,13.19976391,13.46918953
42
+ 1,84.5,-0.820578855,11.79097176,0.075949901,10.30117927,10.46885221,10.73696139,11.21390081,11.79097176,12.42448873,13.04982974,13.45213869,13.7256987
43
+ 1,85.5,-0.81214646,12.01610828,0.075868383,10.49853295,10.66942663,10.94263752,11.42850232,12.01610828,12.66084697,13.29690152,13.70590772,13.98393299
44
+ 1,86.5,-0.809394398,12.24173753,0.075814185,10.69638497,10.87044435,11.14869679,11.64346692,12.24173753,12.89804158,13.5453628,13.96153752,14.24440109
45
+ 1,87.5,-0.812636889,12.46815824,0.075788413,10.89500657,11.07217344,11.35540546,11.85906768,12.46815824,13.13642183,13.79563586,14.21950956,14.50763019
46
+ 1,88.5,-0.822186712,12.69567298,0.075792075,11.0946752,11.27488782,11.56303507,12.07558197,12.69567298,13.37634196,14.04815191,14.48031873,14.77416503
47
+ 1,89.5,-0.838354876,12.92458613,0.075826044,11.29567376,11.47886643,11.77186133,12.29328999,12.92458613,13.6181589,14.30334895,14.74447181,15.044567
48
+ 1,90.5,-0.861449493,13.15520182,0.075891019,11.49828978,11.68439228,11.98216306,12.51247319,13.15520182,13.86222981,14.56166964,15.01248591,15.31941326
49
+ 1,91.5,-0.891773904,13.38782185,0.075987476,11.70281463,11.89175157,12.19422113,12.73341284,13.38782185,14.10890963,14.82355899,15.28488689,15.59929608
50
+ 1,92.5,-0.929617736,13.6227442,0.076115636,11.90954225,12.10123261,12.4083174,12.95638887,13.6227442,14.35854899,15.08946216,15.5622076,15.88482163
51
+ 1,93.5,-0.975268944,13.86025986,0.076275395,12.1187693,12.31312548,12.62473383,13.18167788,13.86025986,14.61149059,15.35982164,15.84498667,16.17661055
52
+ 1,94.5,-1.028990493,14.10065234,0.076466299,12.33079298,12.52772045,12.84375146,13.40955269,14.10065234,14.86806787,15.63507513,16.13376622,16.47529604
53
+ 1,95.5,-1.091024455,14.34419522,0.076687482,12.54591071,12.74530738,13.06564953,13.64028082,14.34419522,15.12860179,15.91565257,16.42909034,16.78152407
54
+ 1,96.5,-1.161574946,14.59115139,0.076937631,12.76441819,12.9661743,13.29070461,13.87412402,14.59115139,15.39339911,16.20197359,16.73150285,17.09595206
55
+ 1,97.5,-1.240820737,14.84177007,0.077214912,12.98660961,13.19060724,13.5191898,14.11133652,14.84177007,15.66274835,16.494444,17.04154573,17.41925008
56
+ 1,98.5,-1.328879402,15.0962879,0.077516968,13.21277431,13.41888786,13.75137383,14.3521657,15.0962879,15.93691963,16.79345342,17.35975605,17.75209809
57
+ 1,99.5,-1.425809463,15.35492729,0.077840877,13.44319598,13.65129272,13.98752021,14.59685108,15.35492729,16.21616173,17.09937174,17.68666374,18.09518631
58
+ 1,100.5,-1.531575592,15.61789822,0.078183177,13.67814897,13.88809057,14.22788616,14.8456253,15.61789822,16.50070256,17.41254676,18.02278798,18.44921206
59
+ 1,101.5,-1.646081976,15.88539464,0.078539804,13.91789949,14.12954284,14.47272193,15.09871195,15.88539464,16.79074422,17.73329941,18.36863542,18.81488277
60
+ 1,102.5,-1.769082483,16.15760201,0.078906277,14.16269719,14.37589784,14.722269,15.35632936,16.15760201,17.08646948,18.06192364,18.72469422,19.19290687
61
+ 1,103.5,-1.900221246,16.43469418,0.079277694,14.41277633,14.62739094,14.97675902,15.61868832,16.43469418,17.38803782,18.39868195,19.09143177,19.58399633
62
+ 2,45,0.666839915,2.305396985,0.168969897,1.61302626,1.69530853,1.824644762,2.047707671,2.305396985,2.573066177,2.822211988,2.974943903,3.075559629
63
+ 2,45.5,0.699616404,2.403256702,0.157654766,1.723754478,1.805222631,1.932850514,2.151843669,2.403256702,2.662835955,2.90317596,3.049956403,3.146436315
64
+ 2,46.5,0.747915684,2.606020484,0.139389663,1.946460733,2.026496007,2.151303478,2.363960397,2.606020484,2.853889995,3.081735239,3.220172553,3.310892709
65
+ 2,47.5,0.751754737,2.817114082,0.125837223,2.170805299,2.249554961,2.37216013,2.580564792,2.817114082,3.058703241,3.280280685,3.414702479,3.502712567
66
+ 2,48.5,0.691329975,3.035356101,0.115888948,2.396673878,2.474214132,2.595089193,2.80098615,3.035356101,3.275451769,3.496304856,3.630584823,3.718622563
67
+ 2,49.5,0.559107556,3.259693318,0.108648608,2.623845869,2.700266794,2.819827425,3.024685576,3.259693318,3.502419401,3.72742595,3.865029598,3.955569802
68
+ 2,50.5,0.361549127,3.48922017,0.103402703,2.852008338,2.92747924,3.046162798,3.251250865,3.48922017,3.738025406,3.971395567,4.115400222,4.210681986
69
+ 2,51.5,0.116436203,3.723195489,0.099599651,3.08077988,3.155581427,3.273900839,3.480372197,3.723195489,3.980867931,4.2261236,4.37920066,4.481218409
70
+ 2,52.5,-0.152509094,3.961034945,0.096830356,3.309743456,3.384266533,3.502832371,3.71180166,3.961034945,4.229754129,4.489708217,4.654076004,4.76453627
71
+ 2,53.5,-0.421478627,4.202270022,0.09480477,3.538486235,3.613206007,3.732716377,3.945306087,4.202270022,4.483693775,4.760455514,4.937828528,5.058090815
72
+ 2,54.5,-0.671388289,4.446476028,0.093323068,3.766648425,3.842082114,3.963283111,4.180622529,4.446476028,4.741844038,5.036873117,5.228445091,5.359480791
73
+ 2,55.5,-0.889973526,4.693220151,0.092246459,3.99394852,4.070613878,4.194251416,4.417443974,4.693220151,5.003447846,5.317643817,5.524112903,5.666497508
74
+ 2,56.5,-1.071844454,4.942029343,0.091473166,4.22019582,4.298576091,4.425349217,4.65542253,4.942029343,5.267777008,5.601587401,5.823223715,5.977171656
75
+ 2,57.5,-1.216671445,5.192403337,0.090923715,4.445271101,4.525795306,4.656327074,4.894194501,5.192403337,5.534118638,5.887634175,6.124358847,6.289778737
76
+ 2,58.5,-1.327360462,5.443830096,0.090532906,4.669110719,4.75214371,4.886964606,5.133398784,5.443830096,5.801772695,6.174806785,6.426273604,6.602835746
77
+ 2,59.5,-1.408261687,5.69581328,0.090246768,4.891682562,4.977524782,5.117070202,5.372695342,5.69581328,6.070070759,6.462216757,6.72787876,6.91507564
78
+ 2,60.5,-1.464051065,5.947889759,0.090021128,5.112971092,5.201863101,5.34647836,5.611774363,5.947889759,6.33839139,6.749065162,7.028227249,7.225424353
79
+ 2,61.5,-1.499105627,6.199640267,0.089820688,5.332968047,5.42509726,5.57504651,5.850360248,6.199640267,6.606171625,7.034644746,7.326504329,7.532980555
80
+ 2,62.5,-1.517197913,6.450695818,0.089618171,5.551666409,5.64717487,5.80265208,6.088213081,6.450695818,6.872915135,7.318342,7.622019771,7.836997958
81
+ 2,63.5,-1.521479703,6.700736725,0.089393174,5.769060531,5.868051772,6.029190763,6.325126546,6.700736725,7.138192567,7.59963607,7.914202723,8.136875366
82
+ 2,64.5,-1.514481331,6.949493534,0.089131254,5.985144406,6.08769022,6.254574837,6.560927184,6.949493534,7.401643498,7.878098236,8.202595917,8.432144771
83
+ 2,65.5,-1.498204976,7.196744733,0.088822943,6.199912645,6.306059022,6.478732239,6.795472337,7.196744733,7.662974516,8.15338936,8.486850867,8.722463522
84
+ 2,66.5,-1.474231858,7.442313819,0.088462854,6.413361985,6.523134146,6.701605945,7.028648027,7.442313819,7.921956215,8.425256531,8.766723181,9.00760766
85
+ 2,67.5,-1.443808911,7.686067039,0.088048963,6.625492182,6.738899009,6.923153436,7.260367355,7.686067039,8.17842062,8.693529674,9.04206755,9.287464886
86
+ 2,68.5,-1.407959107,7.92790936,0.087581916,6.836308446,6.953345818,7.143346471,7.49056809,7.92790936,8.432256562,8.958117069,9.312833279,9.562029761
87
+ 2,69.5,-1.367521025,8.167783677,0.087064605,7.045821054,7.166475096,7.362170518,7.719212002,8.167783677,8.683408324,9.219002186,9.579058661,9.831395513
88
+ 2,70.5,-1.32324327,8.405666621,0.086501667,7.254047943,7.378297165,7.579624634,7.946282454,8.405666621,8.931870645,9.47623884,9.840866488,10.09574977
89
+ 2,71.5,-1.275834578,8.641566305,0.085899159,7.461015613,7.588832522,7.795721098,8.171783008,8.641566305,9.177685743,9.729947188,10.09845888,10.35536822
90
+ 2,72.5,-1.226014257,8.875519723,0.085264271,7.666760352,7.798112411,8.010485082,8.395735838,8.875519723,9.420939935,9.980309503,10.3521122,10.61060874
91
+ 2,73.5,-1.174555804,9.107590221,0.084605096,7.871329398,8.006179356,8.223954294,8.61818018,9.107590221,9.661760324,10.22756595,10.60217203,10.86190554
92
+ 2,74.5,-1.122323639,9.337865054,0.083930435,8.07478203,8.213087629,8.436178609,8.839170822,9.337865054,9.900311537,10.47201035,10.84904795,11.10976332
93
+ 2,75.5,-1.070302348,9.566453061,0.083249631,8.277190538,8.418903651,8.647219687,9.05877667,9.566453061,10.13679255,10.7139859,11.09320847,11.35475136
94
+ 2,76.5,-1.019617172,9.793482492,0.082572421,8.478641037,8.623706299,8.857150596,9.277079452,9.793482492,10.37143354,10.95388092,11.33517576,11.59749766
95
+ 2,77.5,-0.971544123,10.01909902,0.081908788,8.679234065,8.82758712,9.066055489,9.494172583,10.01909902,10.60449286,11.19212443,11.57552036,11.83868308
96
+ 2,78.5,-0.927495981,10.24346467,0.081268832,8.879084281,9.03065003,9.274029292,9.710160711,10.24346467,10.83625465,11.42918192,11.81485555,12.07903468
97
+ 2,79.5,-0.889046221,10.46675386,0.080662561,9.078322619,9.233012616,9.481177715,9.925157686,10.46675386,11.06702353,11.66554993,12.05383282,12.3193224
98
+ 2,80.5,-0.857844783,10.6891553,0.080099785,9.277093118,9.434804244,9.68761705,10.13928821,10.6891553,11.29712459,11.90175234,12.29313502,12.56034996
99
+ 2,81.5,-0.835600041,10.91086924,0.079589888,9.475553729,9.636166759,9.893474476,10.35268693,10.91086924,11.52689868,12.13833477,12.53347134,12.80295084
100
+ 2,82.5,-0.824007806,11.13210717,0.079141623,9.673874713,9.837253816,10.0988884,10.56549933,11.13210717,11.75669976,12.37585953,12.77557129,13.04798203
101
+ 2,83.5,-0.824673085,11.35309164,0.078762888,9.872236954,10.03823028,10.30400903,10.77788274,11.35309164,11.98689198,12.61490029,13.02017859,13.29631805
102
+ 2,84.5,-0.839021353,11.57405623,0.078460511,10.07082987,10.2392715,10.50899902,10.9900078,11.57405623,12.21784683,12.85603662,13.26804494,13.54884494
103
+ 2,85.5,-0.868191531,11.79524697,0.078240047,10.26984825,10.44056188,10.71403421,11.20206069,11.79524697,12.44994139,13.0998487,13.51992325,13.80645301
104
+ 2,86.5,-0.912987527,12.0169203,0.078105554,10.46949211,10.64229536,10.9193044,11.41424337,12.0169203,12.68355339,13.346911,13.77656207,14.07003317
105
+ 2,87.5,-0.973732843,12.23934838,0.078059544,10.66996042,10.84467191,11.12501362,11.62677789,12.23934838,12.91906338,13.59778826,14.03869722,14.3404656
106
+ 2,88.5,-1.050238631,12.46281861,0.078102898,10.87145032,11.04789724,11.33138025,11.83990685,12.46281861,13.15685175,13.85303006,14.3070456,14.61861423
107
+ 2,89.5,-1.141750538,12.68763627,0.078234935,11.07415394,11.25218061,11.53863663,12.05389519,12.68763627,13.39729953,14.1131669,14.5822978,14.90531723
108
+ 2,90.5,-1.246935039,12.9141268,0.078453576,11.27825609,11.45773296,11.74702786,12.26903094,12.9141268,13.64078954,14.37870706,14.86511095,15.20137719
109
+ 2,91.5,-1.363881842,13.1426393,0.078755652,11.48393116,11.66476403,11.95681,12.48562589,13.1426393,13.88771008,14.65013514,15.1561012,15.50754879
110
+ 2,92.5,-1.490235591,13.37354263,0.079137144,11.69134669,11.87348344,12.16824818,12.70401141,13.37354263,14.13845236,14.92790917,15.45583919,15.82453284
111
+ 2,93.5,-1.623204367,13.60723197,0.079593737,11.9006578,12.08409573,12.38161332,12.92453941,13.60723197,14.39341959,15.21246325,15.76484189,16.1529576
112
+ 2,94.5,-1.759750536,13.84412275,0.080121122,12.11201227,12.29680209,12.5971797,13.14757603,13.84412275,14.65302443,15.5042068,16.08356951,16.49337198
113
+ 2,95.5,-1.896722704,14.08464853,0.080715361,12.32555163,12.51179974,12.81522219,13.37349756,14.08464853,14.91769089,15.80352641,16.41242128,16.84623319
114
+ 2,96.5,-2.031079769,14.32925018,0.081372938,12.54141939,12.72928607,13.03601505,13.60268237,14.32925018,15.1878468,16.11078394,16.75173457,17.21190355
115
+ 2,97.5,-2.159985258,14.57837334,0.082090922,12.75976132,12.9494582,13.25983009,13.83550775,14.57837334,15.4639243,16.42631821,17.10178143,17.59063809
116
+ 2,98.5,-2.280992946,14.8324557,0.082866693,12.98073439,13.17251854,13.48693728,14.07234276,14.8324557,15.74634796,16.7504403,17.46276845,17.9825849
117
+ 2,99.5,-2.392125361,15.09192012,0.083697706,13.20451042,13.39867734,13.71760521,14.31354493,15.09192012,16.03552754,17.08342993,17.83483458,18.38778042
118
+ 2,100.5,-2.491985117,15.35716167,0.08458092,13.43128538,13.62815947,13.95210374,14.55945515,15.35716167,16.33184172,17.42552542,18.21805007,18.80615497
119
+ 2,101.5,-2.579688446,15.62854849,0.085512655,13.66127661,13.86120318,14.19070443,14.81039951,15.62854849,16.63563645,17.77692011,18.61241094,19.23752318
120
+ 2,102.5,-2.654922113,15.90640903,0.086487929,13.89473275,14.09806774,14.43368432,15.06668553,15.90640903,16.94720609,18.13774777,19.01783635,19.68159413
121
+ 2,103.5,-2.717782155,16.19103966,0.087500575,14.13192569,14.33902847,14.68132531,15.32860703,16.19103966,17.2667985,18.50808075,19.43416015,20.13795636
growthcharts/infant.py ADDED
@@ -0,0 +1,388 @@
1
+ import pandas as pd
2
+ import matplotlib.pyplot as plt
3
+ import math
4
+ from scipy.stats import norm
5
+
6
+ from .patient import Patient
7
+ from pathlib import Path
8
+
9
+
10
+ DATA_PATH = Path(__file__).parent / "data"
11
+
12
+
13
+ class Infant(Patient):
14
+ """
15
+ Represents an infant patient and provides growth chart analysis
16
+ and visualization based on CDC growth standards.
17
+
18
+ This class extends the Patient class and adds functionality for:
19
+ - Weight-for-age
20
+ - Length-for-age
21
+ - Head circumference-for-age
22
+ - Weight-for-length
23
+
24
+ It supports plotting percentile curves and calculating
25
+ Z-scores and percentiles using the LMS method.
26
+ """
27
+
28
+ # infant database
29
+ df_wtageinf = pd.read_csv(DATA_PATH / 'wtageinf.csv', dtype={'Sex': str})
30
+ df_lenageinf = pd.read_csv(DATA_PATH / 'lenageinf.csv', dtype={'Sex': str})
31
+ df_hcageinf = pd.read_csv(DATA_PATH / 'hcageinf.csv', dtype={'Sex': str})
32
+ df_wtleninf = pd.read_csv(DATA_PATH / 'wtleninf.csv', dtype={'Sex': str})
33
+
34
+ def __init__(self, sex: str, age: int, wt: float = None,
35
+ length: float = None, hc: float = None):
36
+ """
37
+ Initialize an Infant object.
38
+
39
+ At least one anthropometric measurement must be provided.
40
+
41
+ Args:
42
+ sex (str):
43
+ Infant sex.
44
+
45
+ age (int):
46
+ Age in months.
47
+
48
+ wt (float, optional):
49
+ Weight in kilograms.
50
+
51
+ length (float, optional):
52
+ Length in centimeters.
53
+
54
+ hc (float, optional):
55
+ Head circumference in centimeters.
56
+
57
+ Raises:
58
+ ValueError:
59
+ If all wt, length, and hc are None.
60
+ """
61
+
62
+ if wt is None and length is None and hc is None:
63
+ raise ValueError("At least wt or length must be provided")
64
+
65
+ super().__init__(sex, age, wt, length)
66
+
67
+ self.hc = hc
68
+
69
+ def plot_wtageinf(self, title=None):
70
+ """
71
+ Plot weight-for-age growth chart.
72
+
73
+ Displays percentile curves and overlays patient's weight.
74
+
75
+ Args:
76
+ title (str, optional):
77
+ Title of the plot.
78
+ """
79
+
80
+ df = self.df_wtageinf
81
+
82
+ self.sex = str(self.sex).lower()
83
+
84
+ if self.sex in ['m', '1']:
85
+ self.sex = '1'
86
+ elif self.sex in ['f', '2']:
87
+ self.sex = '2'
88
+ else:
89
+ raise TypeError('define sex as m or f')
90
+
91
+ data = df[df['Sex'] == self.sex]
92
+
93
+ plt.figure(figsize=(12, 7))
94
+
95
+ for i, col in enumerate(self.agecolumns[1:]):
96
+
97
+ if i in self.highlight_indices:
98
+ plt.plot(
99
+ data['Agemos'], data[col],
100
+ color='gray', linewidth=2,
101
+ label=f'{title} {col}'
102
+ )
103
+ else:
104
+ plt.plot(
105
+ data['Agemos'], data[col],
106
+ color='lightgray', linewidth=1
107
+ )
108
+
109
+ if self.wt is not None:
110
+ plt.scatter(self.age, self.wt, color='red',
111
+ s=100, zorder=5)
112
+
113
+ plt.title(title)
114
+ plt.xlabel("age(month)")
115
+ plt.ylabel("Weight(Kg)")
116
+ plt.grid(True)
117
+ plt.legend()
118
+ plt.show()
119
+
120
+ def plot_lenageinf(self, title=None):
121
+ """
122
+ Plot length-for-age growth chart.
123
+
124
+ Displays percentile curves and overlays patient's length.
125
+
126
+ Args:
127
+ title (str, optional):
128
+ Title of the plot.
129
+ """
130
+
131
+ df = self.df_lenageinf
132
+
133
+ self.sex = str(self.sex).lower()
134
+
135
+ if self.sex in ['m', '1']:
136
+ self.sex = '1'
137
+ elif self.sex in ['f', '2']:
138
+ self.sex = '2'
139
+ else:
140
+ raise TypeError('define sex as m or f')
141
+
142
+ data = df[df['Sex'] == self.sex]
143
+
144
+ plt.figure(figsize=(14, 10))
145
+
146
+ for i, col in enumerate(self.agecolumns[1:]):
147
+
148
+ if i in self.highlight_indices:
149
+ plt.plot(
150
+ data['Agemos'], data[col],
151
+ color='gray', linewidth=2,
152
+ label=f'{title} {col}'
153
+ )
154
+ else:
155
+ plt.plot(
156
+ data['Agemos'], data[col],
157
+ color='lightgray', linewidth=1
158
+ )
159
+
160
+ if self.length is not None:
161
+ plt.scatter(self.age, self.length,
162
+ color='red', s=100, zorder=5)
163
+
164
+ plt.title(title)
165
+ plt.xlabel("age(month)")
166
+ plt.ylabel("Length(cm)")
167
+ plt.grid(True)
168
+ plt.legend()
169
+ plt.show()
170
+
171
+ def plot_hcageinf(self, title=None):
172
+ """
173
+ Plot head circumference-for-age growth chart.
174
+
175
+ Displays percentile curves and overlays patient's head circumference.
176
+
177
+ Args:
178
+ title (str, optional):
179
+ Title of the plot.
180
+ """
181
+
182
+ df = self.df_hcageinf
183
+
184
+ self.sex = str(self.sex).lower()
185
+
186
+ if self.sex in ['m', '1']:
187
+ self.sex = '1'
188
+ elif self.sex in ['f', '2']:
189
+ self.sex = '2'
190
+ else:
191
+ raise TypeError('define sex as m or f')
192
+
193
+ data = df[df['Sex'] == self.sex]
194
+
195
+ plt.figure(figsize=(12, 7))
196
+
197
+ for i, col in enumerate(self.agecolumns[1:]):
198
+
199
+ if i in self.highlight_indices:
200
+ plt.plot(
201
+ data['Agemos'], data[col],
202
+ color='gray', linewidth=2,
203
+ label=f'{title} {col}'
204
+ )
205
+ else:
206
+ plt.plot(
207
+ data['Agemos'], data[col],
208
+ color='lightgray', linewidth=1
209
+ )
210
+
211
+ if self.hc is not None:
212
+ plt.scatter(self.age, self.hc,
213
+ color='red', s=100, zorder=5)
214
+
215
+ plt.title(title)
216
+ plt.xlabel("age(month)")
217
+ plt.ylabel("Head Circumference(cm)")
218
+ plt.grid(True)
219
+ plt.legend()
220
+ plt.show()
221
+
222
+ def analyze_wtageinf(self):
223
+ """
224
+ Analyze weight-for-age using LMS method.
225
+
226
+ Returns:
227
+ dict:
228
+ Z-score and percentile.
229
+ """
230
+
231
+ df = self.df_wtageinf
232
+
233
+ self.sex = str(self.sex).lower()
234
+
235
+ if self.sex in ['m', '1']:
236
+ self.sex = '1'
237
+ elif self.sex in ['f', '2']:
238
+ self.sex = '2'
239
+ else:
240
+ raise TypeError('define sex as m or f')
241
+
242
+ df2 = df[df['Sex'] == self.sex]
243
+
244
+ row = df2.iloc[
245
+ (df2['Agemos'] - self.age).abs().argsort()[:1]
246
+ ]
247
+
248
+ L = float(row['L'].values[0])
249
+ M = float(row['M'].values[0])
250
+ S = float(row['S'].values[0])
251
+
252
+ if L != 0:
253
+ z = ((self.wt / M) ** L - 1) / (L * S)
254
+ else:
255
+ z = math.log(self.wt / M) / S
256
+
257
+ percentile = norm.cdf(z) * 100
258
+
259
+ return {
260
+ "Z": round(z, 2),
261
+ "Percentile": round(percentile, 2)
262
+ }
263
+
264
+ def analyze_lenageinf(self):
265
+ """
266
+ Analyze length-for-age using LMS method.
267
+
268
+ Returns:
269
+ dict:
270
+ Z-score and percentile.
271
+ """
272
+
273
+ df = self.df_lenageinf
274
+
275
+ self.sex = str(self.sex).lower()
276
+
277
+ if self.sex in ['m', '1']:
278
+ self.sex = '1'
279
+ elif self.sex in ['f', '2']:
280
+ self.sex = '2'
281
+ else:
282
+ raise TypeError('define sex as m or f')
283
+
284
+ df2 = df[df['Sex'] == self.sex]
285
+
286
+ row = df2.iloc[
287
+ (df2['Agemos'] - self.age).abs().argsort()[:1]
288
+ ]
289
+
290
+ L = float(row['L'].values[0])
291
+ M = float(row['M'].values[0])
292
+ S = float(row['S'].values[0])
293
+
294
+ if L != 0:
295
+ z = ((self.length / M) ** L - 1) / (L * S)
296
+ else:
297
+ z = math.log(self.length / M) / S
298
+
299
+ percentile = norm.cdf(z) * 100
300
+
301
+ return {
302
+ "Z": round(z, 2),
303
+ "Percentile": round(percentile, 2)
304
+ }
305
+
306
+ def analyze_hcageinf(self):
307
+ """
308
+ Analyze head circumference-for-age using LMS method.
309
+
310
+ Returns:
311
+ dict:
312
+ Z-score and percentile.
313
+ """
314
+
315
+ df = self.df_hcageinf
316
+
317
+ self.sex = str(self.sex).lower()
318
+
319
+ if self.sex in ['m', '1']:
320
+ self.sex = '1'
321
+ elif self.sex in ['f', '2']:
322
+ self.sex = '2'
323
+ else:
324
+ raise TypeError('define sex as m or f')
325
+
326
+ df2 = df[df['Sex'] == self.sex]
327
+
328
+ row = df2.iloc[
329
+ (df2['Agemos'] - self.age).abs().argsort()[:1]
330
+ ]
331
+
332
+ L = float(row['L'].values[0])
333
+ M = float(row['M'].values[0])
334
+ S = float(row['S'].values[0])
335
+
336
+ if L != 0:
337
+ z = ((self.hc / M) ** L - 1) / (L * S)
338
+ else:
339
+ z = math.log(self.hc / M) / S
340
+
341
+ percentile = norm.cdf(z) * 100
342
+
343
+ return {
344
+ "Z": round(z, 2),
345
+ "Percentile": round(percentile, 2)
346
+ }
347
+
348
+ def analyze_wtleninf(self):
349
+ """
350
+ Analyze weight-for-length using LMS method.
351
+
352
+ Returns:
353
+ dict:
354
+ Z-score and percentile.
355
+ """
356
+
357
+ df = self.df_wtleninf
358
+
359
+ self.sex = str(self.sex).lower()
360
+
361
+ if self.sex in ['m', '1']:
362
+ self.sex = '1'
363
+ elif self.sex in ['f', '2']:
364
+ self.sex = '2'
365
+ else:
366
+ raise TypeError('define sex as m or f')
367
+
368
+ df2 = df[df['Sex'] == self.sex]
369
+
370
+ row = df2.iloc[
371
+ (df2['Length'] - self.length).abs().argsort()[:1]
372
+ ]
373
+
374
+ L = float(row['L'].values[0])
375
+ M = float(row['M'].values[0])
376
+ S = float(row['S'].values[0])
377
+
378
+ if L != 0:
379
+ z = ((self.wt / M) ** L - 1) / (L * S)
380
+ else:
381
+ z = math.log(self.wt / M) / S
382
+
383
+ percentile = norm.cdf(z) * 100
384
+
385
+ return {
386
+ "Z": round(z, 2),
387
+ "Percentile": round(percentile, 2)
388
+ }
@@ -0,0 +1,83 @@
1
+ class Patient:
2
+ """
3
+ Represents a pediatric patient for growth chart analysis.
4
+
5
+ This class stores basic patient information such as sex, age,
6
+ weight, and length, and calculates BMI if both weight and length
7
+ are provided.
8
+
9
+ It also defines standard column names and percentile indices
10
+ used for growth chart visualization.
11
+
12
+ Attributes:
13
+ highlight_indices (list[int]):
14
+ Indices of key percentiles for highlighting (P3, P50, P97).
15
+
16
+ agecolumns (list[str]):
17
+ Column names used for age-based growth charts.
18
+
19
+ lencolumns (list[str]):
20
+ Column names used for length-based growth charts.
21
+
22
+ sex (str):
23
+ Patient sex (e.g., 'm', 'f', '1', '2').
24
+
25
+ age (int):
26
+ Age of the patient in months.
27
+
28
+ wt (float | None):
29
+ Weight in kilograms. Optional.
30
+
31
+ length (float | None):
32
+ Length/height in centimeters. Optional.
33
+
34
+ bmi (float, optional):
35
+ Body Mass Index, calculated only if both wt and length
36
+ are provided.
37
+ """
38
+
39
+ highlight_indices = [0, 3, 6] # P3 (0)، P50 (3)، P97 (6)
40
+
41
+ agecolumns = ['Agemos','P3','P10','P25','P50','P75','P90','P97']
42
+
43
+ lencolumns = ['Length','P3','P10','P25','P50','P75','P90','P97']
44
+
45
+ def __init__(self, sex: str, age: int, wt: float = None, length: float = None):
46
+ """
47
+ Initialize a Patient object.
48
+
49
+ At least one of weight (wt) or length must be provided.
50
+ If both are provided, BMI will be calculated automatically.
51
+
52
+ Args:
53
+ sex (str):
54
+ Patient sex.
55
+
56
+ age (int):
57
+ Age in months.
58
+
59
+ wt (float, optional):
60
+ Weight in kilograms.
61
+
62
+ length (float, optional):
63
+ Length/height in centimeters.
64
+
65
+ Raises:
66
+ ValueError:
67
+ If both wt and length are None.
68
+ """
69
+
70
+ # Ensure that at least weight or length is provided
71
+ if wt is None and length is None:
72
+ raise ValueError("At least wt or length must be provided")
73
+
74
+ # Store basic patient information
75
+ self.sex = sex
76
+ self.age = age
77
+ self.wt = wt
78
+ self.length = length
79
+
80
+ # Calculate BMI if both weight and length are available
81
+ if wt is not None and length is not None:
82
+ length_m = self.length / 100 # Convert cm to meters
83
+ self.bmi = self.wt / (length_m * length_m)