Skip to main content

STRM Privacy Diagnostics for reporting privacy metrics on a dataset.

Project description

STRM Privacy Diagnostics

This package contains diagnostics for your data, by means of computing k-Anonymity, l-Diversity and t-Closeness.

You can compute the scores by passing your data and indicating which columns are quasi-identifiers and sensitive attributes.

A 'quasi identifier' is a data attribute on an individual that together with other attributes could identify them. E.g. your length probably doesn't discern you from a larger group of people, but the combination of your length, age and city of birth will if someone has some knowledge about you.

A 'sensitive attribute' is a sensitive data point, like a specific medical diagnosis or credit score.

Installation

Install the package via Pip:

pip install strmprivacy-diagnostics

Usage

Simply import the package and

  • point it to your input data
  • calculate the statistics by passing the quasi identifiers and sensitive attributes
  • print a report by passing the quasi identifiers and sensitive attributes
from strmprivacy.diagnostics import PrivacyDiagnostics

# create an instance of the diagnostics class
d = PrivacyDiagnostics("/path/to/csv")

# calculate the statistics
d.calculate_stats(
    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,
    sa=['sa1', 'sa2', ...],  # names of sensitive attributes
)

# create report
d.create_report(
    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,
    sa=['sa1', 'sa2', ...],  # names of sensitive attributes
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strmprivacy-diagnostics-1.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

strmprivacy_diagnostics-1.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file strmprivacy-diagnostics-1.1.0.tar.gz.

File metadata

File hashes

Hashes for strmprivacy-diagnostics-1.1.0.tar.gz
Algorithm Hash digest
SHA256 38c2ce1a615a0b3fe30adb74a31e8559982220c76a5b14b998f887717d7f5c1f
MD5 71b8973c9bfdc18d94b8facdc9185968
BLAKE2b-256 e9c8dabc1b02bd01b9bbe50af21dd0df0a4818c11648ff92dac20874bc6c89b7

See more details on using hashes here.

File details

Details for the file strmprivacy_diagnostics-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for strmprivacy_diagnostics-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b726c5e9d328f684947458bbc974c12d45c9457853d94170fbe03810b13c84bd
MD5 3258455fc0950dff26255347835dc934
BLAKE2b-256 42a31f8959bdb2c763e049199d29ff3f9c08d177a040ae45fb25fbe80ae00056

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page