How this is computed
Data: PHOIBLE 2.0 (Moran & McCloy, eds., 2019; CC BY-SA), 3,020 inventories of 2,176 languages, one inventory per language on the maps. Recordings: Wikipedia's IPA charts with audio (Wikimedia Commons).
Two sounds are the same if spelled alike once minor diacritics (dental, laminal, apical, advanced, retracted, lowered, centralised) are set aside, or if they are the nearest such pair. They are close when they differ by at most 1.5 of PHOIBLE's 37 phonological features. A + vs โ difference counts 1; + vs 0 counts 0.5.
The ranking and both maps use a language's phonemes only: tones and diphthongs are left out, because whether a source lists them is a transcription habit as much as a fact about the language. Sources differ: the same language from two sources often shares only about half its symbols, so check the other inventories listed under each name.