* GPSNoiser
The GPSNoiser
creates realistic GPS coordinates from roughly the same areas as the real data. When transforming your data, it adds noise using a pre-defined distance to preserve privacy. When reverse transforming, it chooses from the noised data points.

from rdt.transformers.gps import GPSNoiser
transformer = GPSNoiser(noise_km=25.0)
Parameters
noise_km
: Add this argument to determine the overall magnitude of noise to add, in kilometers
(default) 10.0
Add roughly 10km noise to the real GPS coordinates, in any direction For reference, 10km is roughly the diameter of a city like Paris
<float>
A floating point value in the range (0.0, 1000.0)
that describes the noise radius.
For reference 1000km is roughly the length of California, or the distance between Paris and Barcelona.
Examples
from rdt.transformers.gps import GPSNoiser
transformer = GPSNoiser(noise_km=25.0)
# 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
Last updated