Skip to contents

contactsurveys (development version)

  • download_survey() now errors when a download is incomplete, naming the files that are missing, so the retry can fetch them. Previously an incomplete download returned only the reference.json file, with no error or warning, and was recorded in the cache manifest as complete — leaving a persistent cache directory stuck with a survey that never loaded (#159).

  • download_survey() no longer treats a Zenodo record that lists no files as a complete download, and reports a failed Zenodo request as such rather than as an empty record (#159).

  • A failed re-download with overwrite = TRUE no longer leaves the previous download recorded as complete, so the next call goes back to Zenodo instead of serving a cache that is missing a file (#159).

  • download_survey() now reports what made a download fail, rather than only the number of attempts the retry made (#159).

  • download_survey() now retries only failures a retry can fix — an incomplete download, or a Zenodo request that failed with a server error or a rate limit. Previously every failure was retried, so a malformed argument, a DOI matching no record, or an embargoed record each took four attempts and a backoff to report what the first attempt already knew (#159).

  • download_survey() now checks a downloaded file’s checksum against the one the Zenodo record gives for it, and re-fetches a file that fails the check. Previously a file that ended up on disk under the right name was treated as downloaded regardless of its content, so a connection dropped mid-transfer left a truncated file that was cached as complete and served until overwrite = TRUE was passed (#161).

  • Added a package logo.

contactsurveys 0.2.0

CRAN release: 2026-08-21

  • download_survey() now also stores a reference.json file alongside the downloaded survey files, holding the survey’s title, authors, year, version and DOI, so downstream tools can cite the survey without a further Zenodo query (#130).

  • download_survey() no longer warns when saving to a directory other than contactsurveys_dir(). Where files are saved and whether they persist is controlled by, and documented on, the directory argument, so the warning was redundant — and it previously fired even on the default tempdir() (#142).

  • Fixed list_surveys() returning a non-Zenodo DOI for surveys whose Zenodo record links a published journal article, which caused download_survey() to fail. The survey URL and version ordering are now derived from the OAI header identifier, so results do not depend on the order in which Zenodo lists a record’s metadata identifiers. Resolves #145

contactsurveys 0.1.0

CRAN release: 2026-01-31

This is a new package split off from the socialmixr package. It handles all interaction with the Zenodo repository containing social contact surveys, including listing available data sets, downloading data sets, and obtaining citations.