Finds datasets within a specific category on data.cdc.gov.
Use cdc_categories() to see available categories.
Arguments
- category
Character. The category name to search for. Supports partial matching (case-insensitive).
- query
Character. Optional additional search terms to filter within the category.
- limit
Integer. Maximum number of results (default 20, max 100).
- exact
Logical. If
TRUE, requires exact category match. IfFALSE(default), uses partial matching.
Value
A data.frame with columns:
id: Dataset identifier for use withcdc_query()name: Dataset titledescription: Brief descriptioncategory: Dataset categorytags: Comma-separated list of tagsupdated_at: Last update timestamprows: Approximate row count (if available)url: Direct link to dataset page
See also
cdc_categories() to list available categories,
cdc_datasets() for general keyword search.
Examples
if (FALSE) { # \dontrun{
# Find all vaccination datasets
cdc_datasets_category("Vaccination")
# Find COVID-19 related datasets
cdc_datasets_category("COVID-19")
# Search within a category
cdc_datasets_category("Vaccination", query = "influenza")
# Exact category match
cdc_datasets_category("NCHS", exact = TRUE)
} # }