list and detail available sars2pack datasets

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: 50 × 8
#>    name       accessor data_type geographical geospatial region resolution url  
#>    <chr>      <chr>    <list>    <lgl>        <lgl>      <list> <list>     <chr>
#>  1 United St… cdc_soc… <chr [1]> TRUE         FALSE      <chr>  <chr [1]>  http…
#>  2 Extensive… us_hosp… <chr [1]> TRUE         TRUE       <chr>  <chr [1]>  http…
#>  3 The Econo… economi… <chr [3]> TRUE         FALSE      <chr>  <chr [2]>  http…
#>  4 The : Exc… financi… <chr [3]> TRUE         FALSE      <chr>  <chr [2]>  http…
#>  5 US county… us_coun… <chr [1]> TRUE         FALSE      <chr>  <chr [3]>  http…
#>  6 CoronaNet… coronan… <chr [1]> TRUE         FALSE      <chr>  <chr [2]>  http…
#>  7 Country m… country… <chr [1]> TRUE         FALSE      <chr>  <chr [1]>  http…
#>  8 Our World… owid_da… <chr [4]> TRUE         FALSE      <chr>  <chr [1]>  http…
#>  9 GISAID me… cov_glu… <chr [1]> TRUE         FALSE      <chr>  <chr [1]>  http…
#> 10 Newick tr… cov_glu… <chr [1]> FALSE        FALSE      <chr>  <chr [1]>  http…
#> # … with 40 more rows
# and how to use the accessor programmatically
get(res[1,]$accessor)()
#> # A tibble: 3,142 × 126
#>    grasp_id state_fips state   st_abbr county  fips  location area_sqmi e_totpop
#>       <dbl> <chr>      <chr>   <chr>   <chr>   <chr> <chr>        <dbl>    <dbl>
#>  1        1 00001      Alabama AL      Autauga 01001 Autauga…      594.    55200
#>  2        2 00001      Alabama AL      Baldwin 01003 Baldwin…     1590.   208107
#>  3        3 00001      Alabama AL      Barbour 01005 Barbour…      885.    25782
#>  4        4 00001      Alabama AL      Bibb    01007 Bibb Co…      622.    22527
#>  5        5 00001      Alabama AL      Blount  01009 Blount …      645.    57645
#>  6        6 00001      Alabama AL      Bullock 01011 Bullock…      623.    10352
#>  7        7 00001      Alabama AL      Butler  01013 Butler …      777.    20025
#>  8        8 00001      Alabama AL      Calhoun 01015 Calhoun…      606.   115098
#>  9        9 00001      Alabama AL      Chambe… 01017 Chamber…      597.    33826
#> 10       10 00001      Alabama AL      Cherok… 01019 Cheroke…      554.    25853
#> # … with 3,132 more rows, and 117 more variables: m_totpop <dbl>, e_hu <dbl>,
#> #   m_hu <dbl>, e_hh <dbl>, m_hh <dbl>, e_pov <dbl>, m_pov <dbl>,
#> #   e_unemp <dbl>, m_unemp <dbl>, e_pci <dbl>, m_pci <dbl>, e_nohsdp <dbl>,
#> #   m_nohsdp <dbl>, e_age65 <dbl>, m_age65 <dbl>, e_age17 <dbl>, m_age17 <dbl>,
#> #   e_disabl <dbl>, m_disabl <dbl>, e_sngpnt <dbl>, m_sngpnt <dbl>,
#> #   e_minrty <dbl>, m_minrty <dbl>, e_limeng <dbl>, m_limeng <dbl>,
#> #   e_munit <dbl>, m_munit <dbl>, e_mobile <dbl>, m_mobile <dbl>, …




dd = dataset_details()
str(dd,list.len=3)
#> List of 2
#>  $ datasets :List of 50
#>   ..$ cdc_social_vulnerability_index              :List of 2
#>   .. ..$ columns   :List of 126
#>   .. .. ..$ grasp_id    : chr "numeric"
#>   .. .. ..$ state_fips  : chr "character"
#>   .. .. ..$ state       : chr "character"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 3142
#>   .. .. ..$ ncol: int 126
#>   ..$ us_hospital_details                         :List of 2
#>   .. ..$ columns   :List of 33
#>   .. .. ..$ x         : chr "numeric"
#>   .. .. ..$ y         : chr "numeric"
#>   .. .. ..$ objectid  : chr "numeric"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 7596
#>   .. .. ..$ ncol: int 33
#>   ..$ economist_excess_deaths                     :List of 2
#>   .. ..$ columns   :List of 14
#>   .. .. ..$ country        : chr "character"
#>   .. .. ..$ region         : chr "character"
#>   .. .. ..$ region_code    : chr "character"
#>   .. .. .. [list output truncated]
#>   .. ..$ dimensions:List of 2
#>   .. .. ..$ nrow: int 16890
#>   .. .. ..$ ncol: int 14
#>   .. [list output truncated]
#>  $ eval_date: chr "2021-09-02"
names(dd$datasets)
#>  [1] "cdc_social_vulnerability_index"              
#>  [2] "us_hospital_details"                         
#>  [3] "economist_excess_deaths"                     
#>  [4] "financial_times_excess_deaths"               
#>  [5] "us_county_health_rankings"                   
#>  [6] "coronanet_government_response_data"          
#>  [7] "country_metadata"                            
#>  [8] "owid_data"                                   
#>  [9] "cov_glue_lineage_data"                       
#> [10] "cov_glue_newick_data"                        
#> [11] "cdc_excess_deaths"                           
#> [12] "param_estimates_published"                   
#> [13] "cdc_aggregated_projections"                  
#> [14] "google_mobility_data"                        
#> [15] "google_search_trends_data"                   
#> [16] "who_cases"                                   
#> [17] "ecdc_data"                                   
#> [18] "beoutbreakprepared_data"                     
#> [19] "descartes_mobility_data"                     
#> [20] "apple_mobility_data"                         
#> [21] "usa_facts_data"                              
#> [22] "jhu_data"                                    
#> [23] "jhu_us_data"                                 
#> [24] "nytimes_county_data"                         
#> [25] "nytimes_state_data"                          
#> [26] "kff_icu_beds"                                
#> [27] "world_population_data"                       
#> [28] "us_county_geo_details"                       
#> [29] "covidtracker_data"                           
#> [30] "us_healthcare_capacity"                      
#> [31] "government_policy_timeline"                  
#> [32] "us_state_distancing_policy"                  
#> [33] "oecd_unemployment_data"                      
#> [34] "acaps_secondary_impact_data"                 
#> [35] "cci_us_vaccine_data"                         
#> [36] "coronadatascraper_data"                      
#> [37] "test_and_trace_data"                         
#> [38] "cdc_us_linelist_data"                        
#> [39] "econ_tracker_unemp_national_data"            
#> [40] "econ_tracker_unemp_state_data"               
#> [41] "econ_tracker_unemp_city_data"                
#> [42] "econ_tracker_unemp_county_data"              
#> [43] "econ_tracker_consumer_spending_city_data"    
#> [44] "econ_tracker_consumer_spending_county_data"  
#> [45] "econ_tracker_consumer_spending_state_data"   
#> [46] "econ_tracker_consumer_spending_national_data"
#> [47] "econ_tracker_employment_national_data"       
#> [48] "econ_tracker_employment_city_data"           
#> [49] "econ_tracker_employment_state_data"          
#> [50] "econ_tracker_employment_county_data"         
# evaluated
dd$eval_date
#> [1] "2021-09-02"