Query the CensusMapper API for available datasets.

list_census_datasets(use_cache = TRUE, quiet = FALSE)

Arguments

use_cache

If set to TRUE (the default), 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 attribution 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_d…¹ attri…² refer…³ refer…⁴
#>    <chr>   <chr>                                 <chr>   <chr>   <chr>   <chr>  
#>  1 CA1996  1996 Canada Census                    CA1996  StatCa… 92-351… https:…
#>  2 CA01    2001 Canada Census                    CA01    StatCa… 92-378… https:…
#>  3 CA06    2006 Canada Census                    CA06    StatCa… 92-566… https:…
#>  4 CA11    2011 Canada Census and NHS            CA11    StatCa… 98-301… https:…
#>  5 CA16    2016 Canada Census                    CA16    StatCa… 98-301… https:…
#>  6 CA21    2021 Canada Census                    CA21    StatCa… 98-301… https:…
#>  7 CA01xSD 2001 Canada Census xtab - Structural… CA01    StatCa… 92-378… https:…
#>  8 CA06xSD 2006 Canada Census xtab - Structural… CA06    StatCa… 92-566… https:…
#>  9 CA11xSD 2011 Canada Census xtab - Structural… CA11    StatCa… 98-301… https:…
#> 10 CA16xSD 2016 Canada Census xtab - Structural… CA16    StatCa… 98-301… https:…
#> # … with 19 more rows, and abbreviated variable names ¹​geo_dataset,
#> #   ²​attribution, ³​reference, ⁴​reference_url