Inspiration
While we were brainstorming for our application, I opened my Amazon and started browsing items. My girlfriend's birthday was coming up in the next few weeks and I have to figure out what to get her. That's when the idea hit me. She tweets a lot on Twitter, wouldn't it up great if I could figure out what she likes from those tweets?
What it does
The application allows a user to target an individuals public tweeter account. It would crawl through a target user's twitter feed and records their pubic tweets. These tweets are ran with a sentimental analysis and a pattern comparison in order to generate keywords for items that the target user would be interested in. When the user with the chrome extension is browsing Amazon, the chrome extension will read the DOM elements and scrap an Array of item names and prices. When the description of the item and names has a significant enough correlation with the keywords, those elements will be highlighted for the user as an item suggestion.
How we built it
The tweeter API has created by integrating consumer keys granted by a developer status from Twitter. The API utilized for the tweets is the Tweepy API. The RESTful API does most of the calculations, API calls and number crunching. It performs the calls with the Tweepy API once a user inputs a target. The Tweepy API will return an Array of a user's tweets. These tweets will be inputed into Google's sentimental analysis and keywords with related strong or intense feelings are recorded, by a percentage value representing the associated feeling. The accuracy of the percentages is increased by pattern recognition which finds trends in repeating keywords. The RESTful API is hosted on an E2C on AWS. The front end google chrome makes HTTP requests to the RESTful API, along with executing various JavaScript elements. When the user with the chrome extension is browsing Amazon, a script scraps all the items names and prices from the DOM. The RESTful API is then called again to perform a compatibility check for the items with the previous percentages generated from the social media feed.
Challenges we ran into
The hardest part of the project was putting the frontend and the backend of the application together. We did not have the foresight to plan out and develop the frontend with the backend together. As we developed the project, we had to make many chances and implementations to the code. As a result, a lot of things were changed to work, and had to be changed again in order to work with other aspects of the code. For example, the html was not built with the implementation of a chrome extension and it's limitations with JavaScript injections in mind. As a result, we had to pivot and make changes last moment with a major rewrite. It was not an enjoyable moment.
Accomplishments that we're proud of
For a few members on the team, it was our first time working with API and other technologies. We are very proud of setting up the twitter API, sentimental analysis and Amazon DOM reader. Our biggest accomplishment was putting all of that information together to implement a RESTful API hosted locally to work with our chrome extension.
Something else that took a lot of effort was the algorithm devised to calculate the recommendations based on the user's tweets. Although we were unable to fully implement all the aspects of the algorithm due to technical and time constrains, we think that it is a beautiful piece of work. Feel free to reach out to the team for a more indepth explanation of the algorithm. It will take a bit.
What we learned
- how to use Google's Sentimental Analysis
- how to use Tweepy's Twitter API
- how to make a chrome extension
- how to run content script
- how to set up AWS server
- how to set up a REST API
- how to scrape the DOM for Amazon prices
What's next for Santa!
We're trying to finish up the project before the deadline of the hackathon. We're putting together the front end and the back end together in time for the demonstration. Something that we're interested in is polishing up the application in order to make it run more smoothly and effectively. We've spent a significant amount of our time developing our algorithm and we want to get more data to work with by targeting other social media accounts.
Log in or sign up for Devpost to join the conversation.