Setting country context

One of the key points of using Mockaroo is the ability to provide consistency within data records and that’s very good but I get an issue with countries. I have made a crude fix by having a field “__country” that I sometimes set to just “United Kingdom” otherwise I get too many foreign ones which doesn’t reflect the content of the database. AFAICT, the country of the record is set by the first invocation of a country field type a further call to country doesn’t change it. The difference between this and the example of the car dealerships is the fact that the country sets the context of a number of other fields such as postcode.

What I would like to do is to be able to set the country or the distribution of countries according to the frequency column in a dataset. I have a table of ISO country codes with a frequency column. Ideally it could be done in a similar fashion to “Custom Lists” though it would need settings just add the values required and a weight for “All the rest.”

I would also like to invoke country a second time and get a different result.

BTW, am I right in thinking that the Country Code type is a the ISO 2-char code?

1 Like

You can, in fact, use country multiple times and get different results. Any other location fields will also be based on the generated country. Here’s an example: http://mockaroo.com/a76b6890

I did, however, just notice a bug where if the filtered country list is not blank, the list for the last field is applied to all. I’ll see if I can fix that soon.

Yes, those are the ISO 2-char codes.

If I understand you correctly, you’d need a way to look up other location fields, such as city and postal code, for a specific county code from a list or dataset, correct? There isn’t a way to do that currently, though I might be able to build one.

My original test used Country Code and then Country and in 100/100 rows they came out the same. When I switched to using Country, twice they were different. I now think this must be the same row algorithm you have mentioned elsewhere.

Yes, you got it - I suspect it could turn into quite a big topic.

Hello Ian,
you wrote that Mockaroo is able to provide consistency within data records. For that reason I want to ask you, how to create consistent data.
I would like to create 5 rows with data that varies from 1 to 5 (Likert scale). Would be great if you would have a solution.

Kind regards,
Guenter

I totally understand the concern, you wrote that mockaroo is able to provide consistency within data records. beside this if you are using AOL and looking for service of AOL Mail Not Working so must visit and get solution instantly with experts.