Inspiration

We were inspired by the decentralized nature of bitcoin and its potential to disrupt the global financial markets. We wanted to work with bitcoins and correlating bitcoin exchange rates with twitter sentiment seemed like a great program to work with.

Built with

Google App Engine, Google Cloud Natural Language API, Coinbase API, Giphy API, React.JS, Twitter API, Tweepy, Flask, javascript, python.

What it does

It tracks the price of bitcoin and the sentiments about bitcoins on twitter and checks whether there is a correlation between them.

How we built it

We get tweet data using the twitter API for each cryptocurrency and its related terms. We clean the data, put in placeholders for urls, images, users and then send it to Google Cloud’s Natural Language API. Natural Language API gives us sentiments for tweets in a certain interval. We weigh these sentiments by salience and produce a sentiment score for that interval and use it as a model to predict bitcoin price. We deploy this model on the server and allow access to it via a REST API.

Challenges I ran into:

Twitter’s rate limited calls decreased our capability to experiment. So, we decided to experiment using the stream api and then replaced it with the fetch api towards the end. Natural language api couldn’t understand sentiments when the tweets were sent directly. We had to preprocess the tweets using regex so that they seem more like natural language on which the models behind Google’s language APIs were actually built on. There were various issues that came up with deployment on Google Cloud, we(us and the cloud mentor) had to do some really quick and intelligent hacking to get past it. The API has a lot of real-time processing to do and ends up being fairly slow.

Accomplishments that we are proud of:

Preprocessing the tweets till google cloud is able to process them. Providing the model as an API endpoint rather than just producing the model for internal use. What I learned Interfacing with the twitter API and google cloud API. Dealing with data stream from remote APIs using python and javascript. Producing data streams APIs using flask. Processing text data so that its understandable for ML models.

What’s next for track my money maker

We will be improving how to calculate sentiment scores for bitcoins by weighing the more influential users opinions more. We will use a criteria like median number of replies in or likes per tweet in the past week to calculate the influentiality, so that the influence scores robustly adapt with time.

Share this project:
×

Updates