* RandomLocationGenerator
*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 RandomLocationGenerator creates realistic GPS coordinates from a list of countries. It transforms the real data by dropping all the GPS-related columns. Then when reverse transforming, it generates random, realistic coordinates from around the world. Use this transformer when you want to completely anonymize your coordinates.

from rdt.transformers.gps import RandomLocationGenerator
transformer = RandomLocationGenerator(
locales=['en_US', 'fr_CA'],
missing_value_generation='random')Parameters
locales: An optional list of locales to use when generating GPS coordinates. All coordinates will be chosen from the list of available countries
missing_value_generation: Add this argument to determine how to recreate missing values during the reverse transform phase
(default) 'random'
Randomly assign missing values in roughly the same proportion as the original data.
None
Do not recreate missing values.
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.
FAQs
Can I limit the regions to the ones in my original data?
This transformer is designed to create random coordinates from anywhere in the countries that you provide. For example, if you provide 'en_US', then the transformer will create GPS coordinates from anywhere in the US such as California, New York, Massachusetts, etc. -- even if your original data did not have all these locations.
If you'd like to limit the regions based on the original data, use the GPSNoiser or MetroAreaAnonymizer.
Worldwide, regional data is provided by www.geonames.org.
Last updated
