Skip to content

Commit

Permalink
Merge branch 'master' into 68_modeler_parameter_not_used
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelAlvarezC committed Feb 5, 2019
2 parents 4fce918 + 8d074d8 commit 006c991
Show file tree
Hide file tree
Showing 6 changed files with 818 additions and 75 deletions.
47 changes: 44 additions & 3 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,48 @@ For ``datetime`` types, a ``format`` key should be included containing the date
}]
Categorical fields ( Data anonymization)
""""""""""""""""""""""""""""""""""""""""

For ``categorical`` types, there is an option to anonymize data labeled as Personally Identifiable Information, ``pii``,
but keeping its statistical properties. To anonymize a field, you should use the following keys.

.. code-block:: python
'tables': [{
'fields': [
{
'name': 'social_scurity_number',
'type': 'categorical',
'pii': True, # expected a bool
'pii_category': 'ssn' # expected a string
},
...
],
...
}]
The most common supported values of ``pii_category`` are:

+---------------------------+
| name |
+---------------------------+
| first_name |
+---------------------------+
| last_name |
+---------------------------+
| phone_number |
+---------------------------+
| ssn |
+---------------------------+
| credit_card_number |
+---------------------------+
| credit_card_security_code |
+---------------------------+

But any value supported by faker can be used. A full list can be found here: `Faker`_


Primary key fields
""""""""""""""""""

Expand Down Expand Up @@ -217,8 +259,6 @@ Examples
A full working example can be found on the `tests`_ folder.




Sampling new data
-----------------
To use SDV in a project
Expand All @@ -234,4 +274,5 @@ To use SDV in a project
.. _RDT: https://github.com/HDI-Project/RDT
.. _strftime: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior
.. _tests: https://github.com/HDI-Project/SDV/blob/master/tests/data/meta.json
.. _tests: https://github.com/HDI-Project/SDV/blob/master/tests/data/meta.json
.. _Faker: https://faker.readthedocs.io/en/master/providers.html
Loading

0 comments on commit 006c991

Please sign in to comment.