Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fedwrap-1.0.2.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

fedwrap-1.0.2-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file fedwrap-1.0.2.tar.gz.

File metadata

  • Download URL: fedwrap-1.0.2.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fedwrap-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cef058f898e585db69f97a186ef65ed0d44b82951f11c1496b2004a756a9091a
MD5 38d4270b957014ba13d99ce72f4c5922
BLAKE2b-256 6cff60dc02f75c296dc1dc39c322ac562014be979fcdb511dfa711d8405257f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fedwrap-1.0.2.tar.gz:

Publisher: publish-to-pypi.yml on NIH-ScHARe/fedwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fedwrap-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: fedwrap-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fedwrap-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c12337d0b46a237dbe2f57f976297264539645e81a2d5f249550f78ec800795d
MD5 67748f4760e7e63bcc14f2867a7c48bb
BLAKE2b-256 b4630ea8bd6a89ebb26a6d39cc4331d3f5eed615d51cb21dba8d6bc9e6dcc884

See more details on using hashes here.

Provenance

The following attestation bundles were made for fedwrap-1.0.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on NIH-ScHARe/fedwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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