Sentiment Cartography

Here is an application I built over the past few days. It was designed to practice using functionality I hope to incorporate into future projects.

https://sentiment_cartography.anvilapp.net/

Here is how it works:

  1. Enter a name, word, or phrase.
  2. On the server side,
    a) A Twitter search will look for tweets matching the given phrase.
    b) For each tweet, very rough sentiment analysis is performed using textblob.
    c) A fancy parsing function attempts to convert the location of each tweet from a string (i.e. Paris, France) to a latitude/longitude
  3. On the client side, these results are shown on a Google map.

I can post some of the code below in the comments. Please let me know what you think and report any annoying errors.

Cheers,
Alek

1 Like

That is…really very cool!

Indeed - though I’m surprised at how geographically limited the use of the word “spatchcock” is.

1 Like

It’s probably a result of the fact that most users don’t have a location listed in Twitter. The feed gives 15 search results a pop (assuming there are at least 15 recent hits). Typically, only 7 or 8 have a location, and of those one or two typically cannot be resolved to a latitude / longitude.

“Nelly Furtado” is slightly better represented worldwide, which is nice.

Would be cool to list positive and negative example tweets side by side. The background map looks great too.