Query the CensusMapper API for available datasets.

list_census_datasets(use_cache = TRUE, quiet = FALSE)

Arguments

use_cache

If set to TRUE (the dfault), data will be read from a temporary local cache for the duration of the R session, if available. If set to FALSE, query the API for the data, and refresh the temporary cache with the result.

quiet

When TRUE, suppress messages and warnings.

Value

Returns a data frame with a column dataset containing the code for the dataset, a column description describing it, a geo_dataset column identifying the geography dataset the data is based on, a attribution column with an attribtuion string, a reference column with a reference identifier, and a reference_url column with a link to reference materials.

Examples


# List available datasets in CensusMapper
list_census_datasets()
#> Reading dataset list from temporary cache.
#> # A tibble: 29 × 6
#>    dataset description     geo_dataset attribution   reference reference_url    
#>    <chr>   <chr>           <chr>       <chr>         <chr>     <chr>            
#>  1 CA1996  1996 Canada Ce… CA1996      StatCan 1996… 92-351-U  https://www150.s…
#>  2 CA01    2001 Canada Ce… CA01        StatCan 2001… 92-378-X  https://www150.s…
#>  3 CA06    2006 Canada Ce… CA06        StatCan 2006… 92-566-X  https://www150.s…
#>  4 CA11    2011 Canada Ce… CA11        StatCan 2011… 98-301-X… https://www12.st…
#>  5 CA16    2016 Canada Ce… CA16        StatCan 2016… 98-301-X  https://www150.s…
#>  6 CA21    2021 Canada Ce… CA21        StatCan 2021… 98-301-X  https://www150.s…
#>  7 CA01xSD 2001 Canada Ce… CA01        StatCan 2001… 92-378-X  https://www150.s…
#>  8 CA06xSD 2006 Canada Ce… CA06        StatCan 2006… 92-566-X  https://www150.s…
#>  9 CA11xSD 2011 Canada Ce… CA11        StatCan 2011… 98-301-X  https://www150.s…
#> 10 CA16xSD 2016 Canada Ce… CA16        StatCan 2016… 98-301-X  https://www150.s…
#> # … with 19 more rows