Skip to main content

Pediatric Growth Chart Analyzer

Project description

GrowthCharts

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: {'Z': -0.23, 'Percentile': 41.0, 'Interpretation': 'Normal'}
print(baby.analyze_lenageinf())  # Example: {'Z': 0.12, 'Percentile': 55.0, 'Interpretation': 'Normal'}
print(baby.analyze_hcageinf())   # Example: {'Z': 0.30, 'Percentile': 62.0, 'Interpretation': 'Normal'}
print(baby.analyze_wtleninf())   # Example: {'Z': -0.15, 'Percentile': 44.0, 'Interpretation': 'Normal'}
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: {'Z': 0.12, 'Percentile': 55.0, 'Interpretation': 'Normal'}
print(child.analyze_lenage())  # Example: {'Z': -0.08, 'Percentile': 47.0, 'Interpretation': 'Normal'}
print(child.analyze_bmiage())  # Example: {'Z': 0.05, 'Percentile': 52.0, 'Interpretation': 'Normal'}
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


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.2.1.tar.gz (125.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

growthcharts-0.2.1-py3-none-any.whl (126.1 kB view details)

Uploaded Python 3

File details

Details for the file growthcharts-0.2.1.tar.gz.

File metadata

  • Download URL: growthcharts-0.2.1.tar.gz
  • Upload date:
  • Size: 125.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for growthcharts-0.2.1.tar.gz
Algorithm Hash digest
SHA256 414276bc123fce93fc64d7d713593c3cee3c3e0810dfb49e1787aa9643e7408c
MD5 44146f43ed44ee6f7107a0c64dd4dc5c
BLAKE2b-256 84347dc7b09c47d6daa3c48dfa9b178428be1ffdc137fdf9ab496d6d376a54c6

See more details on using hashes here.

File details

Details for the file growthcharts-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: growthcharts-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 126.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for growthcharts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6d87893df0a26832ffe5a60cd698bb287ef009d4c0e257e0305adfe944c4b0
MD5 3edc54e87cf8671d30bc01d8df55ced6
BLAKE2b-256 3e5eb37eea4900793755cd643f33c6f13d8d0e8caf81a413d9a03a030c7db6e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page