Hi all,
I’m trying to generate 10k different locations within a country (Spain) but points are placed recurrently over the same 20/30 locations and not distributed in a random manner. Any other way to achieve this?
Thank you in advance
Hi all,
I’m trying to generate 10k different locations within a country (Spain) but points are placed recurrently over the same 20/30 locations and not distributed in a random manner. Any other way to achieve this?
Thank you in advance
Mockaroo has a limited number of locations within each country, so it’s not possible to guarantee uniqueness. You could, however, add a random number to latitude and longitude by using the following inline formula, which can be added by clicking the f(x) button on any field:
this._to_f + random(0, 100)/100.0
The above adds a random number between 0 and 1 to the generated value.
This is the same thing I need to do, but when I put in the code this._to_f + random(0, 100)/100.0
I get error: Could not access blank value: Use || to provide a default value for blank fields. Example: (my_field || 0) + 1
If I then update the formula to (this._to_f || 0) + random(0, 100)/100.0
I get the same error.
Any ideas?
I fixed it. I had an extra underscore in my to_f conversion.