Our initial idea was to gather headlines from different news sources and to display the keywords of each one. That idea was then morphed into gathering a series of headlines from the WorldNews subreddit. Although this seemingly lacks in features, we were able to extend that idea to include other public subreddits. We were eventually able to assemble the top ten most recent upvoted posts of any given subreddits.
With the gathered data, we then utilized Google Cloud's Natural Language API to determine the sentimental score and magnitude of each given article. The score indicates the "emotion" level of the entire headline, positive values being indicative of more positive emotions while negative values are indicative of negative emotions. This score is then displayed with a short explanation.
This algorithm, despite its simplicity, reveals a lot of information; from displaying the top headline of any given genre of the day to revealing the nature within such genre. Thus, by extension the everyone that partakes in said thread. To identify and then impose a "sentimental" and "emotional" score to each individual group, we are able to demonstrate how people act differently in different subreddits.
While political subreddit(s) and some news subreddit are predictably more negative regarding the "sentimental score". In addition, it is shown that subreddits that encourage critical thinking tends to be more positive on the same scale. For example subreddits such as WritingPrompts scores highly compared to others. Furthermore while running through further iterations with different subreddits we also find that some threads fluctuate quite a bit. Because new posts can be written some of the larger subreddits due to our smaller sample size of 10 top posts may not reflect the newer posts as quickly.
Perhaps such emotional tests offer us an alternative perspective to life that is previously ignored.
How we built it
We've built the front end and the back end separately. We first had to build a web scraper that is capable of identifying the headline, the date posted, and the number of upvotes each (in addition to other data points) Reddit post has in each subreddit. Then we had to build the main framework with flask so that the front end can actually communicate with the backend and essentially make a modification to the code if needed to. We finished off by refining our front end with html5 and css3; essentially turning it into what we have now.
Challenges we ran into
Accomplishments that we are proud of
This project is something that I am particularly proud of because it's literally the first idea that came into my head. And within 36 hours we are able to build something that essentially resembles what I had initially imagined and, in many cases, exceed my expectation of it.
What we learned
We've all furthered our knowledge on HTML and python and realized the importance of teamwork and how crucial it was to the success and the efficiency of the project. In addition, using Google Cloud to help debug our code.