API Reference

This page contains auto-generated API reference documentation for all public functions.

Core Data Access

get_census(dataset, regions[, vectors, ...])

Access Canadian census data through the CensusMapper API.

get_census_geometry(dataset, regions[, ...])

Get census boundary geometries from the CensusMapper API.

get_intersecting_geometries(dataset, level, ...)

Get identifiers for census regions intersecting a geometry.

Dataset Management

list_census_datasets([use_cache, quiet, api_key])

Query the CensusMapper API for available datasets.

dataset_attribution(datasets)

Get combined attribution text for multiple datasets.

Region Operations

list_census_regions(dataset[, use_cache, ...])

Query the CensusMapper API for available regions in a given dataset.

search_census_regions(search_term, dataset)

Search for census regions by name.

Vector/Variable Operations

list_census_vectors(dataset[, use_cache, ...])

Query the CensusMapper API for available vectors for a given dataset.

search_census_vectors(search_term, dataset)

Search for census vectors by name or description.

find_census_vectors(dataset, query[, ...])

Enhanced vector search with multiple search types.

parent_census_vectors(vectors[, dataset, ...])

Get parent vectors for given child vectors.

child_census_vectors(vectors[, dataset, ...])

Get child vectors for given parent vectors.

label_vectors(x)

Return Census variable names and labels from a data frame.

Configuration Management

set_api_key(api_key[, install])

Set the CensusMapper API key.

get_api_key()

Get the current CensusMapper API key.

remove_api_key()

Remove the stored API key from both session and persistent storage.

show_api_key()

Display the current API key status.

set_cache_path(cache_path[, install])

Set the local cache path for downloaded data.

get_cache_path()

Get the current cache path.

Cache Management

list_cache()

List all cached data files.

remove_from_cache([cache_keys, all_cache])

Remove items from cache.

clear_cache()

Clear all cached data.