Skip to content

landgenoot/node-mondrian

Repository files navigation

Node-mondrian Build Status

Brings k-anonymity and l-diversity to nodeJS by using Mondrian and Mondrian_L_Diversity under the hood.

Developed as part of the Privacy Engineering course at the Technische Universität Berlin.

Usage

Install

npm install node-mondrian

Example

const Mondrian = require('node-mondrian')

// See this repo for example data
const data = require('data/adult.json')
const attributes = require('data/adult-attributes.json')

let anonymized = await Mondrian.kAnonymity(data, attributes, 10) 
let diversified = await Mondrian.lDiversity(data, attributes, 10)

Results in:

[
  {
    "age": "28,53",
    "workclass": "*",
    "educationNum": "5,14",
    "maritalStatus": "*",
    "race": "*",
    "sex": "*",
    "nativeCountry": "*",
    "occupation": "Adm-clerical"
  },
  {
    "age": "28,53",
    "workclass": "*",
    "educationNum": "5,14",
    "maritalStatus": "*",

Testing

npm test

About

k-anonymity and l-diversity for node using https://github.com/qiyuangong/Mondrian under the hood

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published