gravitystorm/openstreetmap-carto — pull request #192 by vincentdephily (2013-09-26 13:59:49+00:00)
Title: Add helper script to get list of most frequent values for a key from taginfo

The idea is that this script would help to define the values that need to be rendered,
finding the most frequent ones and avoiding explicit negatives and misspellings.
This commit just adds the script, but doesn't make actual use of it anywhere yet.

The idea follows discussions on #116 and #182.

@gravitystorm : when I said that 'rendering "all" values of a tag is often desirable', the quotes were important : We clearly do not want to render misspelings and "no" values. So we use a whitelist and avoid catch-alls.

But for some keys like 'shop' or 'tunnel', that whitelist can become large and unwieldy. This script just makes the creation and maintenance of those whitelists easyer, based on the observations that cutting off the long tail and some frequent-but-unwanted values makes a pretty nice list.

Of course, the script's output must be reviewed. But eventually, instead of storing the actual output, we could just store the parameters (key, threshold, blacklist). That's to be done on a case by case basis.