Skip to contents

list and detail available CARDdealr datasets

Usage

available_datasets()

dataset_details()

Value

A data.frame in which each row represents an available dataset.

  • name: the short name of the dataset

  • accessor: accessor function

a list, with each dataset as an item

Details

dataset_details: returns a pre-computed set of column names and types, dimensions of the datasets, and for datasets with a date (time course), the min and max dates included in the dataset. Each dataset is an item in the list. See examples for details and for viewing suggestions.

Functions

  • dataset_details():

Examples

res = available_datasets()
res
#> # A tibble: 12 × 2
#>    name                                                                 accessor
#>    <chr>                                                                <chr>   
#>  1 American College of Radiology Lung Cancer Screening Registry (LCSR)… src_acr…
#>  2 Bureau of Labor Statistics Unemployment data                         src_bls…
#>  3 Behavioral Risk Factor Surveillance System (BRFSS)                   src_brf…
#>  4 CDC Places                                                           src_cdc…
#>  5 EPA Toxic Release Inventory (TRI)                                    src_epa…
#>  6 Environmental Protection Agency Superfund                            src_epa…
#>  7 FDA Certified Mammography Facilities Dataset                         src_fda…
#>  8 Health Resources and Services Administration (HRSA) facilities       src_hrs…
#>  9 National Plan & Provider Enumeration System (NPPES) GI providers     src_npp…
#> 10 National Plan & Provider Enumeration System (NPPES) Oncology Provid… src_npp…
#> 11 CDC Social Vulnerability Index                                       src_cdc…
#> 12 United States county health rankings                                 src_us_…
# and how to use the accessor programmatically
get(res[1,]$accessor)()
#> INFO  [15:27:47.552] Starting acr_lung_cancer_screening_data
#> Rows: 3590 Columns: 8
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (8): 1 Facility Name, 2 Street Address, 3 city, 4 state, 5 ZIP Code, 6 P...
#> 
#>  Use `spec()` to retrieve the full column specification for this data.
#>  Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> INFO  [15:27:49.868] Completing acr_lung_cancer_screening_data
#> # A tibble: 3,590 × 8
#>    Type                Name  Address State Phone_number Notes latitude longitude
#>    <chr>               <chr> <chr>   <chr> <chr>        <chr> <chr>    <chr>    
#>  1 Lung Cancer Screen… Akro… 1 Akro… OH    330-344-6450 Lung… ""       ""       
#>  2 Lung Cancer Screen… Core… 1 Atki… MI    231-843-2591 LCSR  ""       ""       
#>  3 Lung Cancer Screen… Bass… 1 Atwe… NY    607-547-3663 LCSR  ""       ""       
#>  4 Lung Cancer Screen… Moun… 1 Bay … NJ    973-429-6105 Lung… ""       ""       
#>  5 Lung Cancer Screen… Bost… 1 Bost… MA    617-638-6610 LCSR  ""       ""       
#>  6 Lung Cancer Screen… Virt… 1 Brac… NJ    856-470-9100 Lung… ""       ""       
#>  7 Lung Cancer Screen… Clar… 1 Clar… NJ    973-450-2047 Lung… ""       ""       
#>  8 Lung Cancer Screen… Coop… 1 Coop… NJ    856-342-2723 LCSR  ""       ""       
#>  9 Lung Cancer Screen… NY I… 1 Dela… NY    631-675-3000 Lung… ""       ""       
#> 10 Lung Cancer Screen… Summ… 1 Diam… NJ    908-277-8673 LCSR  ""       ""       
#> # ℹ 3,580 more rows




dd = dataset_details()
str(dd,list.len=3)
#> List of 2
#>  $ datasets :List of 11
#>   ..$ src_acr_lung_cancer_screening_data:List of 2
#>   .. ..$ columns   :List of 8
#>   .. .. ..$ Type        : chr "character"
#>   .. .. ..$ Name        : chr "character"
#>   .. .. ..$ Address     : chr "character"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 3590
#>   .. .. ..$ ncol: int 8
#>   ..$ src_bls_unemployment_data         :List of 2
#>   .. ..$ columns   :List of 10
#>   .. .. ..$ series_id     : chr "character"
#>   .. .. ..$ year          : chr "numeric"
#>   .. .. ..$ period        : chr "character"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 11141058
#>   .. .. ..$ ncol: int 10
#>   ..$ src_brfss                         :List of 2
#>   .. ..$ columns   :List of 27
#>   .. .. ..$ Year                      : chr "numeric"
#>   .. .. ..$ Locationabbr              : chr "character"
#>   .. .. ..$ Locationdesc              : chr "character"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 2522478
#>   .. .. ..$ ncol: int 27
#>   .. [list output truncated]
#>  $ eval_date: chr "2023-11-09"
names(dd$datasets)
#>  [1] "src_acr_lung_cancer_screening_data" "src_bls_unemployment_data"         
#>  [3] "src_brfss"                          "src_cdc_places_data"               
#>  [5] "src_epa_tri_data"                   "src_epa_superfund_data"            
#>  [7] "src_fda_mammography_data"           "src_hrsa_facility_data"            
#>  [9] "src_nppes_gi_data"                  "src_nppes_onco_data"               
#> [11] "src_cdc_social_vulnerability_index"
# evaluated
dd$eval_date
#> [1] "2023-11-09"