Skip to contents

readaec 0.2.0

New data

Improvements and fixes

  • get_swing() now reports the party that actually won each seat (winner_from, winner_to), joined from the AEC members elected file. Previously winners were inferred from TPP shares, which misidentified seats won by independents and minor parties. The TPP-based columns are retained as tpp_leader_from and tpp_leader_to.
  • All data functions gain a refresh argument to force a re-download, useful on election night when cached counts go stale.
  • HTTP failures now produce a readable error with the status code. Previously the status check was unreachable because ‘httr2’ errors on non-200 responses before the check ran.
  • Downloads are written to a temporary file and only moved into the cache once complete, so an interrupted download can no longer leave a corrupt file that is served from cache indefinitely.
  • Requests now identify the package via a user agent and retry up to three times on transient failures.
  • Column types are now guessed from the whole file rather than the first 1000 rows, fixing parsing warnings on get_polling_places().

readaec 0.1.3 (not released)

  • Added HTTP status validation to get_fp_by_booth() for consistency with other data functions.

readaec 0.1.2

CRAN release: 2026-03-16

  • Examples now cache to tempdir() instead of the user’s home directory, fixing CRAN policy compliance for \donttest examples.
  • Cache directory is now configurable via options(readaec.cache_dir = ...).
  • Replaced rappdirs dependency with tools::R_user_dir() (base R).

readaec 0.1.1

CRAN release: 2026-03-10

  • Added AEC web service URL to DESCRIPTION per CRAN policy
  • Added \value documentation to clear_cache()
  • Changed \dontrun{} to \donttest{} in all examples that require a network connection

readaec 0.1.0