Query the CensusMapper API for vectors with descriptions matching a search term or phrase (deprecated)

search_census_vectors(searchterm, dataset, type = NA, ...)

Arguments

searchterm

The term or phrase to search for e.g. "Ojibway". Search terms are case insensitive. If unable to find a given string, this function will suggest similarly named objects.

dataset

The dataset to query for available vectors, e.g. "CA16".

type

One of NA, 'Total', 'Male' or 'Female'. If specified, only return variables of specified `type`.

...

Further arguments passed on to list_census_vectors.

Examples

search_census_vectors('Ojibway', 'CA16')
#> Warning: search_census_vectors(). See ?find_census_vectors() for more robust search functions.
#> # A tibble: 24 × 7
#>    vector      type   label              units parent_vector aggregation details
#>    <chr>       <fct>  <chr>              <fct> <chr>         <chr>       <chr>  
#>  1 v_CA16_617  Total  Ojibway-Potawatom… Numb… v_CA16_569    Additive    CA 201…
#>  2 v_CA16_618  Male   Ojibway-Potawatom… Numb… v_CA16_570    Additive    CA 201…
#>  3 v_CA16_619  Female Ojibway-Potawatom… Numb… v_CA16_571    Additive    CA 201…
#>  4 v_CA16_623  Total  Ojibway            Numb… v_CA16_617    Additive    CA 201…
#>  5 v_CA16_624  Male   Ojibway            Numb… v_CA16_618    Additive    CA 201…
#>  6 v_CA16_625  Female Ojibway            Numb… v_CA16_619    Additive    CA 201…
#>  7 v_CA16_1424 Total  Ojibway-Potawatom… Numb… v_CA16_1376   Additive    CA 201…
#>  8 v_CA16_1425 Male   Ojibway-Potawatom… Numb… v_CA16_1377   Additive    CA 201…
#>  9 v_CA16_1426 Female Ojibway-Potawatom… Numb… v_CA16_1378   Additive    CA 201…
#> 10 v_CA16_1430 Total  Ojibway            Numb… v_CA16_1424   Additive    CA 201…
#> # ℹ 14 more rows
if (FALSE) {
# This will return a warning that no match was found, but will suggest similar terms.
search_census_vectors('Ojibwe', 'CA16', 'Total')
}