Metadata-Version: 2.4
Name: pandas_nhanes
Version: 0.1.1
Summary: Tools for accessing and processing NHANES data with pandas
Author-email: Your Name <your@email.com>
License: MIT License
        
        Copyright (c) 2025 Your Name
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: tqdm
Dynamic: license-file

# pandas_nhanes

A Python package for accessing and processing NHANES (National Health and Nutrition Examination Survey) data using pandas.

- Clean API for variable selection and data download
- Easily merge and analyze NHANES cycles
- Well-documented and pip-installable

## Installation

Install from PyPI:

```bash
pip install pandas_nhanes
```

Or install from source:

```bash
git clone https://github.com/jeromevde/pandas_nhanes.git
cd pandas_nhanes
pip install .
```

## Example Usage

```python
from pandas_nhanes import (
    list_cycles,
    list_cycle_variables,
    get_variable_description,
    get_variable_data,
    download_full_cycle_dataframe,
)

# List all available NHANES cycles
print(list_cycles())

# List all variables for a given cycle
vars_df = list_cycle_variables("2021-2023")
print(vars_df.head())

# Get the description for a specific variable
print(get_variable_description("LBXTST"))

# Get data for specific variables from a cycle
variables = ["LBXTST", "DR1TCAFF"]
df = get_variable_data(variables, "2021-2023")[project]
name = "pandas_nhanes"
version = "0.1.1"
...
print(df.head())

# Download and merge all datasets for a cycle
full_df = download_full_cycle_dataframe("2021-2023", replace_names_with_descriptions=True)
print(full_df.head())
```


## Further improvement
- caching
- variable exploration
- website explorer & deploy to github pages that can be opened through explore()
