* MetroAreaAnonymizer

*SDV Enterprise Feature. This feature is available to our licensed users and is not currently in our public library. For more information, visit our page to Explore SDV.

The MetroAreaAnonymizer performs Contextual Anonymization on GPS coordinates. It preserves the broad regions in your original data, while anonymizing the precise location. It transforms the data by extracting the postal code that corresponds to the GPS coordinate. When reverse transforming, it generates new GPS coordinates within the correct postal codes.

from rdt.transformers.gps import MetroAreaAnonymizer

transformer = MetroAreaAnonymizer()

Parameters

No parameters are available for this transformer.

Examples

This transformer takes exactly 2 columns as input. Make sure that you have 1 column with sdtype latitude and 1 column with sdtype longitude.

from rdt.transformers.gps import MetroAreaAnonymizer

transformer = MetroAreaAnonymizer()

# in the hypertransformer, ensure that each column has a supported sdtype
ht.update_sdtypes(column_name_to_sdtype={
    'user_lat': 'latitude',
    'user_lon': 'longitude',
})

# in the hypertransformer, assign set of columns to your transformer
ht.update_transformers(column_name_to_transformer={
    ('user_lat', 'user_lon'): transformer
})

FAQs

What happens to missing values?

This transformer recreates missing GPS coordinates during the reverse transform phase in the same proportion as the original data.

Note that a GPS coordinate is considered missing if either the latitude or longitude are null.

Worldwide, regional data is provided by www.geonames.org.

Last updated