-
Significant performance improvements to census vector hierarchy traversal functions
parent_census_vectors()is now 1.9x faster (92% speedup) by caching the full vector list once instead of repeated lookupschild_census_vectors()is now 1.2x faster (23% speedup) with same optimization- Replaced O(n²) rbind operations in loops with efficient list accumulation
- Deep hierarchies (8+ levels) see the most improvement
-
Faster semantic search in
find_census_vectors()- N-gram generation is now 1.4x faster (30-40% speedup)
- Optimized text processing with pre-allocated vectors
- Better performance for all query types and lengths
- Added comprehensive test suite with 43 unit tests
- New
tests/testthat/directory structure - All optimizations maintain 100% backward compatibility
- No breaking changes to any function signatures or behavior
- Added
microbenchmarkandtestthatto Suggests
- Convenience function to visualize vector hierarchy (
visualize_vector_hierarchy())
- Improvements in warnings and messages
- Removal of stale code
- Download progress reporting and retry logic for robustness against network issues
- ensure that cancensus won't trigger CRAN check errors if StatCan servers are down
- replace shorthand function with regular function definition to address CRAN note
- clarify installing API key and cache path in "getting started" vignette
- fix caching problem with get_statcan_wds_data
- support health region level census data for 2021 via WDS
- support download of dissemination block geographies from StatCan
- fix issue with path names not quoted properly when downoading and unpacking geosuite data
- support versions in WDS data, in paricular for federal electoral districts
- fix issue when using named vectors to query data for non-existent geographies, return NULL in this case instead of throwing error
- fix problem with population centre geographic data download
- support newly released Forward Sortation Area geography for statcan geography and WDS functionality
- remove instances of new native R pipe |> with dplyr pipe %>% to preserve compatibility with older R versions
- add functionality for direct access to StatCan census WDS for 2021
- add functionality to download original StatCan geographies for 2021
- update CODES_TABLE for 2021 census
- added ability to query census datasets by year
- added a convenience function for creating unique names within given selection of regions from
list_census_regions() - added a check and context menu to install
sfpackage when user requests spatial data but does not have the required package installed as opposed to erroring out. - improved checking that correct spatial formats are requested
- preparing for 'sp' spatial format usage deprecation in future versions
- Added a check and context menu to install
sfpackage when user requests spatial data but does not have the required package installed as opposed to stopping with an error. - fixes a bug in the local data recall check
- resolved broken and relocated links picked up in CRAN pretesting
- Added functionality for users to detect and remove locally cached data that has been recalled by Statistics Canada
- added a check on initial
get_censuscall that produces a warning if locally cached data has been recalled by Statistics Canada - added option to retrieve higher-resolution geometries in
get_census
- renamed get/set cache/api_key functions to avoid name conflicts with related packages
- Added cache metadata
- overview information on cached data
- allow selective removing of cached data
- Fixed a problem with
sfcompatibility andagrattribute - Fixed a problem with querying geographic data for multiple geographic levels
- Fixed a minor problem where cache path wasn't always picked up
- Added optional argument
keep_parentwhen callingchild_census_vectors()that retains the input parent variable in the list of result. We found that in many cases user would follow up a call tochild_census_vectors()with abind_rows(...)to do this, so this should save a step.
- Fixed minor problem where API key wasn't always picked up if not set correctly as environment variable.
- Fixed warning when
tcolumn not present in downloaded data.
- Added
get_intersecting_geometryfunction to take advantage of new Censusmapper API endpoint. Check out the new vignette detailing how to use it.
- Slightly reworked how to configure and store user API keys and cache locations. New functions
set_api_key,set_cache_path,show_api_key, andshow_cache_pathadded. - Fixes various warnings due to recent changes in tibble and dplyr.
- Support for 1996 census
- Public availability of dissemination block area level data
- Fixes bug in
find_census_vectors()
- CRAN check issues
- Fully redesigned variable search using
find_census_vectors()and deprecation of `search_census_vectors(). See the Data discovery: resources for finding available and relevant data vignette for additional information. - Census Agglomerations with defined geographies and Census tracts are separated from CMAs when calling
list_census_regions() - Additional metadata for catalogue information and attribution is returned when calling
list_census_datasets() - New functions
explore_census_regionsandexplore_census_vectorswhich open a browser page towards the interactive discovery and selection tools on the Censusmapper website - New function
attribution_for_datasetwhich provides accurate attribution information for citation and visualizations for a given dataset. - Additional datasets: T1FF taxfiler data and dwelling type crosstabs, made available by CMHC. For more info, see the new vignettes for these datasets: Additional datasets: Structural type of dwelling by document type, Additional datasets: Annual T1FF taxfiler data.
get_census_geometry()is now hard-deprecated and will stop the program flow. Useget_census()instead.
- Updated internal usage of dependent packages to avoid deprecated functions and warnings
- Additional minor fixes to efficiency improvements
- More efficient conversion between
spandsfspatial objects - Fixes issue occasionally reported when reading large GeoJSON objects as noted in #138
- Adds
geojsonsfdependency - Replaces soft deprecated dplyr functions to fix #137
- Minor documentation improvements
- Allow for search by vector identifier
- Allow child and parent vector retrieval by vector identifier
- Add functionality for future tax data releases
- Added a
max_leaves_optionfor thesearch_census_vectorsfunction. Adds functionality to set maximum depth for child census vectors, i.e.max_level=NAas an additional parameter. Then e.g.max_level=1would only get direct children and no grandchildren. - Resolved issues with mislabeled CD UID for CSD level data
- Improve reliability of character/numeric alignments for geographic UIDS
get_census_geographyis now soft deprecated and rolled into the standardget_censuswith parameters
- Minor documentation improvements
- Soften dependency on
readrpackage - Allow for search of internal CensusMapper variables
- Remove dependency on development versions of
sfandggplot2packages - Add feature allowing for named vector retrieval
- Vignette updates
- Calls that retrieve only geography will now return geographic hierarchy information as well
- Small tweaks that make it easier to do 2011-2016 intra-census comparisons
- Fix labels when geo format is
sf - Remove some unnecessary code for geographic hierarchies
- Set default caching to
tempdir() - Encourage users to set up local persistent caching using
options(cancensus.cache_path = 'XXX')
- First released on CRAN
- Ensured that data frames were
sf-class data frames if optionsfwas selected for spatial data.
- Fixed a bug where
read.csvwas incorrectly loading text data ifreadr::read_csvwas not available
- Added a
NEWS.mdfile to track changes to the package. - Added pkgdown documentation
- New vignettes - cancensus and Making maps with cancensus
- Default behaviour for
list_census_vectors()changed to havequiet = TRUE
- Added vector and geography search and discovery capabilities
- Improved performance
- Error and API issue messaging
- Reduced package dependencies
- Initial release