View source: R/census_regions.R
search_census_regions | R Documentation |
Runs a query against the CensusMapper API to retrieve region data with
names matching specific queries. Users can optionally specify the target geography level
(e.g. level = 'CMA'
, level = 'CSD'
, etc.). Alternatively, calling
explore_census_vectors()
will launch the interactive region selection tool on
the CensusMapper site in a new web page or tab.
search_census_regions(searchterm, dataset, level = NA, ...)
searchterm |
The term to search for e.g. |
dataset |
The dataset to query for available regions, e.g.
|
level |
One of |
... |
Further arguments passed on to |
A census region list of the same format as 'list_census_regions()' containing the matches.
## Not run:
# This will return a warning that no match was found, but will suggest similar named regions.
search_census_regions('Victorea', 'CA16')
# This will limit region results to only include CMA level regions
search_census_regions('Victoria', 'CA16', level = "CMA")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.