placematchr
placematchr is an R package for mapping messy, user-generated location strings to official NUTS regions. It handles the usual problems — ambiguous city names (“Frankfurt” could be Main or Oder), neighborhood-level inputs that need rolling up to their parent city, vague descriptions, and foreign locations that should be filtered out. Under the hood it uses aggressive regex normalization followed by a hierarchical lookup against both NUTS3 region names and the LAU (Local Administrative Units) dataset, with a fuzzy matching step for typos.
I go into much more detail on the approach in the blog post.
