I'm trying to create a heatmap of users' location in various world regions in R, but the dataset I'm working with contained a free text location field for users to fill on their own -- hence the quality of place names varies quite a bit. I'm OK with ignoring any string that won't parse as a known place (there's enough good data in here for me to get a sample), but I can't seem to find a failure-tolerant placename entity resolver to use in R.
Another issue is that some of these are cities and some of these are states and some of these are countries -- Ideally, I think, I'd like to make two maps, one map of the US in which all of the cities resolve to states, and one map of the world in which all of the locations on the first map resolve to the US. Is there a reasonably easy way of doing this?
Thanks!