Access to Canadian Election Study Data
Overview
Provides tools to easily access and analyze Canadian Election Study data. The package simplifies the process of downloading, cleaning, and using 'CES' datasets for political science research and analysis. The Canadian Election Study ('CES') has been conducted during federal elections since 1965, surveying Canadians on their political preferences, engagement, and demographics. Data is accessed from multiple sources including the 'Borealis' Data repository https://borealisdata.ca/ and the official 'Canadian Election Study' website https://ces-eec.arts.ubc.ca/. This package is not officially affiliated with the Canadian Election Study, 'Borealis' Data, or the University of British Columbia, and users should cite the original data sources in their work.
New data
- Added the **2025 Canadian Election Study** web survey, retrieved from Harvard Dataverse (doi:10.7910/DVN/2YAQ8D). Access it with
get_ces("2025")orget_ces("2025", variant = "web"); the PDF technical report and codebook are available viadownload_pdf_codebook("2025"). - Dataset coverage now spans **23 datasets from 1965 to 2025**.
Bug fixes
- Restored access to the **2015 phone** and **2015 combined** (web/phone) surveys, which had stopped downloading after the original UBC host began returning an HTML bot-protection page to programmatic clients. The 2015 combined survey is now sourced from the Borealis repository, and the 2015 phone survey from a stable mirror, so both download reliably. Downloads also send a standard browser
User-Agent(saved and restored on exit) for robustness against such host-side protections. Both datasets match the correspondingcesRpackage variants exactly (phone: 4,202 x 455, Latin1 encoding; combined: 11,614 x 665).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 19 (9 internal)includes a package overview page
- Examples that run
- 11%1 run in a plain check · 8 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 5%
Downloads
Repository
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/laurenceomfoisy/ces on 2026-10-21.
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-07-23Commits: at least 8 crediting it in the message
- Claude Opus 4.86 commits · Jun 2026
Dependencies
Code & Tests
People & History
Package metadata
- First published
- 2025-05-28
- Total releases
- 5 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5
- Download size
- 50 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("ces")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.