Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anonymous line lists #106

Merged
merged 10 commits into from
May 3, 2024
Merged

Add anonymous line lists #106

merged 10 commits into from
May 3, 2024

Conversation

joshwlambert
Copy link
Member

This PR addresses part of #41. It adds the ability to anonymise the names in a line list and contact tracing data.

The .anonymise() internal function has been added to convert individual's names into a fixed length alphanumeric string (similar to, but simpler than, hashing).

The add_names argument in sim_linelist() and sim_outcome() has been replaced by anonymise, and the anonymise argument has been added to sim_contacts(). When simulating with anonymise = TRUE the output of sim_outbreak() is now fully anonymised, whereas in v0.2.0 only the line list <data.frame> has names removed, while the contact tracing table has infector and infectee names remaining. This is rectified in this PR which properly implements a simple random anonymisation.

The dimensions of the line list or contact tracing data is the unchanged by the anonymise argument. This brings the package in line with the design principle on robust and predictable data outputs added to the design principles vignette in #104.

Tests (including snapshots) and documentation have been updated in line with the above-mentioned updates.

@joshwlambert joshwlambert added the enhancement New feature or request label Apr 29, 2024
@joshwlambert joshwlambert merged commit 7891f3d into main May 3, 2024
8 checks passed
@joshwlambert joshwlambert deleted the anonymise branch May 3, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant