Child height and weight HAZ summaries for multiple countries
Data from three different research studies. Each study had different research objectives.
health
child
Author
DS 150
Published
November 5, 2023
Data details
There are 2,851 rows and 12 columns. The data source1 is used to create our data that is stored in our pins table. You can access this pin from a connection to posit.byui.edu using hathawayj/childhealth_summary.
Variable description
subjid: unique identifier of each child
sex: Male or Female
country: Label for the varied countries
haz_mean: The average HAZ score over all measurements
waz_mean: The average WAZ score over all measurements
observations: Number of observations for that subject
agedays_last: The age in days for the HAZ and WAZ last variable
agedays_first: The age in days for the HAZ and WAZ first variable
haz_last: The first HAZ measurement on the subject for age in days
haz_first: The last HAZ measurement on the subject for age in days
waz_last: The last WAZ measurement on the subject for age in days
waz_first: The first WAZ measurement on the subject for age in days
Use this custom function in Python to have the data in a Pandas DataFrame.
import pandas as pdimport requestsfrom io import BytesIOdef read_url_pin(name): url ="https://posit.byui.edu/data/"+ name +"/"+ name +".parquet" response = requests.get(url)if response.status_code ==200: parquet_content = BytesIO(response.content) pandas_dataframe = pd.read_parquet(parquet_content)return pandas_dataframeelse:print(f"Failed to retrieve data. Status code: {response.status_code}")returnNone# Example usage:pandas_df = read_url_pin("childhealth_summary")
Authenticated Connection:
Our connect server is https://posit.byui.edu which you assign to your CONNECT_SERVER environment variable. You must create an API key and store it in your environment under CONNECT_API_KEY.