anjana logo

Description

pyCANON is a Python library which allows the user to know the anonymity level of a dataset based on a set of quasi-identifiers (QI), and a set of sensitive attributes. In addition, it allows to check different metrics concerning privacy-utility trade-offs, re-identification and disclosure risks.

Usage example: Get the anonymization report

from pycanon import anonymity, report

FILE_NAME = "adult.csv"
QI = ["age", "education", "occupation", "relationship", "sex", "native-country"]
SA = ["salary-class"]
DATA = pd.read_csv(FILE_NAME)

# Calculate k for k-anonymity:
k = anonymity.k_anonymity(DATA, QI)

# Print the anonymity report:
report.print_report(DATA, QI, SA)

Access the interactive application

The pyCANON dashboard is hosted at pycanon.cloud.eosc-siesta.eu. For testing purposes, the interface can be used when the input files are smaller than 10 MB. For real-world use with data larger than 10 MB, please contact the team for access and login.

Open dashboard

Dashboard preview

pyCANON dashboard preview

Tutorial

Watch a demonstration of using pyCANON via the SIESTA dashboard.