Python package for extracting health outcomes and health-risk behaviors data from CDC PLACES API
Project description
places_client
A Python package for accessing county-level data from the CDC PLACES project's API.
It focuses exclusively on measures categorized as Health Outcomes and Health Risk Behaviors, allowing users to access and filter these key public health indicators and explore the relationship between these measures.
Features
- Retrieve county-level places data for a specified release (2020-2025).
- Display key info of supported measures (id, short name, full name, and category).
- Filter data by measures, categories, counties, or states.
- Create wide pivot tables for measures at county or state levels.
- Calculate correlations between measures.
- Get the descriptive statistics of meausures.
Installation
%pip install -i https://test.pypi.org/simple/ places_client
Usage
from places_client.places_client import PlacesClient
import os
from dotenv import load_dotenv
load_dotenv()
client = PlacesClient(os.getenv("CDC_API_TOKEN"))
df = client.get_county_data('2024')
measures = client.get_measure_list()
For detailed usage, view this vignette: vignette.ipynb
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
places_client was created by Yixiao Liu. It is licensed under the terms of the MIT license.
Credits
places_client was created with cookiecutter and the py-pkgs-cookiecutter template.
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
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
File details
Details for the file places_client-0.3.0.tar.gz.
File metadata
- Download URL: places_client-0.3.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f05f968b85aea7ab7ff2ffb8a1b09db9cd6ec88f6e6ef36138e393e08baea38a
|
|
| MD5 |
91d5ba5c7ce66f1750e72be09a6de85b
|
|
| BLAKE2b-256 |
93df27d2a31503e17d9707ff0a2e05462c8bb944487f64b3b87421054ee22417
|
File details
Details for the file places_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: places_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ce4025ccf0d291764f3b3e545ca4265f7267235fbf963993fdb495e76c8c32
|
|
| MD5 |
d66f5ee86418da82bab0efe92bdba80c
|
|
| BLAKE2b-256 |
f2369a9eb282918d8b3ae03c4c9d1acf46dc7ec92275526bf2538d3ee4c84fd5
|