A library of API wrappers for US Federal Government datasets.
Project description
fedwrap
A Python package providing convenient wrappers for accessing and working with US federal datasets, including the American Community Survey and CDC PLACES.
Table of Contents
Overview
fedwrap simplifies access to federal datasets by providing Pythonic wrappers for public APIs and data downloads. The package is designed for researchers, analysts, and developers who need streamlined access to high-value US government data.
Features
- Easy access to the American Community Survey (ACS) and the CDC PLACES dataset
- Data returned as pandas DataFrames for easy analysis
Installation
pip install fedwrap
Quick Start
from fedwrap import get_acs_data, get_places_data, get_brfss_data
# Example: Fetch ACS data
acs_df = get_acs_data(
measureid="HOUSEHOLD_TYPE",
year=2022,
geography="county"
)
# Example: Fetch CDC PLACES data
places_df = get_places_data(
geo='county',
year='2022',
measureid='ARTHRITIS',
datavaluetypid='CrdPrv'
)
# Example: Fetch BRFSS data
brfss_df = get_brfss_data(geo="state",
measure="crude",
year=2023,
question_id="CHECKUP1",
break_out_category="Sex")
Widget
To browse data using a widget with dropdown menus
from fedwrap.widget import display_explorer
display_explorer()
Modules
- census_acs provides functions for accessing data from the American Community Survey API
- cdc_places provides functions for accessing data from the CDC PLACES dataset
- cdc_brfss provides functions for accessing data from the CDC BRFSS dataset
Dependencies
- pandas
- requests
- beautifulsoup4
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any questions or suggestions, open an issue or contact Mark Aronson.
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 fedwrap-1.1.0.tar.gz.
File metadata
- Download URL: fedwrap-1.1.0.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33599bc17bf3aa15b458b3b421ae6d8174bfa6a223a3a6ba91eb5a51177cc8c0
|
|
| MD5 |
4cd07dc6a16829930fa16e885099a8c2
|
|
| BLAKE2b-256 |
5d6582385643d08b90596a3c5d4f211cd5f060a86b903bfa2dc339e6501e8c90
|
Provenance
The following attestation bundles were made for fedwrap-1.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on NIH-ScHARe/fedwrap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fedwrap-1.1.0.tar.gz -
Subject digest:
33599bc17bf3aa15b458b3b421ae6d8174bfa6a223a3a6ba91eb5a51177cc8c0 - Sigstore transparency entry: 944680843
- Sigstore integration time:
-
Permalink:
NIH-ScHARe/fedwrap@9eae94f106e3cdef6edacd62ef678eb5b1de95d4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/NIH-ScHARe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9eae94f106e3cdef6edacd62ef678eb5b1de95d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fedwrap-1.1.0-py3-none-any.whl.
File metadata
- Download URL: fedwrap-1.1.0-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4230f29fe87895ab658e3fc2582961dff874832fb521856627fcc3cf8626ccf3
|
|
| MD5 |
4572adab76764433ad977946aeb30275
|
|
| BLAKE2b-256 |
9d86aadea59c20ff245c37edb74ad138cc2924afe37e7889255db37f1b6d8bcb
|
Provenance
The following attestation bundles were made for fedwrap-1.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on NIH-ScHARe/fedwrap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fedwrap-1.1.0-py3-none-any.whl -
Subject digest:
4230f29fe87895ab658e3fc2582961dff874832fb521856627fcc3cf8626ccf3 - Sigstore transparency entry: 944680879
- Sigstore integration time:
-
Permalink:
NIH-ScHARe/fedwrap@9eae94f106e3cdef6edacd62ef678eb5b1de95d4 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/NIH-ScHARe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9eae94f106e3cdef6edacd62ef678eb5b1de95d4 -
Trigger Event:
push
-
Statement type: