* MetroAreaAnonymizer

*SDV Enterprise Feature. This feature is available to our licensed users and is not currently in our public library. To learn more about the SDV Enterprise and its extra features, visit our website.

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()

This transformer is still in Beta! We have not yet optimized the performance or quality. Please contact us if you notice any issues.

Due to the nature of postal code information, this transformer is optimized for dense, metropolitan areas such as cities. If you use this transformer for rural areas, the level of anonymization may not be enough for your needs. In such cases, we recommend using the GPSNoiser or RandomLocationGenerator.

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