Skip to contents

CDCAtlas is an R package for retrieving selected public health surveillance data from the CDC’s AtlasPlus platform.

Lifecycle: experimentalLicense: MIT

What is the CDC Atlas database?

AtlasPlus is an interactive CDC data tool that provides access to reported data on HIV, sexually transmitted infections, tuberculosis, viral hepatitis, and selected social determinants of health. It allows users to explore these data through maps, charts, tables, and downloadable reports.

This package provides a programmatic interface to selected AtlasPlus data so that researchers can query, cache, and analyze results directly in R rather than working only through the web interface, which requires downloading individual files which require manual cleanup before importing into R.



NCHHSTP AtlasPlus is an interactive tool that provides CDC an effective way to disseminate HIV, Viral Hepatitis, STD, TB and Social Determinants of Health Data, while allowing users to observe trends and patterns by creating detailed reports, maps, and other graphics. Find out more! https://www.cdc.govnchhstp/about/atlasplus.html



What the package does

CDCAtlas provides a polite, cache-aware R client for selected CDC AtlasPlus endpoints.

AtlasPlus is not a stable, public API.
This package aims for safe and respectful usage:

  • identifies via a custom User-Agent
  • applies rate limiting and retry backoff
  • caches responses to reduce server traffic
  • handles schema changes gracefully when possible

Installation

You can install the development version of CDCAtlas from GitHub with:


install.packages("devtools")
devtools::install_github("VagishHemmige/CDCAtlas")

Example

This is a basic example which shows you how to solve a common problem:


library(CDCAtlas)

gonorrhea_us <- get_atlas(
  disease = "gonorrhea",
  geography = "state",
  year = 2022
)