* MetroAreaAnonymizer
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
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
Worldwide, regional data is provided by www.geonames.org.
Last updated