Pediatric Growth Chart Analyzer
Project description
GrowthCharts is a pediatric growth chart analyzer for infants (0–2 years) and children (2–20 years).
It provides Z-score calculation, percentiles, and growth chart visualization based on CDC growth standards.
Installation
Install from PyPI (once uploaded):
pip install growthcharts
Or install locally for development:
pip install -e .
Requirements:
pandas
matplotlib
scipy
Quickstart
Infant example (0–24 months)
from growthcharts import Infant
# Create an Infant object
baby = Infant(sex='m', age=6, wt=7.5, length=65.0, hc=42.0)
# Plot growth charts
baby.plot_wtage(title="Weight-for-Age")
baby.plot_lenageinf(title="Length-for-Age")
baby.plot_hcageinf(title="Head Circumference-for-Age")
baby.plot_wtleninf(title="Weight-for-Length")
# Calculate Z-scores and percentiles
print(baby.analyze_wtageinf()) # Example output: {'Z': -0.23, 'Percentile': 41.0}
print(baby.analyze_lenageinf()) # Example output: {'Z': 0.12, 'Percentile': 55.0}
print(baby.analyze_hcageinf()) # Example output: {'Z': 0.30, 'Percentile': 62.0}
print(baby.analyze_wtleninf()) # Example output: {'Z': -0.15, 'Percentile': 44.0}
Child example (2–20 years)
from growthcharts import Child
# Create a Child object
child = Child(sex='f', age=36, wt=15.5, length=95.0)
# Plot growth charts
child.plot_wtage(title="Weight-for-Age")
child.plot_lenage(title="Height-for-Age")
child.plot_bmiage(title="BMI-for-Age")
# Calculate Z-scores and percentiles
print(child.analyze_wtage()) # Example output: {'Z': 0.12, 'Percentile': 55.0}
print(child.analyze_lenage()) # Example output: {'Z': -0.08, 'Percentile': 47.0}
print(child.analyze_bmiage()) # Example output: {'Z': 0.05, 'Percentile': 52.0}
Classes
Patient
Base class storing sex, age, weight, and length.
Calculates BMI if both weight and length are provided.
Infant(Patient)
Handles infants 0–24 months:
Plotting methods: plot_wtage, plot_lenageinf, plot_hcageinf, plot_wtleninf
Analysis methods: analyze_wtageinf, analyze_lenageinf, analyze_hcageinf, analyze_wtleninf
Child(Patient)
Handles children 2–20 years:
Plotting methods: plot_wtage, plot_lenage, plot_bmiage
Analysis methods: analyze_wtage, analyze_lenage, analyze_bmiage
Data
CSV data files for growth standards are included with the package under the data/ folder.
Infant: wtageinf.csv, lenageinf.csv, hcageinf.csv, wtleninf.csv
Child: wtage.csv, lenage.csv, bmiage.csv
These are loaded automatically by the classes and do not need separate downloading.
## License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
growthcharts-0.1.0.tar.gz
(124.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
growthcharts-0.1.0-py3-none-any.whl
(124.4 kB
view details)
File details
Details for the file growthcharts-0.1.0.tar.gz.
File metadata
- Download URL: growthcharts-0.1.0.tar.gz
- Upload date:
- Size: 124.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c88596e8b842bca67af23f3f3e82e854df57f86e4ac4f20d0a5c3ab528ea0493
|
|
| MD5 |
57501527970eafc9aaa6fa160821b50c
|
|
| BLAKE2b-256 |
98b6cf0d4d33b229d07cdee4be97e634006d673bd615753c6938df1494e7d031
|
File details
Details for the file growthcharts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: growthcharts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 124.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ecd3c3e1830b84cb7727ce967eaa158995e8122e161f8e700d442184ceb1c93
|
|
| MD5 |
9e346c411c73226dc12a2f16f5e6c650
|
|
| BLAKE2b-256 |
f0f857754d6ef190645259009d41702eb7893b67cacc569345a87b2a6c35940c
|