Skip to content

How specific should pull_{dataset} functions be? #180

Description

@dylanhmorris

Right now we have pull_nhsn(). In #166, I am planning to deprecate it now that:

  • we have more generic functions for interacting with data.cdc.gova
  • but those do not expect the API endpoint as a URL the way pull_nhsn does.

Question 1: Provide a pull_data_cdc_gov_dataset() function?

This function would be similar to pull_nhsn(), providing some arguments for common filtering (e.g. start_date and end_date, location).

Not all datasets on data.cdc.gov will have a date column, a location column, etc., but we can design the function to fail appropriately in those cases.

I lean yes on Q1

Question 2: Provide pull_{dataset} alias functions for specific datasets we use a lot?

e.g. pull_nhsn_hrd_prelim(), pull_nssp_prop_ed_visits(), etc. as an alias for pull_data_cdc_gov_dataset() pointed at the NHSN HRD preliminary dataset, the NSSP ed visit dataset, etc.

I lean weakly no on Q2, as pull_data_cdc_gov_dataset("nhsn_hrd_prelim") seems fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions