faker
faker copied to clipboard
Match address based data
Clear and concise description of the problem
Add support for location data that matches the rest of the data.
Suggested solution
Faker should return location based data to match like the example below,
{
"country": "United States",
"countryCode": "USA",
"lat": 38.8889,
"long":-77.0591
}
Right now each value is Random and I am getting something like this,
{
"country": "United States",
"countryCode": "CH",
"lat": -60.419,
"long": 50.158
}
Alternative
I have used Mockaroo in the past and they have the functionality working, https://www.mockaroo.com/29c15a10.
Additional context
No response
Could faker.address.nearbyGPSCoordinate([31, 107], 1000, true) help you?
start coordinates are just picked via google maps absolutely inaccurately :)
As for countries and country codes, you can overwrite the default provided values with custom ones, that match your requirements.
The USA was just an example, we would be using the entire world for multiple apps. If you check out the link from mockaroo and click preview you can see it works perfectly there. Was hoping for something similar.
Also to add, we are using mockaroo to create a mock API and it uses faker under the hood to generate the data.