Returns data on what countries are available from the data provided with this package either using a cached dataset or built by searching the target namespace.

get_available_datasets(type, render = FALSE, namespace = "covidregionaldata")

Arguments

type

A character vector indicating the types of data to return. Current options include "national" (which are datasets at the national level which inherit from CountryDataClass) and "regional" (which are datasets at the regional level which inherit directly from DataClass()).

render

Logical If TRUE the supported data set table is built from the available classes using summary methods. If FALSE the supported data set table is taken from package data. Defaults to FALSE.

namespace

Character string The name of the namespace to search for class objects. Defaults to "covidregionaldata" as the package.

Value

A list of available data sets and the spatial aggregation data is available for.

See also

Examples

# see all available datasets
get_available_datasets()
#> # A tibble: 22 × 10
#>    origin   class level_1_region level_2_region level_3_region type  data_urls  
#>    <chr>    <chr> <chr>          <chr>          <chr>          <chr> <chr>      
#>  1 Belgium  Belg… region         province       NA             regi… https://ep…
#>  2 Brazil   Braz… state          city           NA             regi… https://gi…
#>  3 Canada   Cana… province       NA             NA             regi… https://he…
#>  4 Colombia Colo… departamento   NA             NA             regi… https://ra…
#>  5 Covid-1… Covi… country        region         subregion      nati… https://st…
#>  6 Cuba     Cuba  provincia      NA             NA             regi… https://co…
#>  7 Europea… ECDC  country        NA             NA             nati… https://op…
#>  8 France   Fran… region         department     NA             regi… https://ww…
#>  9 Germany  Germ… bundesland     landkreis      NA             regi… https://op…
#> 10 Google   Goog… country        subregion      subregion2     nati… https://st…
#> # … with 12 more rows, and 3 more variables: source_data_cols <chr>,
#> #   source_text <chr>, source_url <chr>

# see only national level datasets
get_available_datasets("national")
#> # A tibble: 6 × 10
#>   origin   class  level_1_region level_2_region level_3_region type  data_urls  
#>   <chr>    <chr>  <chr>          <chr>          <chr>          <chr> <chr>      
#> 1 Covid-1… Covid… country        region         subregion      nati… https://st…
#> 2 Europea… ECDC   country        NA             NA             nati… https://op…
#> 3 Google   Google country        subregion      subregion2     nati… https://st…
#> 4 John Ho… JHU    country        region         NA             nati… https://ra…
#> 5 Europea… JRC    country        region         NA             nati… https://ra…
#> 6 World H… WHO    country        NA             NA             nati… https://co…
#> # … with 3 more variables: source_data_cols <chr>, source_text <chr>,
#> #   source_url <chr>

# see only regional level datasets
get_available_datasets("regional")
#> # A tibble: 16 × 10
#>    origin  class  level_1_region level_2_region level_3_region type  data_urls  
#>    <chr>   <chr>  <chr>          <chr>          <chr>          <chr> <chr>      
#>  1 Belgium Belgi… region         province       NA             regi… https://ep…
#>  2 Brazil  Brazil state          city           NA             regi… https://gi…
#>  3 Canada  Canada province       NA             NA             regi… https://he…
#>  4 Colomb… Colom… departamento   NA             NA             regi… https://ra…
#>  5 Cuba    Cuba   provincia      NA             NA             regi… https://co…
#>  6 France  France region         department     NA             regi… https://ww…
#>  7 Germany Germa… bundesland     landkreis      NA             regi… https://op…
#>  8 India   India  state          NA             NA             regi… https://ap…
#>  9 Italy   Italy  regioni        NA             NA             regi… https://ra…
#> 10 Lithua… Lithu… county         municipality   NA             regi… https://op…
#> 11 Mexico  Mexico estado         municipio      NA             regi… Downloads/…
#> 12 Nether… Nethe… province       municipality   NA             regi… https://da…
#> 13 South … South… province       NA             NA             regi… https://ra…
#> 14 Switze… Switz… canton         NA             NA             regi… https://gi…
#> 15 United… UK     region         authority      NA             regi… https://ww…
#> 16 United… USA    state          county         NA             regi… https://ra…
#> # … with 3 more variables: source_data_cols <chr>, source_text <chr>,
#> #   source_url <chr>

# render the data
get_available_datasets(render = TRUE)
#> # A tibble: 22 × 10
#>    origin   class level_1_region level_2_region level_3_region type  data_urls  
#>    <chr>    <chr> <chr>          <chr>          <chr>          <chr> <chr>      
#>  1 Belgium  Belg… region         province       NA             regi… https://ep…
#>  2 Brazil   Braz… state          city           NA             regi… https://gi…
#>  3 Canada   Cana… province       NA             NA             regi… https://he…
#>  4 Colombia Colo… departamento   NA             NA             regi… https://ra…
#>  5 Covid-1… Covi… country        region         subregion      nati… https://st…
#>  6 Cuba     Cuba  provincia      NA             NA             regi… https://co…
#>  7 Europea… ECDC  country        NA             NA             nati… https://op…
#>  8 France   Fran… region         department     NA             regi… https://ww…
#>  9 Germany  Germ… bundesland     landkreis      NA             regi… https://op…
#> 10 Google   Goog… country        subregion      subregion2     nati… https://st…
#> # … with 12 more rows, and 3 more variables: source_data_cols <chr>,
#> #   source_text <chr>, source_url <chr>