2

I need real or seeming real address dataset. Possible in CSV. Need Postal Code, City, Country, Street name, Street number.

I found this, but I would avoid seemingly fake combinations, like american street name in Japan.

Do you know better than this:

https://www.mockaroo.com

1

2 Answers 2

1

OpenStreetMap is a map created by a community. The map data is available .

That map is not only available as graphics, but also the raw data. Thus, you can basically query everything. There is an API (a programming interface) called Overpass API, which lets you do that. However, you should understand what you're doing, so please read that page as much as you can.

You would start designing the query in Overpass Turbo

A starting point could be this example, which uses my home town, Königsfeld im Schwarzwald as the city. In that case, you already know the country, name of the city and the postal code (78112).

The query

[out:csv("name";false)];
area[name="Königsfeld im Schwarzwald"];
way(area)[highway][name];
out;

will then give you the names of the streets. You may want to remove duplicates, which exist because streets are split. Create combinations with a few street numbers (ideally depending on the size of the city) and you have generated thousands of realistic data.

Repeat this for a few other cities in other countries.

Visually, this is what you get:

Screenshot of Overpass Turbo displaying data

2
  • Hi! Thanks. I did run your code, it clearly shows some street names. Do you think it is possible get house numbers, also and in a more distributed, from many other country get data, without much human interaction, in a programmatic way all the info?
    – János
    Commented Apr 14, 2020 at 20:56
  • @János: well, in Germany I have modelled house numbers already. I assume that there are countries which do not have so many technically equipped inhabitants, so that house numbers are not entered yet. I would just go with random numbers. If you say "street numbers", do you actually mean the numbers of the houses in the street, or do you mean street numbers such as A81 for Autobahn 81 (something like highway 81) in Germany? Commented Apr 14, 2020 at 22:06
0

Check out faker. Never used it myself so I am not quite sure about its capabilities but it is python and it does fake addresses:

from faker import Faker
fake = Faker()

fake.name()
# 'Lucy Cechtelar'

fake.address()
# '426 Jordy Lodge
#  Cartwrightshire, SC 88120-6700'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.