Functions
The activity recorded for a topic, with the spelling the broker used: the topic's own spelling when the broker carries it, otherwise the lowest case-insensitive match, so a row does not flip between variants from one snapshot to the next.
Region, then the country when the sample shows the broker uses it, then subdivision and city, then the community roots that serve the place. Each ladder rung is trimmed from the end of its last segment to fit the byte cap; a rung that empties is dropped with everything below it. Rebuilt as activity grows.
Letters and digits in any script kept as they are (æ, ø, å, ü, 東京), _ and - kept, anything else dropped, lowercased when asked. Subdivisions keep their case ("WA"); cities follow the community's lowercase convention. Null when nothing is left. Communities write their roots in their own letters (msh/EU_868/NO/Østlandet), so a suggestion does the same rather than folding to ASCII.