We were playing the game Finden Sie Minden recently in which the players’ task is to guess where German cities and sights are located. One of the recurring arguments was about cities with the prefix Bad. Half of us argued that this was a clear sign for the city being located at the coast while the other half thought it would be a sign that this city must be in Bavaria. Of course I could not help myself and had to check what Wikidata has to say about it. I wrote the following query:

SELECT ?place ?label ?coordinates WHERE {
  ?place (wdt:P31/wdt:P279*) wd:Q262166.
  ?place rdfs:label ?label.
  ?place wdt:P625 ?coordinates.
  FILTER((LANG(?label)) = "de")
  FILTER(STRSTARTS(?label, "Bad "))

We are looking for objects that claim to be an instance (P31) or any(*) sublcass (P279) of a municipality in Germany (Q262166). After we did this we get the label and the coordinates of the places. We then filter to only look at German labels and also filter for only those that start with Bad .

The result: Neither of us were right. Cities with the prefix Bad are simply all over Germany:

The inpiration for this was taken from johl’s blog post about cities with specific suffixes