Code Monkey home page Code Monkey logo

veil's Introduction

Veil: Deidentify data

Veil is a collection of utilities to help deidentify datasets. Currently, the main purpose of Veil is to provide an easy way to create a reference table for an ID column that is sensitive and to map it to any number of downstream dataframes. Veil relies on Pandas to do most of the heavy lifting, and simply provides a way to concisely deidentify and reidentify columns where necessary.

TODO:

  • Add module to work with date columns
  • Provide more saving formats for id_veil.save()
  • Add tests

Protected Health Information (PHI)

The de-identification criteria for protected health information in the United States is described here

License

MIT

veil's People

Contributors

mkeating avatar michaelgao8 avatar

Stargazers

Harvey Shi avatar Sai Nimmagadda avatar Marshall avatar  avatar Suyash Kumar avatar

Watchers

James Cloos avatar Marshall avatar  avatar

veil's Issues

Better support for aliases

As they are currently implemented, aliases have a particular edge case which should be handled, but are not.

When there is a column, for example id, which exists in multiple tables but do not refer to the same id and a user wants one instance of id to be in an alias (and ignore others), this is not currently supported.

Ordering of de-identification is ambiguous

Background

In the current iteration of this utility, the user must know about the order with which to deidentify columns. Let's take a simple example:

If dataframe has two columns, id and timestamp, the two associated maps would be:

id_map: id -> new_id
time_map:id -> new_timestamp

OR

id_map: id -> new_id
time_map: new_id -> new_timestamp

The difference between these two makes a large difference to their usage.

In case 1, the user must shift the time columns BEFORE shifting the id (or else the time map will not see the associated IDs).

In case 2, the user must shift the id first BEFORE shifting the times.

This is an issue that needs to be resolved in order for ease of use for the end-user.

Early thoughts:

the two major paths this could take is to create an entity that has both the logic for the time AND the id in the same object, or to somehow make it clearer which order must be used.

apply_offset method does not support updating with method == 'year_start'

Need to implement a way for the offset map to update when the underlying time offset method is moving to the start year. This may get confusing, as if this means if the currently DataFrame being processed is not of the same nature of timestamp as the original one used to create the offset_map, unintended behavior may occur.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.