I got a problem with a twitter analysis i am doing. What i want to do: Based on the country i want to make a nice graphic about how many tweets were posted per country.
Using python and tweepy i manage to receive streams of tweets in json format. In most cases those json format tweets don't have geo locations. All information I have is the user location which is represented as a simple string. Here are a few examples:
- Berlin, Deutschland
- Paris et plein Centre
- Punjab, Pakistan
- South Africa
- Boulder, Colorado
- United States
- Paris, Mulhouse, sur la route
- Bay Area, CA
As you can see there a many different formats in which countries and cities or states (USA) are listed. Is there a Package / Framework / Library / Algorithm i can use to get the most probable country out of these variable informations (Preferably written for python)?
I am hoping to transform TX into USA. (to state an example)
Anyone got any hints what i could use to solve my problem?